Production-ready VS Code sidebar for building high-quality ctxeng context and asking AI providers with secure key storage, live streaming output, and actionable code workflows.
Screenshots

Installation
- Install the Python package:
pip install ctxeng
- Install this extension (
vscode-ctxeng) in VSCode. - Open a project folder.
Features
- CtxEng AI Sidebar
- Dedicated "CtxEng AI" activity bar view with provider/model selection, query input, context preview, and AI response panels.
- Context Build + Explain
Build Contextrunsctxeng build --fmt markdown.Explain Current Filescopes context to the active file.
- Live Loading States
- Shows
⏳ Building context...and⏳ Asking AI.... - Disables actions while tasks are running and restores controls on success/error.
- Shows
- Streaming AI Responses
- Streams tokens/chunks in real time for providers with streaming APIs.
- Gracefully falls back to non-streaming providers.
- Clickable File Navigation
- Selected files in the sidebar open directly in editor and are revealed in Explorer.
- Diff View for AI Suggestions
Show Diffcompares original selected code (or full file) with AI-generated suggestion using VS Code diff.
- Metrics Dashboard
- Live Tokens / Estimated Cost / Files count from parsed
ctxengoutput.
- Live Tokens / Estimated Cost / Files count from parsed
- Secure API Keys
- Keys are stored in VS Code
SecretStorage(never in settings).
- Keys are stored in VS Code
- Provider Support
- OpenAI, Anthropic, Gemini, Mistral, Groq, Cohere, Together, DeepSeek, Ollama, xAI, OpenRouter.
Commands
ctxeng.buildContextctxeng.buildContextCurrentFilectxeng.watchContextctxeng.showSummaryctxeng.setApiKeyctxeng.clearApiKeyctxeng.listConfiguredProviders
Configuration
ctxeng.aiProvider(default:openai)ctxeng.aiModel(default:gpt-4o-mini)ctxeng.ollamaBaseUrl(default:http://localhost:11434)ctxeng.ollamaModels(default:["llama3","mistral","codellama","phi3"])ctxeng.openrouterModel(default:anthropic/claude-3.5-sonnet)ctxeng.openrouterSiteName(default:CtxEng VS Code)ctxeng.model(default:claude-sonnet-4)ctxeng.format(default:markdown)ctxeng.autowatch(default:false)