CodeSentinel AI — Code Review & Project Builder
v2.0.0 · AI-powered VS Code extension that reviews your code and builds complete projects from plain English.
🚀 What's New in v2.0.0
| Feature |
Status |
| 🏗️ AI Project Builder — build full Next.js apps from a sentence |
✅ New |
| 🔬 AST Code Validation Engine — compiler-level JSX/TS repair |
✅ New |
| 🛡️ MCP Server — Model Context Protocol integration |
✅ New |
| 🧪 Automated Test Suite — 13 Jest tests for core logic |
✅ New |
| 🔄 CI/CD Pipeline — GitHub Actions on every commit |
✅ New |
| 🔐 Security Hardening — path traversal, command injection prevention |
✅ New |
🏗️ Project Builder — The Flagship Feature
Describe a project in plain English. CodeSentinel builds it for you.
Ctrl+Shift+P → "CodeSentinel: Build Project"
↓
"Build me a dashboard with user management and charts"
↓
AI generates detailed plan → You approve → Full project created → npm install runs
Supported Libraries (125+ components total)
| Library |
Components |
What it's good for |
| shadcn/ui |
65 |
Forms, dialogs, tables, navigation |
| daisyUI |
65 |
Tailwind-first utility components |
| Magic UI |
30 |
Animated backgrounds, particle effects |
| Aceternity UI |
40 |
3D cards, hero sections, parallax |
| Motion Primitives |
50 |
Framer Motion animations |
What Gets Generated
- ✅ Complete Next.js/React folder structure
- ✅ Page components with routing (
app/ directory)
- ✅ Component imports wired up correctly
- ✅ Tailwind CSS + configuration
- ✅
package.json with all dependencies
- ✅
tailwind.config.js, tsconfig.json
- ✅ Automatic
npm install + npx shadcn add
Example Prompts That Work
"Create a SaaS landing page with hero, features, and pricing table"
"Build an e-commerce product catalog with filters and a shopping cart"
"Make a portfolio with animated sections and a contact form"
"Dashboard with user authentication, charts, and data tables"
"Todo app with drag-and-drop and local storage"
Security First
- 🛡️ Path traversal prevention (can't write outside the project folder)
- 🚫 Dangerous command blocking (
rm -rf, fork bombs, etc.)
- 📁 File extension allowlist (only safe file types)
- 🔒 Protected paths (
.git, node_modules, lock files can't be overwritten)
🤖 Multi-Agent Code Review
Select any code → right-click → CodeSentinel: Review Selected Code
Three specialized AI agents work in sequence:
| Agent |
Role |
| Primary Agent |
Detects bugs, anti-patterns, performance issues |
| Security Agent |
Scans for OWASP Top 10 vulnerabilities |
| Validator Agent |
Self-correction loop — re-analyzes if confidence < threshold |
The Validator Agent is unique: if the AI's confidence score falls below your configured threshold, it automatically re-analyzes the code from scratch to eliminate false positives.
🔧 Smart Auto-Fix
- Select broken code → CodeSentinel: Apply Smart Fix
- AI analyzes before patching — no blind substitutions
- Optional diff preview before applying
- One-click undo via VS Code's native undo stack
💬 AI Chat
- Side Panel: Always accessible from the activity bar, persistent chat history
- Full Webview: Pop out to a full panel for deep debugging sessions
- Natural language commands:
"review test.js", "explain this function", "fix this error"
- Configurable history window (10–200 messages)
🎯 Other Commands
| Command |
Description |
CodeSentinel: Build Project |
🏗️ Build full project from description |
CodeSentinel: Review Selected Code |
Multi-agent code review |
CodeSentinel: Apply Smart Fix |
Analyze + fix all issues |
CodeSentinel: Generate Commit Message |
AI conventional commit from staged changes |
CodeSentinel: Generate Documentation |
JSDoc/docstring generation |
CodeSentinel: Generate Unit Tests |
Test case scaffolding (Jest, Vitest, Pytest…) |
CodeSentinel: Generate Code Snippet |
Boilerplate from description |
CodeSentinel: Review Folder |
Recursively review a folder |
CodeSentinel: Review Workspace |
Full workspace analysis |
CodeSentinel: Open AI Chat |
Launch chat panel |
CodeSentinel: Configure API Key |
Save Gemini key to OS keychain |
CodeSentinel: Toggle Debug Mode |
Verbose logging for demos |
⚙️ Setup
Option A — Gemini (Cloud, Recommended)
- Get a free API key: https://aistudio.google.com/app/apikey
Ctrl+Shift+P → CodeSentinel: Configure API Key
- Set
codeSentinel.modelProvider to "gemini" or "auto"
Option B — Ollama (Local / Offline / Free)
- Install Ollama: https://ollama.ai
- Pull a model:
ollama pull deepseek-r1:7b
- Set
codeSentinel.modelProvider to "ollama" or "auto"
The "auto" mode tries Gemini first and falls back to Ollama — best of both worlds.
⚙️ Configuration
{
// Model
"codeSentinel.modelProvider": "auto", // "gemini" | "ollama" | "auto"
"codeSentinel.geminiModel": "gemini-2.0-flash-exp",
"codeSentinel.ollamaModel": "deepseek-r1:7b",
// Project Builder
"codeSentinel.autoInstallDependencies": true, // Auto-run npm install after build
// Chat
"codeSentinel.chatHistoryLimit": 50, // 10-200 messages
// Agents
"codeSentinel.enableSecurityAgent": true,
"codeSentinel.enableValidatorAgent": true,
"codeSentinel.confidenceThreshold": 85, // Self-correction trigger (0-100)
// Auto-fix
"codeSentinel.applyFixesDirectly": false, // true = no confirmation dialog
"codeSentinel.enableStreaming": true,
// Debug
"codeSentinel.debugMode": false
}
🐛 Troubleshooting
Project Builder Issues
| Problem |
Solution |
| Components not installing |
Run npx shadcn@latest init manually first |
| npm install fails |
Check internet, delete node_modules, retry |
| Plan not showing |
Ensure a workspace folder is open and API key is set |
General
- Reload:
Ctrl+Shift+P → "Developer: Reload Window"
- View Logs: View → Output → Select "CodeSentinel AI"
- Node.js version: Must be ≥ 18.0.0
Requirements
- VS Code 1.85.0+
- Node.js 18+
- Gemini API key or Ollama running locally
License
MIT
Links
| |