Skip to main content
The Maitai CLI lets you manage every resource available in the Portal from the terminal — applications, intents, agents, datasets, test sets, finetune runs, and more. It wraps the full API Reference (api/v1).

Install

pip install maitai-cli
Or install from the maitai-mono repo:
cd cli && pip install .

Authenticate

Create an API key in the Portal under Settings → API Keys, then:
# Interactive: saves key to ~/.maitai/config
maitai login --api-key YOUR_MAITAI_API_KEY

# Or use environment variable (no login needed)
export MAITAI_API_KEY="YOUR_MAITAI_API_KEY"
For a custom base URL (e.g. local dev):
maitai login --api-key YOUR_KEY --base-url http://localhost:5000/api/v1

Quick usage

# Check auth status
maitai whoami

# List resources
maitai applications --list
maitai agents --list
maitai intent-groups --list

# Get by ID
maitai applications --get 42
maitai agents --get 1

# Raw API calls (any endpoint)
maitai api GET /applications
maitai api POST /applications -b '{"application_name":"Test","application_ref_name":"test"}'

Base URL

  • Production: https://api.trymaitai.ai/api/v1
  • Override with MAITAI_BASE_URL or maitai login --base-url

Response format

  • Success: {"data": {...}}
  • Paginated: {"data": [...], "pagination": {"total": N, "offset": 0, "limit": 25}}
  • Error: {"error": {"status": 401, "message": "..."}}

Command reference

See Commands for the full list of resource commands and options.