Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 1.1 KB

File metadata and controls

73 lines (51 loc) · 1.1 KB

Installation

Prerequisites

  • Bun (for building from source or running the script directly)

Global Installation

The easiest way to install is using the provided installation script:

./install.sh

Manual Installation

  1. Clone the repository:

    git clone https://github.com/pc-style/pdf2md-cli.git
    cd pdf2md-cli
  2. Install dependencies:

    bun install
  3. Build the binary:

    bun run build

    This will create a standalone pdf2md executable in the bin/ directory.

  4. (Optional) Move to your PATH:

    mv bin/pdf2md /usr/local/bin/

Usage

Configuration (AI Mode)

To use the AI-powered formatting (Gemini), you need an API Key.

pdf2md config --key YOUR_GEMINI_API_KEY

Convert a PDF

Standalone Mode (Fast, extract text only):

./pdf2md input.pdf

AI Mode (Smart formatting):

./pdf2md input.pdf --mode ai

Bulk Conversion

Process an entire directory of PDFs:

./pdf2md ./documents/ --mode ai

Help

./pdf2md --help