CLI Commands
Mega Brain provides a comprehensive CLI for installation, setup, and system management.Installation
Commands
install
Install Mega Brain into a new or existing project.Optional project name. If omitted, uses current directory name.
- Creates directory structure (
core/,agents/,.claude/, etc.) - Copies templates and hooks
- Initializes
.envfile - Sets up git repository with layer system
bin/mega-brain.js:65-67
setup
Interactive setup wizard for API keys and dependencies. Usage:- Prompts for API keys (OpenAI, Voyage, Google)
- Validates credentials
- Writes to
.envfile - Installs Python dependencies
- Runs system health check
.env is missing
Location: bin/mega-brain.js:95-97
validate
Validate MoneyClub email for Premium access.Email address to validate
- Exit code
0: Email valid - Exit code
1: Email invalid
bin/mega-brain.js:68-77
push
Push changes to Layer 1/2/3 remote repositories.Specific layer to push (1, 2, or 3). If omitted, pushes current layer.
- Layer 1 (Community): Public shell - core templates, hooks, and CLI
- Layer 2 (Premium): Shell + brain - includes agents and knowledge base
- Layer 3 (Personal): Full backup - includes sensitive data and personal agents
bin/mega-brain.js:78-80
upgrade
Upgrade from Community to Premium version. Usage:- Validates MoneyClub membership
- Downloads Premium assets
- Updates agent registry
- Enables Pro features
bin/mega-brain.js:81-88
status
Show Pro license status and feature availability. Usage:bin/mega-brain.js:89-91
features
List available vs locked features. Usage:bin/mega-brain.js:92-94
—help
Show help message with all available commands. Usage:bin/mega-brain.js:105-131
Environment Variables
All configuration is managed through.env file:
OpenAI API key for Whisper transcription. Required for pipeline processing.
Voyage AI API key for semantic embeddings and RAG search. Recommended for knowledge retrieval.
Google OAuth client ID for Drive import functionality. Optional.
Google OAuth client secret for Drive import. Optional.
Not required when using Claude Code. Only needed for direct API usage.
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
100 | Timeout (2 minutes) |
Notes
The CLI uses Node.js 21+ native
.env loading. No external dependencies required.