Skip to content

CLI Reference

Michael Goetz edited this page Jun 13, 2025 · 1 revision

CLI Reference

Complete reference for all Multi-Agent Framework CLI commands and options.

Table of Contents

Global Options

These options can be used with any command:

maf [GLOBAL_OPTIONS] COMMAND [COMMAND_OPTIONS]
Option Short Description Default
--help -h Show help message -
--version -v Show MAF version -
--verbose -V Enable verbose output False
--quiet -q Suppress non-error output False
--project -p Project directory path Current directory

Commands Overview

Command Description
init Initialize MAF in a project
launch Start agent processes
trigger Create a new task
status Check framework status
reset Reset framework state
config View/modify configuration
logs View agent logs
stop Stop running agents

init - Initialize Project

Initialize MAF in a new or existing project.

Syntax

maf init [PROJECT_PATH] [OPTIONS]

Arguments

  • PROJECT_PATH - Directory to initialize (default: current directory)

Options

Option Description Default
--name Project name Directory name
--type Project type (auto-detected if not specified) auto
--force Overwrite existing configuration False
--minimal Create minimal configuration False

Project Types

  • nextjs - Next.js application
  • react - React application
  • django - Django project
  • fastapi - FastAPI project
  • express - Express.js application
  • auto - Auto-detect from files

Examples

# Initialize in current directory
maf init

# Initialize with specific name and type
maf init --name "My App" --type nextjs

# Initialize in different directory
maf init /path/to/project --force

# Minimal setup
maf init --minimal

launch - Start Agents

Launch the multi-agent framework with specified agents.

Syntax

maf launch [OPTIONS]

Options

Option Description Default
--agents Comma-separated list of agents All enabled
--mode Operation mode: event or polling event
--detach Run in background False
--config Custom config file .maf-config.json
--timeout Agent startup timeout (seconds) 30

Available Agents

  • orchestrator - Task coordinator (always required)
  • frontend_agent - Frontend development
  • backend_agent - Backend development
  • db_agent - Database management
  • qa_agent - Quality assurance
  • security_agent - Security audit
  • devops_agent - DevOps tasks
  • doc_agent - Documentation
  • ux_agent - UX/UI design

Examples

# Launch all configured agents
maf launch

# Launch specific agents
maf launch --agents orchestrator,frontend_agent,backend_agent

# Launch in polling mode
maf launch --mode polling

# Launch in background
maf launch --detach

# Custom configuration
maf launch --config custom-config.json

trigger - Create Tasks

Trigger a new development task for the agents.

Syntax

maf trigger "TASK_DESCRIPTION" [OPTIONS]

Arguments

  • TASK_DESCRIPTION - Description of the feature or task

Options

Option Description Default
--priority Task priority: low, medium, high medium
--agents Specific agents to assign Auto-assigned
--wait Wait for completion False
--timeout Completion timeout (seconds) None

Examples

# Simple feature request
maf trigger "Add user authentication with email and password"

# High priority task
maf trigger "Fix critical security vulnerability" --priority high

# Assign to specific agents
maf trigger "Update API documentation" --agents doc_agent

# Wait for completion
maf trigger "Add unit tests for user service" --wait --timeout 300

status - Check Status

View the current status of the framework and agents.

Syntax

maf status [OPTIONS]

Options

Option Description Default
--detailed Show detailed information False
--agents Show agent status True
--tasks Show task status True
--json Output as JSON False
--watch Continuously update False

Output Information

  • Framework state (running/stopped)
  • Active agents and their status
  • Pending/active/completed tasks
  • Recent events
  • Resource usage (detailed mode)

Examples

# Basic status
maf status

# Detailed status
maf status --detailed

# JSON output for scripting
maf status --json

# Watch mode (updates every 2 seconds)
maf status --watch

# Only show tasks
maf status --agents false --tasks true

reset - Reset Framework

Reset the framework state, clearing tasks and messages.

Syntax

maf reset [OPTIONS]

Options

Option Description Default
--hard Remove all data including logs False
--keep-config Preserve configuration True
--confirm Skip confirmation prompt False

