CLI Reference#
MassGen Command Line Interface reference.
Basic Usage#
massgen [OPTIONS] ["<your question>"]
Default Behavior (No Arguments):
When running massgen with no arguments, configs are auto-discovered with this priority:
.massgen/config.yaml(project-level config in current directory)~/.config/massgen/config.yaml(global default config)Launch setup wizard if no config found
First-Time Setup:
The wizard consists of two steps:
API Key Setup (if no cloud provider keys detected)
Prompts for OpenAI, Anthropic, Google, or other cloud provider API keys
Saves to
~/.config/massgen/.envSkipped if keys already exist
Configuration Setup
Option to browse ready-to-use configs/examples
Option to build from templates (Simple Q&A, Research, Code & Files, etc.)
Asks “Save as default?” when browsing existing configs
Launches directly into interactive mode
After Setup:
No arguments → Starts multi-turn conversation mode if default config chosen
With question → Runs single query using default config
CLI Parameters#
Parameter |
Description |
|---|---|
|
Path to YAML configuration file with agent definitions, model parameters, backend parameters and UI settings |
|
Interactively select from available configurations (user configs, project configs, current directory, package examples). Uses hierarchical navigation: category → config |
|
Backend type for quick setup without config file. Options: |
|
Model name for quick setup (e.g., |
|
System prompt for the agent in quick setup mode. Omitted if |
|
Disable real-time streaming UI coordination display (fallback to simple text output) |
|
Disable real-time logging |
|
Enable debug mode with verbose logging. Debug logs saved to |
|
Load memory from a previous session by ID (e.g., |
|
List all available memory sessions with their metadata (session IDs, timestamps, models, status). Sessions are automatically tracked in |
|
Optional single-question input. If omitted, MassGen enters interactive chat mode |
Examples#
Default Configuration Mode#
# First time: Launch setup wizard
massgen
# After setup: Start interactive conversation
massgen
# Run single query with default config
massgen "What is machine learning?"
Interactive Config Selection#
# Browse and select from available configurations
massgen --select
# After selection, optionally provide a question
massgen --select "Your question here"
# The selector shows configs from:
# - User configs: ~/.config/massgen/agents/
# - Project configs: .massgen/*.yaml
# - Current directory: *.yaml
# - Package examples: Built-in example configs
Quick Single Agent#
# Fastest way to test - no config file
massgen --model claude-3-5-sonnet-latest "What is machine learning?"
massgen --model gemini-2.5-flash "Explain quantum computing"
With Specific Backend#
massgen \
--backend gemini \
--model gemini-2.5-flash \
"What are the latest developments in AI?"
Multi-Agent with Config#
# Recommended: Use YAML config for multi-agent
massgen \
--config @examples/basic/multi/three_agents_default.yaml \
"Analyze the pros and cons of renewable energy"
Interactive Mode#
# Omit question to enter interactive chat mode
massgen --model gemini-2.5-flash
# Multi-agent interactive
massgen \
--config @examples/basic/multi/three_agents_default.yaml
Debug Mode#
massgen \
--debug \
--config @examples/basic/multi/three_agents_default.yaml \
"Your question here"
Disable UI#
# Simple text output instead of rich terminal UI
massgen \
--no-display \
--config config.yaml \
"Question"
Session Management#
# List available memory sessions
massgen --list-sessions
# Load session from previous run
massgen --session-id session_20251028_143000 \
"What did we discuss about the backend architecture?"
# Interactive mode with previous session
massgen --session-id session_20251028_143000 \
--config my_config.yaml
# Session can also be specified in YAML config
# Add to your config.yaml:
# session_id: "session_20251028_143000"
See Also#
Running MassGen - Detailed usage examples
YAML Configuration Reference - YAML configuration reference
Supported Models & Backends - Available models and backends