Skip to content

CLI Reference

The CLI provides an interactive REPL for conversing with Maestro.

Terminal window
# Development
npm run cli
# Production
node dist/index.js cli

All commands start with /:

CommandDescription
/helpShow available commands
/clearClear conversation history for current session
/costShow token usage and estimated cost
/quitExit the CLI
/exitExit the CLI (alias)
$ npm run cli
Maestro CLI - Type /help for commands, /quit to exit
You: Hello!
Assistant: Hello! How can I help you today?
You: What's 15% tip on $85?
Assistant: 15% of $85 = $12.75
You: /cost
Token usage:
Input: 245 tokens
Output: 52 tokens
Estimated cost: $0.0012
You: /quit
Goodbye!
You: Clone https://github.com/example/project
Assistant: Cloned to project. This is now your active project.
You: What files are in this project?
Assistant: [Uses claude_code to list files]
- README.md
- package.json
- src/
- index.ts
- utils.ts
You: Create an agent called summarizer
Assistant: Created summarizer. What should its description be?
You: It summarizes long texts concisely
Assistant: Updated description. What system prompt should it use?
You: Be extremely concise. Summarize to 2-3 sentences max.
Assistant: Updated system prompt. summarizer is ready.
You: List all agents
Assistant: Available agents:
- orchestrator
- personal-assistant
- coder
- summarizer (dynamic)

The CLI uses a fixed session ID per terminal. Your conversation history:

  • Persists across CLI restarts
  • Is stored in SQLite (data/maestro.db)
  • Can be cleared with /clear
ShortcutAction
Ctrl+CCancel current input
Ctrl+DExit CLI
Up/DownNavigate history

The CLI supports:

  • Colored output for different message types
  • Streaming responses (text appears as it’s generated)
  • Markdown rendering in terminal

The CLI respects these environment variables:

VariableEffect
LOG_LEVELSet logging verbosity
NO_COLORDisable colored output
CodeMeaning
0Normal exit
1Error occurred

Check that ANTHROPIC_API_KEY is set in .env.

Some terminals don’t support streaming. The response will appear all at once when complete.

Arrow key history requires a compatible terminal. Most modern terminals support this.