What Gets Reset

  • Task queue and history
  • Agent states
  • Message queue
  • Temporary files
  • Logs (with --hard)

Examples

# Soft reset (keeps config and logs)
maf reset

# Hard reset (removes everything)
maf reset --hard

# Reset without confirmation
maf reset --confirm

# Reset but keep configuration changes
maf reset --keep-config

config - Manage Configuration

View or modify framework configuration.

Syntax

maf config [ACTION] [OPTIONS]

Actions

  • show - Display current configuration (default)
  • set - Set configuration value
  • get - Get specific value
  • validate - Validate configuration

Options

Option Description
--json JSON output format
--save Save to file
--load Load from file

Configuration Keys

project_name
project_type
framework_config.state_file
framework_config.message_queue_dir
framework_config.log_dir
agent_config.default_model_provider
agent_config.default_model_name
agent_config.enabled_agents

Examples

# Show all configuration
maf config

# Show as JSON
maf config --json

# Get specific value
maf config get agent_config.default_model_provider

# Set value
maf config set project_name "My Awesome App"

# Save configuration
maf config --save backup-config.json

# Load configuration
maf config --load custom-config.json

# Validate configuration
maf config validate

logs - View Logs

View agent and framework logs.

Syntax

maf logs [AGENT_NAME] [OPTIONS]

Arguments

  • AGENT_NAME - Specific agent to show logs for (optional)

Options

Option Description Default
--follow Follow log output False
--tail Number of lines to show 50
--level Log level filter INFO
--since Show logs since timestamp None

Log Levels

  • DEBUG - Detailed debugging information
  • INFO - General information
  • WARNING - Warning messages
  • ERROR - Error messages
  • CRITICAL - Critical errors

Examples

# View all recent logs
maf logs

# Follow orchestrator logs
maf logs orchestrator --follow

# Show last 100 lines of frontend agent logs
maf logs frontend_agent --tail 100

# Filter by log level
maf logs --level ERROR

# Logs from last hour
maf logs --since "1 hour ago"

stop - Stop Agents

Stop running agents gracefully.

Syntax

maf stop [OPTIONS]

Options

Option Description Default
--agents Specific agents to stop All
--force Force stop without cleanup False
--timeout Shutdown timeout (seconds) 30

Examples

# Stop all agents
maf stop

# Stop specific agents
maf stop --agents frontend_agent,backend_agent

# Force stop (not recommended)
maf stop --force

# Custom timeout
maf stop --timeout 60

Examples

Complete Workflow

# 1. Initialize a new Next.js project
cd ~/projects/my-nextjs-app
maf init --type nextjs --name "My App"

# 2. Configure API keys
echo "GEMINI_API_KEY=your_key_here" > .env

# 3. Launch agents
maf launch --agents orchestrator,frontend_agent,backend_agent,qa_agent

# 4. Create a feature
maf trigger "Create a blog post editor with markdown support"

# 5. Monitor progress
maf status --watch

# 6. Check logs if needed
maf logs frontend_agent --follow

# 7. Create another feature
maf trigger "Add comment system to blog posts" --priority high

# 8. When done, stop agents
maf stop

Debugging Workflow

# Check current status
maf status --detailed

# View error logs
maf logs --level ERROR --tail 100

# Reset if stuck
maf reset

# Relaunch with specific agents
maf launch --agents orchestrator,backend_agent --verbose

# Test with simple task
maf trigger "Add a hello world endpoint" --wait

Production Workflow

# Launch in background
maf launch --detach

# Monitor with JSON output
maf status --json > status.json

# Graceful shutdown
maf stop --timeout 60

# View logs for specific time
maf logs --since "2024-01-01 09:00:00"

Environment Variables

MAF respects these environment variables:

Variable Description
MAF_PROJECT_DIR Default project directory
MAF_CONFIG_FILE Default config file path
MAF_LOG_LEVEL Default log level
MAF_TIMEOUT Default command timeout

Exit Codes

Code Description
0 Success
1 General error
2 Configuration error
3 Agent error
4 Task error
5 Timeout error

Next Steps