> For the complete documentation index, see [llms.txt](https://docs.mindee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindee.com/integrations/client-libraries-sdk/command-line-tools-cli.md).

# Command Line Tools (CLI)

All our APIs are asynchronous, as a result it's not very practical to use cURL or equivalent for quick testing.

For this reason the SDKs include a Command Line Interface (CLI) to allow for quick testing and debugging of your models.

{% tabs %}
{% tab title="Python" %}

```bash
# Install the library
pip install mindee

# General help
mindee --help

# Help for extraction models
mindee extraction --help

# Run extraction on a file
#   -k: API key, you can instead `export MINDEE_V2_API_KEY=md_XXXXXXXXXXXX`
#   -m: Your model ID
#   Positional arg: Absolute path to the file
mindee extraction \
  -k md_XXXXXXXXXXXX \
  -m xxxx-xxxx-xxxx-xxxx-xxxx \
  /path/to/the/file.pdf
```

{% endtab %}

{% tab title="Node.js" %}

```shellscript
# Install the library
npm install mindee

# General help
./node_modules/.bin/mindeeV2 --help

# Help for extraction models
./node_modules/.bin/mindeeV2 extraction --help

# Run extraction on a file
#   -k: API key, you can instead `export MINDEE_V2_API_KEY=md_XXXXXXXXXXXX`
#   -m: Your model ID
#   Positional arg: Absolute path to the file
./node_modules/.bin/mindeeV2 extraction \
  -k md_XXXXXXXXXXXX \
  -m xxxx-xxxx-xxxx-xxxx-xxxx \
  /path/to/the/file.pdf
```

{% endtab %}

{% tab title="Ruby" %}

```bash
# General help
./bin/mindee.rb --help

# Help for extraction models
./bin/mindee.rb extraction --help

# Run extraction on a file
#   -k: API key, you can instead `export MINDEE_V2_API_KEY=md_XXXXXXXXXXXX`
#   -m: Your model ID
#   Positional arg: Absolute path to the file
./bin/mindee.rb extraction \
  -k md_XXXXXXXXXXXX \
  -m xxxx-xxxx-xxxx-xxxx-xxxx \
  /path/to/the/file.pdf
```

{% endtab %}

{% tab title="PHP" %}

```bash
# General help
php ./bin/cli.php --help

# Help for extraction models
php ./bin/cli.php extraction --help

# Run extraction on a file
#   -k: API key, you can instead `export MINDEE_V2_API_KEY=md_XXXXXXXXXXXX`
#   -m: Your model ID
#   Positional arg: Absolute path to the file
php ./bin/cli.php extraction \
  -k md_XXXXXXXXXXXX \
  -m xxxx-xxxx-xxxx-xxxx-xxxx \
  /path/to/the/file.pdf
```

{% endtab %}

{% tab title="Java" %}
Use from the root of the [Git repository](https://github.com/mindee/mindee-api-java).

```bash
# Compile locally
mvn clean verify

# General help
./cli.sh --help

# Help for extraction models
./cli.sh extraction --help

# Run extraction on a file
#   -k: API key, you can instead `export MINDEE_V2_API_KEY=md_XXXXXXXXXXXX`
#   -m: Your model ID
#   Positional arg: Absolute path to the file
./cli.sh extraction \
  -k md_XXXXXXXXXXXX \
  -m xxxx-xxxx-xxxx-xxxx-xxxx \
  /path/to/the/file.pdf
```

{% endtab %}

{% tab title=".NET" %}
First install the CLI package: <https://www.nuget.org/packages/Mindee.Cli>

Note: this is a separate package from the general Mindee SDK.

```bash
# Install the package
dotnet tool install Mindee.Cli

# General help
dotnet mindee --help

# Help for extraction models
dotnet mindee extraction --help

# Run extraction on a file
#   -k: API key, you can instead `export MINDEE_V2_API_KEY=md_XXXXXXXXXXXX`
#   -m: Your model ID
#   Positional arg: Absolute path to the file
dotnet mindee extraction \
  -k md_XXXXXXXXXXXX \
  -m xxxx-xxxx-xxxx-xxxx-xxxx \
  /path/to/the/file.pdf
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
We are still working hard to make the CLI utilities more complete and useful.\
**As a result, the interface is not yet considered stable, and may be subject to change.**

If you have any ideas to improve them, [make a feature request!](https://feedback.mindee.com/?b=682f69c9e2404756e7e68d1c)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mindee.com/integrations/client-libraries-sdk/command-line-tools-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
