Personal AI chat assistant with access to all models (OpenAI, Gemini, Claude, xAI, Perplexity, and more), mid-chat model switching, conversation branching, and transparent cost tracking.
- All Models in One Place: Access GPT-5, Claude Opus 4.5, Gemini 2.5 Pro, Grok, and 50+ models via Vercel AI Gateway
- Mid-Chat Model Switching: Compare responses or switch models without losing context
- Conversation Branching: Fork conversations to explore different directions
- Resilient Generation: Responses survive page refresh, tab close, even browser crashes
- RAG Memory: Automatic semantic memory extraction and retrieval
- Voice Input: Audio transcription with Whisper (OpenAI/Groq)
- AI Tools: Web search (Tavily), code execution (E2B), URL parsing (Jina)
- Cost Tracking: Per-message token usage and cost breakdown
- Shared Workspaces: Multi-user projects, shared conversations, and project notes
Chat with AI models directly from your terminal.
# Shell (macOS/Linux)
curl -fsSL https://blah.chat/install | bash
# npm
npm i -g @blah-chat/cli
# Homebrew (coming soon)
brew install planetaryescape/tap/blah# First time: authenticate via browser
blah login
# Start chatting
blah "What is the capital of France?"
blah --model claude-3-opus "Explain quantum computing"
blah --help
Dark mode |
Light mode |
blah.chat requires API keys for certain features:
AI_GATEWAY_API_KEY- Vercel AI Gateway for all AI model access
Requires ONE of the following providers (configured by admin in Settings):
GROQ_API_KEY- Groq Whisper Turbo (default, $0.04/hour)OPENAI_API_KEY- OpenAI Whisper ($0.006/min)DEEPGRAM_API_KEY- Deepgram Nova-3 ($0.0077/min)ASSEMBLYAI_API_KEY- AssemblyAI ($0.0025/min)
DEEPGRAM_API_KEY- Deepgram Aura voices (required)
Note: If STT/TTS API keys are not configured, these features will be automatically disabled. Users will see an error message when attempting to enable them:
- Development: Specific missing key name shown
- Production: "Please contact your administrator" message
See the Self-Hosting Guide for full environment variable setup.
Run the web app plus Postgres, Redis, Redis HTTP, and MinIO locally:
cp docker/env.example .env.docker
# Edit .env.docker with real Clerk, AI Gateway, and Trigger.dev values.
BLAH_CHAT_ENV_FILE=.env.docker docker compose upSee docker/README.md and SELF_HOSTING.md.
Provision Postgres, Redis, R2-compatible storage, Clerk, and Trigger.dev first, then set the production environment variables from docs/operations/production-env-checklist.md.
Railway can host the web app, but you still need to provide the same Postgres, Redis, R2-compatible storage, Clerk, and Trigger.dev environment variables.
For Docker Compose self-hosting/local dev, see docker/README.md. For full instructions on self-hosting, see SELF_HOSTING.md.
blah.chat is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
Self-hosted usage: Free under AGPL-3.0 with default limits (50 messages/day, $10/month budget per user). Commercial usage (exceeding limits or without source disclosure): Requires commercial license. Cloud version: Coming soon with subscription plans.
For commercial licensing or questions, contact: blah.chat@bhekani.com
We chose AGPL to:
- Protect the community from exploitation by cloud providers
- Ensure improvements are shared back with the community
- Allow free self-hosting while building a sustainable business
If you modify blah.chat and run it as a network service, AGPL Section 13 requires you to provide users with access to your modified source code.
This is the cleanest local setup because it runs the app and infrastructure in one compose project:
cp docker/env.example .env.docker
# Edit .env.docker with real external service keys.
BLAH_CHAT_ENV_FILE=.env.docker docker compose upOpen http://localhost:3000.
Run the Trigger.dev worker container when you have Trigger auth configured:
BLAH_CHAT_ENV_FILE=.env.docker docker compose --profile jobs upStart dependencies only:
docker compose -f docker-compose.dev.yml up -dCreate host env and run the app:
cp docker/env.example .env.local
# Edit .env.local with real external service keys.
bun install
bun run db:migrate
bun devOpen http://localhost:3000.
Core Services
- Vercel AI Gateway (
AI_GATEWAY_API_KEY): Required for all AI model inference (or every user must enable BYOK). - Clerk (
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,CLERK_SECRET_KEY,CLERK_ISSUER_DOMAIN,CLERK_WEBHOOK_SECRET): User authentication and webhook user-sync. - Postgres (
DATABASE_URL): Primary database β Neon recommended in production. - Upstash Redis (
UPSTASH_REDIS_REST_URL,UPSTASH_REDIS_REST_TOKEN): Live generation event log and cache. - Cloudflare R2 (
R2_ACCOUNT_ID,R2_ACCESS_KEY_ID,R2_SECRET_ACCESS_KEY,R2_BUCKET): Attachment + transcription storage. - Trigger.dev (
TRIGGER_SECRET_KEY,TRIGGER_API_URL,INTERNAL_TASK_SECRET,INTERNAL_TASK_BASE_URL): Durable generation workers and recovery cron. - Encryption (
BYOD_ENCRYPTION_KEY): Encrypts user BYOK provider keys and BYOD connection strings β long-lived, do not rotate without re-encrypting stored credentials.
AI Tools & Integrations
- Tavily (
TAVILY_API_KEY): Enables real-time web search capabilities. - Jina (
JINA_API_KEY): Used by the URL Reader tool to parse web pages into markdown. - E2B (
E2B_API_KEY): Powers the code interpreter sandbox for executing code safely. - Firecrawl (
FIRECRAWL_API_KEY): Optional alternative for advanced web scraping/crawling. - OpenAI (
OPENAI_API_KEY): Needed for audio transcription (Whisper) if not using Groq.
See docs/operations/production-env-checklist.md
for the canonical list derived from parsePersistenceEnv. Before promoting
to production, every "Required" entry must be set and /api/v1/health must
return 200 with database, redis, r2, and trigger all "ok".
Clerk webhooks sync user data into Postgres. Without this, first sign-in may fail until the app can fetch and create the user from Clerk.
Since Clerk needs to reach your local server, set up a tunnel:
-
Start a tunnel (choose one):
# Using ngrok ngrok http 3000 # Using cloudflared cloudflared tunnel --url http://localhost:3000
-
Configure webhook in Clerk Dashboard:
- Go to Clerk Dashboard β Webhooks β Add Endpoint
- Set endpoint URL:
https://your-tunnel-url.ngrok.io/api/webhooks/clerk - Subscribe to events:
user.created,user.updated,user.deleted - Copy the Signing Secret
-
Add to your env file (
.env.dockeror.env.local):CLERK_WEBHOOK_SECRET=whsec_your_signing_secret_here CLERK_ISSUER_DOMAIN=your-clerk-frontend-url.clerk.accounts.dev
Important:
CLERK_ISSUER_DOMAINis your Clerk Frontend API URL (found in Clerk Dashboard β API Keys β Frontend API). Format:your-app-name.clerk.accounts.devfor development,clerk.yourdomain.comfor production.
Tip: Use a static ngrok URL (free tier includes one) to avoid reconfiguring the webhook each session:
ngrok http 3000 --domain=your-static-subdomain.ngrok-free.appSet this up once in the Clerk dashboard and you're done.
To access the admin dashboard (/admin):
- In Clerk Dashboard, set your user's
publicMetadata.isAdmintotrue. - Sign out and back in to refresh your session token.
Future admin changes via /admin/users auto-sync to Clerk.
After startup, check:
curl http://localhost:3000/api/v1/healthFor full functionality, database, redis, r2, and trigger should all report ok.

