JSPM

llama-ocr-cli

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 4
    • Score
      100M100P100Q22836F
    • License MIT

    CLI tool for OCR using llama-ocr

    Package Exports

    • llama-ocr-cli
    • llama-ocr-cli/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (llama-ocr-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    llama-ocr-cli

    A command-line interface for performing OCR on images using llama-ocr.

    Installation

    npm install -g llama-ocr-cli

    Prerequisites

    You need a Together AI API key to use this tool. You can either:

    • Set it as an environment variable: TOGETHER_API_KEY=your-key-here
    • Pass it as a command line argument: --api-key your-key-here

    Usage

    Basic usage:

    llama-ocr image.jpg

    With explicit API key:

    llama-ocr image.jpg --api-key your-key-here

    Save output to file:

    llama-ocr image.jpg -o output.md

    Options

    • -k, --api-key <key>: Together AI API key (overrides environment variable)
    • -o, --output <file>: Output file for the extracted text (defaults to stdout)
    • -V, --version: Output the version number
    • -h, --help: Display help information

    Development

    1. Clone the repository
    2. Install dependencies:
    npm install
    1. Build the project:
    npm run build
    1. Run in development mode:
    npm run dev

    Publishing

    This package is automatically published to npm when a new GitHub release is created. The GitHub Action workflow will:

    1. Build the package
    2. Publish to npm registry

    To publish a new version:

    1. Update version in package.json
    2. Create a new release on GitHub
    3. The GitHub Action will automatically publish to npm

    License

    MIT