# llama-ocr-cli

> CLI tool for OCR using llama-ocr

Latest version **1.0.0** (published 2024-11-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install llama-ocr-cli
pnpm add llama-ocr-cli
yarn add llama-ocr-cli
bun add llama-ocr-cli
```

Provides the command `llama-ocr`.

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-11-17 |
| First published | 2024-11-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | luandro |
| Keywords | ocr, cli, llama, image-to-text |

## Links

- npm: https://www.npmjs.com/package/llama-ocr-cli
- npm.io page: https://npm.io/package/llama-ocr-cli

## Dependencies (3)

- [dotenv](https://npm.io/package/dotenv.md) ^16.4.5
- [commander](https://npm.io/package/commander.md) ^12.1.0
- [llama-ocr](https://npm.io/package/llama-ocr.md) ^0.0.6

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2024-11-17

## README

# llama-ocr-cli

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

## Installation

```bash
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:
```bash
llama-ocr image.jpg
```

With explicit API key:
```bash
llama-ocr image.jpg --api-key your-key-here
```

Save output to file:
```bash
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:
```bash
npm install
```

3. Build the project:
```bash
npm run build
```

4. Run in development mode:
```bash
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

---
_Source: https://npm.io/package/llama-ocr-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
