Skip to main content

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"
OptionDescription
--api-key <key>API key (skips prompt)
--endpoint <url>API endpoint (skips prompt)

mutagent auth status

Check authentication status.
mutagent auth status

mutagent auth logout

Clear stored credentials.
mutagent auth logout

Prompts

mutagent prompts list

List all prompts.
mutagent prompts list
mutagent prompts list --limit 100
mutagent --json prompts list
OptionDescriptionDefault
-l, --limit <n>Max prompts to return50

mutagent prompts get <id>

Get prompt details.
mutagent prompts get 123
mutagent prompts get 123 --with-datasets --with-evals
OptionDescription
--with-datasetsInclude linked datasets
--with-evalsInclude 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..."
OptionDescription
-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
OptionDescription
-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
OptionDescription
--forceSkip 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
OptionDescription
-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
OptionDescription
-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
OptionDescription
-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
OptionDescriptionDefault
-p, --prompt <id>Filter by prompt ID-
-l, --limit <n>Max traces50

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

mutagent integrate <framework>

Generate integration code for a specific framework.
mutagent integrate mastra
mutagent integrate langchain --output INTEGRATION.md
mutagent integrate vercel-ai --raw
FrameworkDescription
mastraModern AI agent framework
langchainPopular LLM framework
langgraphAgent workflow framework
vercel-aiAI SDK for streaming chat
claude-codeNative Anthropic integration
genericOpenAI-compatible endpoint
OptionDescription
-o, --output <path>Save to file
--rawOutput raw markdown (no formatting)
--verifyVerify integration after generation

mutagent integrate list

List available frameworks.
mutagent integrate list

Configuration

mutagent config list

Display all configuration.
mutagent config list

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

CodeMeaning
0Success
1General error
2Authentication required
3Configuration error
5Network error
6Rate limit exceeded
8Permission error