Demian for VS Code
Demian brings a local coding-agent workspace into VS Code. It gives you a
chat panel that can understand your current file, attach project context, ask
permission before side effects, show work plans, review changed files, and run
Demian's terminal-grade agent runtime without leaving the editor.
Default language: English
Additional locale: 한국어
What You Can Do
- Ask questions about the current file or the whole workspace.
- Mention files and folders with
@.
- Attach text files and images to the next message.
- Switch agent, provider, model, and working directory from the composer.
- Configure providers, model profiles, and cowork routing from a dedicated editor panel.
- Review tool calls, runtime diagnostics, and progress in compact accordions.
- Approve or deny commands and file changes inline.
- Use
/goal for verified long-running objectives.
- Use
/cowork to coordinate multiple bounded sub agents.
- Review changed files through VS Code diff views.
- Keep conversations under
~/.demian and choose a working directory per
conversation.
Requirements
- VS Code 1.85 or newer.
- Node.js 22.18 or newer on your PATH, or set
demian.nodePath.
- At least one Demian provider configured.
- Optional: Claude Code installed locally if you want the
claudecode
provider.
Claude Code is not bundled with the extension. If you want to use it:
npm install -g @anthropic-ai/claude-code
The default Claude Code path in Demian config is ~/.local/bin/claude; adjust
your Demian config if your installation uses a different path.
Quickstart
Install Demian from the Visual Studio Marketplace.
Open a workspace folder in VS Code.
Run Demian: Open Sidebar from the Command Palette.
Choose an agent, provider, and model in the composer.
Ask your first question:
Summarize this project and point me to the main entry points.
If Demian asks for permission, review the command or file operation and
choose Allow once, Always allow, or Deny.
Tutorial: Make a Small Code Change
Open the file you want Demian to understand.
Demian includes the active editor file as hidden context by default. Use the
eye button in the composer to turn that context off.
Ask for a focused change:
Add validation for an empty email field. Keep the change minimal and explain the files you touch.
Review tool and diagnostic accordions.
Demian folds routine tool calls and runtime diagnostics so the conversation
stays readable. Expand them when you want details.
Approve edits only when they match your intent.
Open the diff panel to review changed files in VS Code.
Ask Demian to verify:
Run the relevant tests and summarize the result.
Tutorial: Work With Files and Images
- Type
@ in the prompt to search workspace files and folders.
- Use the
+ button to attach files.
- Attach images for UI review, screenshots, diagrams, or error captures.
- Text-like attachments are included as context.
- Other file types are copied into
.demian/vscode-attachments/ so tools can
reference them.
Example:
@src/login.ts Please review this flow. I attached a screenshot of the failing UI state.
Goal Mode
Use /goal when the work should continue until Demian verifies completion.
/goal Refactor the settings loader, update docs, and finish only after checks pass.
The goal island shows progress, status, pause/restart controls, and clear
controls. Demian should mark the goal complete only after verification.
Cowork Mode
Use /cowork when you want Demian to coordinate multiple specialist workers and
merge their findings.
/cowork Have one agent inspect the API layer and another inspect the UI. Compare the likely root causes.
Demian remains the main coordinator. The cowork members are bounded sub agents,
and their results are synthesized into the final answer.
The default cowork routing uses Codex-backed agents for planning, architecture,
research synthesis, and supervisory review, then uses Claude-Code-backed agents
for bounded implementation, detailed code review, and specialist local-repo
work. Open Demian: Configure Providers to tune participating cowork
providers, agent-specific provider priority, fallback/repair behavior, and
permission overlay defaults without editing JSON directly.
Providers
Demian can work with:
- OpenAI-compatible endpoints
- Anthropic API
- Codex
- Claude Code
- Ollama
- LM Studio
- vLLM
- llama.cpp
- OpenRouter
- Together
- Groq
- Gemini through its OpenAI-compatible endpoint
- Azure OpenAI-compatible deployments
Provider defaults come from Demian config. Common locations:
~/.demian/config.json
~/.demian/config.jsond
.demian/config.json
.demian/config.jsond
Use Demian: Configure Providers to open a full editor-panel setup UI. If no
config exists, the panel creates ~/.demian/config.json, then lets you set the
default provider, edit provider connection fields, add provider presets, and add
or promote model profiles. Existing configured model profiles are shown in their
own section and can be loaded into the form for editing. The same panel includes
Cowork routing controls for provider participation, agent priority order,
fallback/repair policy, and permission overlay default decisions.
The same config can also be changed from quick commands: Demian: Create
Config, Demian: Open Config, Demian: Add Provider, and Demian: Add
Model.
Example:
{
"defaultProvider": "openai",
"providers": {
"openai": {
"type": "openai-compatible",
"baseURL": "https://api.openai.com/v1",
"apiKey": "",
"apiKeyEnv": "OPENAI_API_KEY",
"modelProfiles": [
{ "name": "main", "displayName": "GPT 5.5", "model": "gpt-5.5" }
]
}
}
}
Leave apiKey empty and prefer apiKeyEnv for shared config. Paste into apiKey only for local private config.
Providers that can expose many local or self-hosted models, such as lmstudio, ollama-local, ollama-cloud, llamacpp, and vllm, use modelProfiles with one entry per model shown in the model selector.
Working Directories and Conversation Storage
Demian stores VS Code conversations under ~/.demian. Each conversation maps to
a working directory. The directory selector under the composer lets you:
- use the current VS Code workspace folder
- switch between workspace folders in multi-root workspaces
- switch to a recently used Demian working directory
- choose another folder
- add workspace paths for the current conversation, up to five directories total
The selected directory is where Demian runs tools and resolves project config. In
multi-root VS Code workspaces, Demian lists at most the first five workspace
folders as working directory choices.
Commands
Open the Command Palette and search for Demian:
- Demian: Open Sidebar
- Demian: Open Command Menu
- Demian: New Session
- Demian: Stop Current Task
- Demian: Open in Terminal
- Demian: Create Config
- Demian: Open Config
- Demian: Configure Providers
- Demian: Add Provider
- Demian: Add Model
- Demian: Login Codex
- Demian: Focus Input
- Demian: Mention Selection
- Demian: Mention Active File
- Ask to Demian (Selection)
- Ask to Demian (File)
Default keybindings:
Cmd+Alt+D on macOS, Ctrl+Alt+D on Windows/Linux: open Demian and focus the composer.
Cmd+Alt+N on macOS, Ctrl+Alt+N on Windows/Linux: start a new Demian session.
Cmd+Alt+A on macOS, Ctrl+Alt+A on Windows/Linux: ask Demian about the selected editor text.
Cmd+Alt+K on macOS, Ctrl+Alt+K on Windows/Linux: mention selected editor text.
These defaults are disabled while the integrated terminal has focus.
Useful Settings
demian.nodePath: Node executable for the worker.
demian.runtimeSource: bundled by default; use global only to test a local/global demian-cli runtime.
demian.runtimePath: optional package directory or worker module path when demian.runtimeSource is global.
demian.defaultAgent: initial agent.
demian.defaultMode: single-agent or multi-agent.
demian.defaultProvider: initial provider.
demian.defaultModel: initial model.
demian.sandbox: off, read-only, or workspace-write.
demian.streaming: use provider streaming when available.
demian.persistentGrants: persist "always allow" permission grants.
demian.configPath: extra Demian config path.
demian.maxTurns: override the high-level task turn limit. Tool-use rounds use a separate safety limit.
demian.context.maxContextTokens: override context budget.
demian.context.compactAtRatio: override compaction threshold.
demian.composerEnterBehavior: send with Enter, or use Cmd/Ctrl+Enter for
multiline-friendly composing.
demian.preferredLocation: secondary sidebar or activity bar.
demian.logLevel: extension output channel log level.
Troubleshooting
The panel cannot start Demian
Check Node:
node --version
If VS Code cannot find the right Node executable, set demian.nodePath. The extension uses its bundled runtime by default; switch demian.runtimeSource to global only when testing a separate demian-cli install.
Claude Code fails to start
Check your Claude Code install:
~/.local/bin/claude --version
If your binary is elsewhere, update the claudecode provider cliPath in your
Demian config.
Cowork routing does not match your expectation
Run Demian: Configure Providers and check the Cowork routing section. The
provider must be enabled in the participating provider list before an agent can
use it. Write tasks intentionally do not fall back to another provider after
partial file changes; Demian uses the configured write repair policy instead.
The model or provider list looks wrong
Open or create a Demian config file in your user home or workspace. The VS Code
extension reads the same config as the terminal package.
Routine tool calls and runtime diagnostics are folded into accordions. Expand
them only when you want details.
License
Apache-2.0