Skip to content

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 | bash

Verify:

bash
monid --version

Setup

1. Get an API Key

Go to https://app.dev.monid.ai to create an account if you don't have one. Then go to https://app.dev.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.json

Global Flags

All data commands support:

FlagDescription
-j, --jsonOutput raw JSON instead of formatted text. Suppresses spinners and colors. Useful for piping into jq or scripting.
--helpShow 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.json

For 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.json

Environment Variables

VariableDescription
MONID_API_BASE_URLOverride the API base URL
XDG_CONFIG_HOMEOverride config directory base
NO_COLORDisable ANSI color codes

Commands

CommandDescription
monid discoverSearch for data endpoints
monid inspectGet full endpoint details
monid runExecute a data endpoint
monid runsList and inspect runs
monid keysManage API keys

The data layer for AI agents.