CLI Overview
The Monid CLI lets you discover, inspect, and run data endpoints from the command line.
Installation
bash
curl -fsSL https://monid.ai/install.sh | bashVerify:
bash
monid --versionSetup
1. Get an API Key
Go to https://app.monid.ai to create an account if you don't have one. Then go to https://app.monid.ai/access/api-keys to create an API key. Copy the key -- it is only shown once.
2. Add the Key
bash
monid keys add --label main --key <your-api-key>The first key you add is automatically set as the active key.
3. Switch Active Key
If you have multiple keys, switch between them:
bash
monid keys activate --label <name>Example Workflow
bash
# 1. Discover endpoints for your data need
monid discover -q "twitter posts about AI"
# 2. Inspect an endpoint to see its input schema and pricing
monid inspect -p apify -e /apidojo/tweet-scraper
# 3. Run the endpoint
monid run -p apify -e /apidojo/tweet-scraper \
-i '{"searchTerms":["AI"],"maxItems":10}'
# 4. Get the results
monid runs get -r <run-id> -o tweets.jsonGlobal Flags
All data commands support:
| Flag | Description |
|---|---|
-j, --json | Output raw JSON instead of formatted text. Suppresses spinners and colors. Useful for piping into jq or scripting. |
--help | Show help text for the command |
Polling Strategies
Endpoint execution times vary widely depending on the endpoint and data volume. The recommended approach is to run without --wait and poll separately:
bash
# Start the run (returns immediately with a run ID)
monid run -p apify -e /apidojo/tweet-scraper -i '{"searchTerms":["AI"]}'
# → Run ID: 01HXYZ...
# Poll for results
monid runs get -r 01HXYZ... -o results.jsonFor blocking use cases, you can use --wait which polls with automatic exponential backoff until the run completes:
bash
monid run -p apify -e /apidojo/tweet-scraper \
-i '{"searchTerms":["AI"]}' --wait -o results.jsonEnvironment Variables
| Variable | Description |
|---|---|
MONID_API_BASE_URL | Override the API base URL |
XDG_CONFIG_HOME | Override config directory base |
NO_COLOR | Disable ANSI color codes |
Commands
| Command | Description |
|---|---|
monid discover | Search for data endpoints |
monid inspect | Get full endpoint details |
monid run | Execute a data endpoint |
monid runs | List and inspect runs |
monid keys | Manage API keys |