> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

Start the container with an input file and an output file as positional arguments and FineParser runs as a one-shot command instead of a server. The container starts, parses the document, writes the result, and exits. Use this mode for scripts, batch jobs, and quick checks where a long-running API is more than you need.

```bash theme={null}
docker run --rm \
  -e FINEPARSER_LICENSE_DATA="$(cat acme.fineparserlicense)" \
  -v "$PWD:/data" \
  fineparser /data/invoice.pdf /data/invoice.doclang
# metering ready for instance 2d679673...
# processed 12 pages
```

Both paths are inside the container, so mount the directory that holds your document and receives the output. In the example above, the current directory is mounted at `/data`. The container runs as a non-root user, so the output directory must be writable by it. The `--rm` flag removes the container once the job finishes.

The license is required here just as in server mode. The `metering ready for instance …` line confirms it was accepted. Without it the container prints a `no_instance` error and exits without parsing. See [Licenses and plans](/fine-parser/basics/licenses-and-plans).

## Choosing the output format

There is no `outputType` here. The format comes from the extension of the output file.

| Extension  | Output     |
| ---------- | ---------- |
| `.doclang` | DocLang    |
| `.json`    | JSON       |
| `.txt`     | Plain text |

See [Output formats](/fine-parser/basics/output-formats) for what each one contains.

## Setting mode and languages

The same flags as server mode apply, and they must come before the positional arguments.

```bash theme={null}
docker run --rm \
  -e FINEPARSER_LICENSE_DATA="$(cat acme.fineparserlicense)" \
  -v "$PWD:/data" \
  fineparser \
  -mode fast -language "English,German" \
  /data/invoice.pdf /data/invoice.txt
```

See [Recognition modes](/fine-parser/basics/recognition-modes) and [Languages](/fine-parser/basics/languages).

## Parsing many documents

Every run starts a new container and loads the recognition engine before it reads your document. Looping over a folder this way is slow because that startup happens again for each file. If you have more than a handful of documents, run the container as a server and post them to it instead. See [REST API](/fine-parser/concepts/rest-api).
