Interactive Setup Wizard
The setup wizard provides a guided configuration experience for first-time setup.
Running the Wizard
pnpm setup-wizard
What the Wizard Configures
1. Database Connection
The wizard prompts for your PostgreSQL connection string:
? Enter your DATABASE_URL:
> postgresql://user:password@localhost:5432/smarteravatar
It will test the connection before proceeding.
2. LLM Provider Selection
Choose your preferred LLM provider:
? Select your LLM provider:
❯ Gemini (Recommended - best RAG support)
OpenAI
Anthropic
Each provider has specific configuration:
Gemini:
GEMINI_API_KEY- Your API key from Google AI StudioGEMINI_MODEL- Model to use (default:gemini-2.0-flash)
OpenAI:
OPENAI_API_KEY- Your API key from OpenAI platformOPENAI_MODEL- Model to use (default:gpt-4o)
Anthropic:
ANTHROPIC_API_KEY- Your API key from Anthropic consoleANTHROPIC_MODEL- Model to use (default:claude-sonnet-4-20250514)
3. STT Provider Selection
Choose your speech-to-text provider:
? Select your STT provider:
❯ Whisper (OpenAI)
Deepgram
Whisper:
- Uses your existing
OPENAI_API_KEY - Best accuracy, batch processing
Deepgram:
DEEPGRAM_API_KEY- Your Deepgram API key- Real-time streaming support
4. Avatar Configuration
Configure HeyGen LiveAvatar:
? Enter your HeyGen API key:
> [your-api-key]
? Enter your Avatar ID:
> Pedro_Blue_Shirt_public
? Enter your Voice ID:
> [your-voice-id]
5. Branding (Optional)
The wizard can set up basic branding:
? Company name:
> Your Company
? Primary color (hex):
> #2563eb
? Welcome message:
> Hello! How can I help you today?
Generated Configuration
The wizard creates a .env file with all your settings:
# Database
DATABASE_URL="postgresql://..."
# LLM
LLM_PROVIDER=gemini
GEMINI_API_KEY=AIza...
# STT
STT_PROVIDER=whisper
OPENAI_API_KEY=sk-...
# Avatar
LIVEAVATAR_API_KEY=...
NEXT_PUBLIC_AVATAR_ID=Pedro_Blue_Shirt_public
NEXT_PUBLIC_VOICE_ID=...
# Branding
NEXT_PUBLIC_COMPANY_NAME=Your Company
After the Wizard
-
Initialize the database:
pnpm db:setup -
Start the development server:
pnpm dev -
Upload your knowledge base via the admin panel at
/admin-analytics
Re-running the Wizard
To reconfigure, simply run the wizard again:
pnpm setup-wizard
It will detect existing configuration and ask if you want to update specific sections.
Manual Override
You can always edit .env directly after running the wizard. Changes take effect after restarting the development server.