CLI Command Reference
Use mutagent <command> --help for detailed help on any command. Add --json to any command for machine-readable output.
Authentication
mutagent auth login
Authenticate with MutagenT.
# Interactive
mutagent auth login
# Non-interactive
mutagent auth login --api-key "sk_live_xxxx" --endpoint "https://api.mutagent.io/v1"
| Option | Description |
|---|
--api-key <key> | API key (skips prompt) |
--endpoint <url> | API endpoint (skips prompt) |
mutagent auth status
Check authentication status.
mutagent auth logout
Clear stored credentials.
Prompts
mutagent prompts list
List all prompts.
mutagent prompts list
mutagent prompts list --limit 100
mutagent --json prompts list
| Option | Description | Default |
|---|
-l, --limit <n> | Max prompts to return | 50 |
mutagent prompts get <id>
Get prompt details.
mutagent prompts get 123
mutagent prompts get 123 --with-datasets --with-evals
| Option | Description |
|---|
--with-datasets | Include linked datasets |
--with-evals | Include evaluation history |
mutagent prompts create
Create a new prompt.
# From file
mutagent prompts create --file prompt.json
# Inline
mutagent prompts create --name "My Prompt" --content "You are a helpful assistant..."
| Option | Description |
|---|
-f, --file <path> | JSON file with prompt definition |
-n, --name <name> | Prompt name |
-c, --content <content> | Prompt content |
mutagent prompts update <id>
Update an existing prompt.
mutagent prompts update 123 --name "Updated Name"
mutagent prompts update 123 --file updated-prompt.json
| Option | Description |
|---|
-f, --file <path> | JSON file with updates |
-n, --name <name> | New name |
-c, --content <content> | New content |
mutagent prompts delete <id>
Delete a prompt.
mutagent prompts delete 123
mutagent prompts delete 123 --force # Skip confirmation
| Option | Description |
|---|
--force | Skip confirmation prompt |
Datasets
Datasets are scoped to prompts.
mutagent prompts datasets <prompt-id>
List datasets for a prompt.
mutagent prompts datasets 123
mutagent prompts datasets:add <prompt-id>
Add a dataset to a prompt.
mutagent prompts datasets:add 123 --file dataset.jsonl
mutagent prompts datasets:add 123 --file dataset.csv
| Option | Description |
|---|
-f, --file <path> | JSONL or CSV file with dataset items |
mutagent prompts datasets:remove <prompt-id> <dataset-id>
Remove a dataset from a prompt.
mutagent prompts datasets:remove 123 456
Evaluations
mutagent prompts evals <prompt-id>
List evaluations for a prompt.
mutagent prompts evals 123
mutagent prompts evals:run <prompt-id>
Run an evaluation.
mutagent prompts evals:run 123 --dataset 456
| Option | Description |
|---|
-d, --dataset <id> | Dataset ID to evaluate against (required) |
mutagent prompts evals:results <run-id>
Get evaluation results.
mutagent prompts evals:results run_abc123
mutagent --json prompts evals:results run_abc123
Optimization
mutagent prompts optimize <prompt-id>
Start an optimization job.
mutagent prompts optimize 123 --dataset 456
| Option | Description |
|---|
-d, --dataset <id> | Dataset ID (required) |
mutagent prompts optimize:status <job-id>
Check optimization job status.
mutagent prompts optimize:status job_abc123
mutagent prompts optimize:results <job-id>
Get optimization results.
mutagent prompts optimize:results job_abc123
Traces
mutagent traces list
List traces.
mutagent traces list
mutagent traces list --prompt 123 --limit 100
| Option | Description | Default |
|---|
-p, --prompt <id> | Filter by prompt ID | - |
-l, --limit <n> | Max traces | 50 |
mutagent traces get <id>
Get trace details.
mutagent traces get trace_abc123
mutagent traces analyze <prompt-id>
Analyze traces for a prompt.
mutagent traces analyze 123
mutagent traces export
Export traces.
mutagent traces export --prompt 123 --format json --output traces.json
mutagent traces export --prompt 123 --format csv --output traces.csv
| Option | Description |
|---|
-p, --prompt <id> | Filter by prompt ID |
-f, --format <fmt> | Output format: json or csv |
-o, --output <path> | Output file path |
Integrations
mutagent integrate
Interactive framework selection.
mutagent integrate <framework>
Generate integration code for a specific framework.
mutagent integrate mastra
mutagent integrate langchain --output INTEGRATION.md
mutagent integrate vercel-ai --raw
| Framework | Description |
|---|
mastra | Modern AI agent framework |
langchain | Popular LLM framework |
langgraph | Agent workflow framework |
vercel-ai | AI SDK for streaming chat |
claude-code | Native Anthropic integration |
generic | OpenAI-compatible endpoint |
| Option | Description |
|---|
-o, --output <path> | Save to file |
--raw | Output raw markdown (no formatting) |
--verify | Verify integration after generation |
mutagent integrate list
List available frameworks.
Configuration
mutagent config list
Display all configuration.
mutagent config get <key>
Get a specific configuration value.
mutagent config get apiKey
mutagent config get endpoint
mutagent config get format
mutagent config get timeout
Exit Codes
| Code | Meaning |
|---|
0 | Success |
1 | General error |
2 | Authentication required |
3 | Configuration error |
5 | Network error |
6 | Rate limit exceeded |
8 | Permission error |