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

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

Expected Output:
If Not Found:
Setup will stop if Python 3.10+ is not found. This is a hard requirement.

Step 2: Node.js Verification

Expected Output:
If Not Found:

Step 3: Python Dependencies

Automatically installs required Python packages:
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

string
required
OpenAI API key for Whisper transcription. Get it from platform.openai.com
string
Voyage AI API key for semantic embeddings. Get it from dash.voyageai.com

Optional: 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

string
Google OAuth client ID for Drive import
string
Google OAuth client secret for Drive import

Step 5: Connection Validation

Tests each configured API:
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:
If .env already exists, setup will ask before overwriting:

Step 7: Onboarding Dashboard

Displays JARVIS operational briefing:

Error Handling

Required Steps Fail

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

Optional Steps Fail

If optional API keys fail validation, setup continues:

Partial Configuration

If user cancels mid-setup, partial progress is saved:

Reconfiguration

To update your configuration:

Configuration File Location

Validation Commands

After setup, verify configuration:

Troubleshooting

Python Not Found

Issue: python: command not found Solution:

pip Install Fails

Issue: Permission denied during pip install Solution:

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:

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