Skip to main content

Overview

The CLI interface provides direct command-line access to RepoMaster’s multi-agent system. It’s ideal for automation, scripting, and users who prefer terminal-based workflows.

Available Commands

Basic Help

python launcher.py --help

Command Structure

All RepoMaster commands follow this pattern:
python launcher.py --mode <MODE> [OPTIONS]

Primary Modes

From launcher.py:6-12, RepoMaster supports two primary modes:
ModeDescriptionUse Case
frontendInteractive Multi-Agent DashboardWeb-based visual interface
backendMulti-Agent Service InterfaceCLI-based agent interaction

Global Options

Configuration Flags

From launcher.py:478-483 and the argument parser:
FlagTypeDefaultDescription
--modestringrequiredExecution mode (frontend/backend)
--api-typestringbasicAPI provider (openai, claude, deepseek, etc.)
--temperaturefloat0.1Model temperature (0.0-2.0)
--work-dirpathautoWorking directory for code execution
--log-levelstringINFOLogging level (DEBUG, INFO, WARNING, ERROR)
--skip-config-checkflagfalseSkip API configuration validation

Frontend-Specific Options

FlagTypeDefaultDescription
--streamlit-portint8501Web server port
--streamlit-hoststringlocalhostServer host address
--max-upload-sizeint200Upload limit in MB (1-2000)
--file-watcher-typestringautoFile watching mechanism

Backend-Specific Options

FlagTypeDefaultDescription
--backend-modestringrequiredAgent mode (unified, deepsearch, etc.)
--timeoutint120Request timeout in seconds
--max-tokensint4000Maximum token count

Usage Examples

Frontend Mode

python launcher.py --mode frontend

Backend Mode

python launcher.py --mode backend --backend-mode unified

Advanced Configuration

python launcher.py --mode backend \
  --backend-mode unified \
  --api-type claude \
  --temperature 0.7

Interactive Commands

When running in backend mode, the CLI provides interactive commands:

Conversation Control

From launcher.py:189-215 and similar sections:
CommandAliasesDescription
quitexit, qExit the program
historyhView conversation history
clearcClear conversation context

Example Session

$ python launcher.py --mode backend --backend-mode unified

🤖 RepoMaster Multi-Agent System Ready!

🤖 Please describe your task: Analyze the FastAPI repository structure
🔧 Intelligent task analysis...
   📊 Selecting optimal processing method...

📋 Task execution result:
[Agent analysis output...]

🤖 Please describe your task: history
[Conversation history displayed...]

🤖 Please describe your task: clear
Conversation history cleared.

🤖 Please describe your task: quit
👋 Multi-Agent system service stopped

Environment Setup

Prerequisites Check

From launcher.py:50-113, the launcher automatically checks:
  1. Environment file (configs/.env)
  2. Required API keys (SERPER_API_KEY, JINA_API_KEY)
  3. PYTHONPATH configuration
The launcher will exit with helpful error messages if:
  • Configuration file is missing (suggests copying from env.example)
  • Required API keys are not set
  • Configuration validation fails (unless --skip-config-check is used)

Configuration File Setup

If the .env file is missing, you’ll see:
⚠️  Configuration file not found!
📝 Please copy the example configuration file:
   cp configs/env.example configs/.env
   Then edit configs/.env with your API keys
💡 See README.md or USAGE.md for detailed setup instructions

Missing API Keys

If required keys are missing:
⚠️  Missing required API keys in .env file: SERPER_API_KEY, JINA_API_KEY
📝 Please edit configs/.env and add the missing keys
💡 See README.md or USAGE.md for API key setup instructions

Logging and Debugging

Log Levels

From launcher.py:38-48, available log levels:
LevelUsageOutput
DEBUGDevelopment, troubleshootingAll messages including library internals
INFONormal operationStatus updates and important events
WARNINGProduction (default)Warnings and errors only
ERRORMinimal outputErrors only

Enable Debug Logging

python launcher.py --mode backend \
  --backend-mode unified \
  --log-level DEBUG
Debug logging is automatically filtered for noisy third-party libraries:
  • autogen.oai.client - Set to ERROR level
  • langchain_community.utils.user_agent - Set to ERROR level

Startup Sequence

From launcher.py:490-580, the launcher follows this sequence:
  1. Display CLI logo (optional)
  2. Setup environment
    • Configure PYTHONPATH
    • Load .env file
    • Validate API keys
  3. Parse command-line arguments
  4. Configure logging
  5. Validate API configuration (unless skipped)
  6. Create configuration manager
  7. Print startup panel with status
  8. Launch selected mode

Error Handling

Common Errors

Configuration Errors

 Startup failed: Unsupported running mode: invalid_mode
Solution: Use --mode frontend or --mode backend

Backend Mode Missing

 Startup failed: Unsupported backend mode: invalid_backend
Solution: Specify valid --backend-mode (unified, deepsearch, general_assistant, repository_agent)

Environment Issues

 Missing required environment variables: SERPER_API_KEY, JINA_API_KEY
Solution: Configure configs/.env with required API keys

Graceful Shutdown

From launcher.py:573-574, the launcher handles keyboard interrupts:
^C
👋 Program interrupted by user
Agent-specific shutdowns:
  • Deep Search: 👋 Deep Search Agent service stopped (launcher.py:215)
  • Programming Assistant: 👋 Programming Assistant Agent service stopped (launcher.py:284)
  • Repository Agent: 👋 Repository Exploration Agent service stopped (launcher.py:370)
  • Unified Mode: 👋 Multi-Agent system service stopped (launcher.py:435)

Shell Script Shortcuts

RepoMaster includes a run.sh script for convenient access:
bash run.sh frontend

Best Practices

Development Workflow

For development:
python launcher.py --mode backend \
  --backend-mode unified \
  --log-level DEBUG \
  --work-dir ./dev-workspace

Production Deployment

For production:
python launcher.py --mode frontend \
  --streamlit-host 0.0.0.0 \
  --streamlit-port 8501 \
  --api-type openai \
  --log-level WARNING

Automated Scripts

For automation, use --skip-config-check to avoid interactive prompts:
python launcher.py --mode backend \
  --backend-mode unified \
  --skip-config-check

Performance Tuning

Model Temperature

Adjust creativity vs consistency:
# More deterministic (recommended for code)
python launcher.py --mode backend \
  --backend-mode unified \
  --temperature 0.1

# More creative (better for brainstorming)
python launcher.py --mode backend \
  --backend-mode unified \
  --temperature 0.7

Request Timeouts

# Longer timeout for complex tasks
python launcher.py --mode backend \
  --backend-mode unified \
  --timeout 300

Token Limits

# Increase for longer conversations
python launcher.py --mode backend \
  --backend-mode unified \
  --max-tokens 8000

See Also

Build docs developers (and LLMs) love