The CLI tool is provided mainly for quick tests and debugging.
The CLI ships two top-level groups:
- V2 product subcommands at the root:
extraction,classification,crop,ocr,split, plussearch-models. - All V1 products live under a
v1group (e.g.mindee v1 invoice ...).
For backward compatibility, invoking a V1 product name directly
(mindee invoice ..., mindee receipt ..., …) is automatically
dispatched to mindee v1 <product> ....
./mindee --help
./mindee v1 --help
./mindee extraction --help
./mindee search-models --helpNote: Due to the limited-nature of most PHP CLI tools, the help sections aren't customized for each command.
./mindee v1 invoice -k xxxxxxx /path/to/invoice.pdfLegacy
./mindee invoice -k xxxxxxx /path/to/invoice.pdfstill works.
export MINDEE_API_KEY=xxxxxx
./mindee v1 invoice /path/to/invoice.pdf./mindee v1 generated -a pikachu -k xxxxxxx pokemon_card /path/to/card.jpg -A./mindee v1 invoice-splitter path/to/the/invoice.pdf -ANote: the
-Acan be omitted on products which do not support synchronous mode.
./mindee v1 invoice -k xxxxxxx /path/to/invoice.pdf -o rawV2 inference commands share the same option set:
| Option | Short | Description |
|---|---|---|
--model-id |
-m |
ID of the model to use (required). |
--api-key |
-k |
API key. Falls back to MINDEE_V2_API_KEY. |
--alias |
-a |
Optional alias for the file. |
--output |
-o |
summary (default), full, or raw. |
The extraction command adds:
| Option | Short | Description |
|---|---|---|
--rag |
-g |
Enable Retrieval-Augmented Generation. |
--raw-text |
-r |
Extract the document's raw text. |
--confidence |
-c |
Return per-field confidence scores. |
--polygon |
-p |
Return per-field bounding polygons. |
--text-context |
-t |
Add text context to the API call. |
export MINDEE_V2_API_KEY=xxxxxx
./mindee extraction -m <model-id> /path/to/file.pdf./mindee extraction -m <model-id> -k <api-key> -r -c -p -o full /path/to/file.pdf
./mindee extraction -m <model-id> -o raw /path/to/file.pdf./mindee search-models -k <api-key>
./mindee search-models --name fin --model-type extraction -rA helper script allows you to start the command directly:
php bin/cli.php