AI IDE Extension
A production-oriented VS Code extension scaffold that provides Cursor-style planning, staged file generation, per-file accept/decline, model and agent selection, command preview/confirm, and streaming AI responses.
About
Brift is an AI coding assistant for VS Code focused on real development workflows, not one-shot code dumps.
It helps you plan tasks, generate and review file changes safely, run commands with approval, and iterate quickly inside your workspace.
Brift supports built-in models plus custom model endpoints, context-aware prompting with @ file attachments, and practical coding modes such as deep thinking and deep search.
Features
- Structured TODO planning before code generation
- Fast planning mode with direct generation flow
- Strict JSON parsing in code mode
- Multi-file and folder proposal preview
- Per-file Accept / Decline and Accept All
- Native VS Code diff preview per file
- Model selector (GPT-4.1, GPT-4.1 Mini, Claude 3.5, Ollama, Custom API)
- Agent selector (Architect, Fast Coder, Refactor, Debug, Test Writer)
- Terminal command preview and explicit confirmation
- Workspace-safe guards for paths,
.env, dangerous commands, and config edits
- React + Tailwind webview UI with streaming and token usage indicator
Project Structure
ai-ide-extension/
├── src/
│ ├── extension.ts
│ ├── planner.ts
│ ├── agentRouter.ts
│ ├── fileManager.ts
│ ├── diffManager.ts
│ ├── commandRunner.ts
│ ├── contextManager.ts
│ ├── modelManager.ts
│ ├── webview/
│ │ ├── App.tsx
│ │ ├── components/
│ │ └── styles/
│ └── test/
├── package.json
├── tsconfig.json
└── README.md
Setup
- Install dependencies:
npm install
- Build extension and webview assets:
npm run build
- Type-check and run tests:
npm run typecheck
npm run test
- Open this folder in VS Code and press
F5 to launch the extension development host.
Configuration
Set provider credentials using Brift Settings -> Models (stored in VS Code SecretStorage), or environment variables during development:
OPENROUTER_API_KEY for built-in Brift models
CUSTOM_API_KEY (or configured aiIdeExtension.customApi.apiKeyEnv) for custom endpoint models
Optional settings:
aiIdeExtension.customApi.baseUrl
aiIdeExtension.customApi.model
aiIdeExtension.customApi.headerName
aiIdeExtension.ollama.model
Safety Rules
- File writes are blocked outside workspace root.
.env* paths are blocked from AI edit flow.
- Dangerous shell commands are blocked.
- Config file edits require explicit user confirmation.
- Commands are never auto-run.
- File edits are never auto-applied.