devbrain-ai
v0.1.0
Published
Your AI-powered developer brain in the terminal
Downloads
12
Maintainers
Readme
🧠 DevBrain AI
The AI-powered developer terminal. No dashboards. No subscriptions. Just your terminal.
DevBrain AI is a zero-friction CLI toolbox that brings the intelligence of frontier LLMs directly into your Git workflow. No browser tabs. No copy-pasting. No context switching.
It automates the repetitive, diagnoses the painful, and reviews the risky — all from a single command.
✨ Features
| Command | What it does | Status |
| :--- | :--- | :---: |
| brain commit | Analyzes your staged diff and generates a Conventional Commit message | 🟢 Stable |
| brain doctor | Diagnoses shell errors and proposes executable fixes in a recursive loop | 🟢 Stable |
| brain review | AI code review with severity triage on staged changes, branches, or files | 🟢 Stable |
🎬 Demo
brain commit — Generate commit messages from your staged diff

brain review — AI code review with severity triage

brain doctor — Diagnose and fix terminal errors

🧠 Model-Agnostic by Design
DevBrain is not locked to any single AI provider or model. It routes all requests through OpenRouter, giving you access to every major LLM — free or paid — with a single API key.
# Use a powerful free model
brain config --model "qwen/qwen3-8b"
# Switch to GPT-4o for critical reviews
brain config --model "openai/gpt-4o"
# Use DeepSeek for coding tasks
brain config --model "deepseek/deepseek-r1:free"Supported models include: GPT-4o, Claude 3.5 Sonnet, Qwen 3, DeepSeek R1, Llama 3, Gemma 3, and every other model on OpenRouter.
🚀 Getting Started
Prerequisites
- Node.js 20+
- An OpenRouter API key (free tier available)
Installation
npm install -g devbrain-aiConfiguration
Create a .env file in your project root:
OPENAI_API_KEY=sk-or-v1-xxxxxxxxxxxxxxxxxxxx
OPENAI_BASE_URL=https://openrouter.ai/api/v1
DEVBRAIN_PROVIDER=openaiSet your preferred model:
brain config --model "qwen/qwen3-8b"⚠️ Never commit your
.envfile. It is already in.gitignore.
⚡ Quick Usage
# Generate a commit message from staged changes
git add .
brain commit
# Diagnose a failed command
brain doctor "npm install --legacy-peer-deps"
# Review staged changes before committing
brain review
# Review a specific file
brain review src/auth/middleware.ts
# Review against a branch with security focus
brain review --branch main --focus security📐 Architecture
src/
├── commands/ # CLI command handlers (commit, doctor, review)
├── services/ # Prompt engineering and AI orchestration
├── providers/ # LLM provider adapters (OpenRouter/OpenAI-compatible)
├── utils/ # Git utilities, logger, spinner
└── index.ts # CLI entry point (Commander.js)The provider layer is intentionally thin. Adding support for a new LLM provider requires implementing a single chat() interface — nothing else changes.
📖 Documentation
brain commit— Conventional Commits generationbrain doctor— Recursive shell error diagnosisbrain review— AI-powered code review
🗺 Roadmap
- [ ]
brain review --interactive— Apply AI suggestions one by one - [ ]
brain readme— Generate README from codebase - [ ]
brain test— Generate unit tests from implementation - [ ] Multi-provider support (native Anthropic, Google Gemini)
📄 License
MIT © 2026 Xiaozhi (Steven) Xing
