CLI Overview
Discover, inspect, and run capabilities from the command line.
The ToolPlexer CLI lets you discover capabilities, inspect their schemas and pricing, and run them from your terminal.
Installation
Install the CLI globally:
npm install -g @toolplexer/cli
toolplexer --versionSetup
1. Get an API key
Create an account at the ToolPlexer dashboard, then create a key from Keys. Copy it—the full key is only shown once.
2. Add the key
toolplexer keys add --label main --key <your-api-key>
toolplexer keys activate --label mainThe first key is activated automatically. keys list shows labels only and
never prints key material.
3. Check your workspace
toolplexer whoami
toolplexer balanceExample workflow
# Discover capabilities for a task
toolplexer discover -q "web search"
# Inspect the exact schema and price before spending
toolplexer inspect -p mock -e /web-search
# Start a run; it returns a run ID immediately
toolplexer run -p mock -e /web-search \
-i '{"query":"cats","maxResults":3}'
# Retrieve the result
toolplexer runs get -r <run-id> -o result.jsonGlobal flags
All data commands support:
| Flag | Description |
|---|---|
-j, --json | Print raw JSON for scripting and jq |
-o, --output <file> | Save the complete response without overwriting an existing file |
--help | Show command help |
Input accepts inline JSON (-i '{...}'), a file reference (-i @input.json),
or an explicit file (-f input.json). Use --format yaml, --format md, or
the default compact output for other presentation formats.
Polling strategies
Runs return immediately by default. Poll separately with runs get:
toolplexer run -p mock -e /web-search -i @input.json
toolplexer runs get -r <run-id>For blocking workflows, pass --wait or set a deadline in seconds:
toolplexer run -p mock -e /web-search -i @input.json --wait 120Polling timeouts preserve the run ID. Retrieve it again; do not resubmit a paid operation merely because polling timed out.
Command groups
- Endpoints — discover, inspect, run, or automatically route a task.
- Runs — list, retrieve, and stop runs.
- Keys & Access — manage local key labels.
- Examples — complete workflows.
The CLI also includes balance and whoami for checking the active workspace
and wallet, plus setup for guided key configuration.
Discovery and inspection are free. Only execution is billed.
ToolPlexer