| description | For quick testing you can use the integrated CLI tools that ship with the Client Libraries. |
|---|---|
| icon | rectangle-terminal |
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" %}
# 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" %}
# 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" %}
# 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" %}
# 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.
# 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.
# 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! {% endhint %}