Skip to main content

/setup - First-Time Configuration

Interactive wizard that guides you through initial Mega Brain setup: dependency verification, API key configuration, and connection validation.

Syntax

/setup
This command auto-triggers on first use if .env file is missing.

What It Does

The setup wizard performs 7 sequential steps:
  1. Python verification - Checks for Python 3.10+
  2. Node.js verification - Checks for Node.js 18+
  3. Python dependencies - Installs from requirements.txt
  4. API key configuration - Interactive prompts for each service
  5. Connection validation - Tests each API endpoint
  6. Generate .env file - Saves configuration
  7. Display onboarding - Shows JARVIS operational briefing

Step-by-Step Process

Step 1: Python Verification

python --version
# or
python3 --version
Expected Output:
✓ Python 3.10.5 found
If Not Found:
✗ Python 3.10+ required
  Install from: https://python.org
Setup will stop if Python 3.10+ is not found. This is a hard requirement.

Step 2: Node.js Verification

node --version
Expected Output:
✓ Node.js v18.17.0 found
If Not Found:
✗ Node.js 18+ required
  Install from: https://nodejs.org

Step 3: Python Dependencies

Automatically installs required Python packages:
pip install -r requirements.txt
Key Dependencies:
  • youtube-transcript-api - For YouTube video transcription
  • voyageai - For semantic embeddings
  • anthropic - For Claude API (optional)
  • PyYAML - For configuration parsing

Step 4: API Key Configuration

Interactive prompts for each service:

Required: OpenAI API Key

OPENAI_API_KEY (REQUIRED)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The OpenAI API provides Whisper for automatic
transcription of YouTube videos and audio files.

Essential for /ingest to work with videos.

Get your key at:
https://platform.openai.com/api-keys

Enter your OpenAI API key:
OPENAI_API_KEY
string
required
OpenAI API key for Whisper transcription. Get it from platform.openai.com
VOYAGE_API_KEY (RECOMMENDED)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Voyage AI provides advanced semantic search.

Allows Conclave and agents to find evidence
in your ingested materials.

Get your key at:
https://dash.voyageai.com/api-keys

Enter your Voyage AI API key (or press Enter to skip):
VOYAGE_API_KEY
string
Voyage AI API key for semantic embeddings. Get it from dash.voyageai.com

Optional: Anthropic API Key

ANTHROPIC_API_KEY (OPTIONAL)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOT needed if you use Claude Code with Max/Pro.

Only required for standalone scripts outside
Claude Code.

Get your key at:
https://console.anthropic.com/settings/keys

Enter your Anthropic API key (or press Enter to skip):
ANTHROPIC_API_KEY
string
Anthropic API key for Claude access. Only needed for standalone scripts. Get it from console.anthropic.com

Optional: Google Drive Credentials

GOOGLE_CLIENT_ID + GOOGLE_CLIENT_SECRET (OPTIONAL)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For importing content directly from Google Drive
(PDFs, documents, spreadsheets).

Configure at:
https://console.cloud.google.com/apis/credentials

Enter your Google Client ID (or press Enter to skip):
GOOGLE_CLIENT_ID
string
Google OAuth client ID for Drive import
GOOGLE_CLIENT_SECRET
string
Google OAuth client secret for Drive import

Step 5: Connection Validation

Tests each configured API:
═══════════════════════════════════════════════════════════════
 🔌 CONNECTION VALIDATION
═══════════════════════════════════════════════════════════════

  OpenAI (Whisper):  ✓ Connected (gpt-3.5-turbo available)
  Voyage AI (RAG):   ✓ Connected (voyage-2 model ready)
  Anthropic API:     ⏭️  Skipped
  Google Drive:      ⏭️  Skipped

═══════════════════════════════════════════════════════════════
Validation Tests:
  • OpenAI: Lists available models via /v1/models
  • Voyage AI: Tests embedding generation
  • Anthropic: Simple message test
  • Google Drive: OAuth token verification

Step 6: Generate .env File

Creates .env in project root:
# Mega Brain Configuration
# Generated: 2026-03-06T10:30:00Z

# OpenAI API (REQUIRED)
OPENAI_API_KEY=sk-...

# Voyage AI API (RECOMMENDED)
VOYAGE_API_KEY=pa-...

# Anthropic API (OPTIONAL)
# ANTHROPIC_API_KEY=

# Google Drive (OPTIONAL)
# GOOGLE_CLIENT_ID=
# GOOGLE_CLIENT_SECRET=
If .env already exists, setup will ask before overwriting:
⚠️  .env file already exists
Overwrite existing configuration? [y/N]

Step 7: Onboarding Dashboard

Displays JARVIS operational briefing:
╔═══════════════════════════════════════════════════════════════════════════════╗
║                                                                               ║
║     ██╗ █████╗ ██████╗ ██╗   ██╗██╗███████╗                                  ║
║     ██║██╔══██╗██╔══██╗██║   ██║██║██╔════╝                                  ║
║     ██║███████║██████╔╝██║   ██║██║███████╗                                  ║
║██   ██║██╔══██║██╔══██╗╚██╗ ██╔╝██║╚════██║                                  ║
║╚█████╔╝██║  ██║██║  ██║ ╚████╔╝ ██║███████║                                  ║
║ ╚════╝ ╚═╝  ╚═╝╚═╝  ╚═╝  ╚═══╝  ╚═╝╚══════╝                                  ║
║                                                                               ║
║                   AI KNOWLEDGE MANAGEMENT SYSTEM                              ║
║                          v1.3.0 - INITIALIZED                                 ║
║                                                                               ║
╚═══════════════════════════════════════════════════════════════════════════════╝

┌─ SYSTEM STATUS ───────────────────────────────────────────────────────────────┐
│                                                                               │
│  Processing Pipeline:    ░░░░░░░░░░░░░░░░  0%                                │
│  Knowledge Base:         ░░░░░░░░░░░░░░░░  0% (0 sources)                    │
│  Mind Clone Agents:      ░░░░░░░░░░░░░░░░  0% (0 active)                     │
│  RAG Index:              ░░░░░░░░░░░░░░░░  Not indexed                        │
│                                                                               │
└───────────────────────────────────────────────────────────────────────────────┘

┌─ NEXT STEPS ──────────────────────────────────────────────────────────────────┐
│                                                                               │
│  1. Ingest your first material:                                              │
│     /ingest https://youtube.com/watch?v=VIDEO_ID                              │
│                                                                               │
│  2. Process through the pipeline:                                            │
│     /process-jarvis "inbox/PERSON/TYPE/filename.txt"                          │
│                                                                               │
│  3. Check system status anytime:                                             │
│     /jarvis-briefing                                                          │
│                                                                               │
└───────────────────────────────────────────────────────────────────────────────┘

"All systems operational, sir. Ready to begin knowledge ingestion."

Error Handling

Required Steps Fail

If Python or Node.js verification fails, setup stops immediately:
✗ SETUP FAILED

Python 3.10+ is required but not found.

Please install Python from https://python.org
Then run /setup again.

Optional Steps Fail

If optional API keys fail validation, setup continues:
⚠️  Voyage AI connection failed: Invalid API key

You can continue without Voyage AI, but semantic
search will not be available.

Reconfigure later by running /setup again.

Continue? [Y/n]

Partial Configuration

If user cancels mid-setup, partial progress is saved:
⚠️  Setup cancelled by user

Partial configuration saved to .env:
  ✓ OPENAI_API_KEY
  ✗ VOYAGE_API_KEY (not configured)

Run /setup again to complete configuration.

Reconfiguration

To update your configuration:
# Run setup again (will detect existing .env)
/setup

# Choose to overwrite or keep existing values

Configuration File Location

mega-brain/
├── .env                    # Your configuration (gitignored)
├── .env.example            # Template with descriptions
└── bin/templates/
    └── env.example         # Used by setup wizard

Validation Commands

After setup, verify configuration:
# Should list available models
curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY"

Troubleshooting

Python Not Found

Issue: python: command not found Solution:
# On macOS/Linux
brew install python3

# On Windows
winget install Python.Python.3.11

pip Install Fails

Issue: Permission denied during pip install Solution:
# Use --user flag
pip install --user -r requirements.txt

API Key Invalid

Issue: Invalid API key during validation Solution:
  1. Check for extra spaces in key
  2. Verify key is active in provider dashboard
  3. Ensure key has correct permissions
  4. Re-run /setup to enter correct key

.env Permission Issues

Issue: Cannot write .env file Solution:
# Check file permissions
ls -la .env

# Fix permissions
chmod 600 .env

Security Notes

NEVER commit .env to version controlThe .env file contains sensitive API keys and is automatically gitignored.

Best Practices

  1. Use environment-specific keys - Different keys for dev/prod
  2. Rotate keys regularly - Update keys every 90 days
  3. Limit key permissions - Only grant necessary scopes
  4. Monitor usage - Check API dashboards for unusual activity

Next Steps

Ingest Command

Add your first material to the system

JARVIS Briefing

Check your system status

Architecture

Understand how Mega Brain works

API Keys Guide

Detailed API key configuration

Build docs developers (and LLMs) love