Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Secure, open, universal terminal coding agent in Rust.
[!TIP] New here? Start with Installation, then Getting Started.
- Overview
- Why VT Code
- Architecture
- Quick start
- What's inside
- Documentation
- Development
- Contributing
- Support
- License
Overview
Secure, open, universal.
VT Code is an open-source terminal coding agent written in Rust: one static binary for quick interactive sessions and long-running autonomous work alike, no IDE required, no context left behind. It is a harness, not just an LLM wrapper: the model reasons; the runtime supplies everything else: tools, context, sandboxing, state, and verification: turning raw model output into safe, reviewable progress, entirely in your terminal.
The full documentation catalog lives in the docs overview.
[!NOTE] Status: Active development. Local inference and some automation flows are experimental and may change between releases.
- Building VT Code, a year in covering harness design, evals, security, and lessons learned.
- Podcast · Video
Why VT Code
VT Code is built for work that takes more than one prompt. The model reasons; the harness supplies everything else — context, tools, safeguards, state, and verification — so long tasks stay dependable and reviewable from the first prompt to the final diff.
In practice, that means:
| What can go wrong | How VT Code responds |
|---|---|
| Long tasks lose focus | Dynamic context assembly, project instructions, auto-compaction, and bounded tool output keep the active window useful. Runtime guidance · Architecture |
| Generated commands can cause damage | Policy checks and sandboxed, fail-closed execution defend against injection, path and symlink escape, and environment leakage. Security model |
| A session is interrupted | Resume with vtcode continue, fork with --session-id, and inspect or restore changes with vtcode snapshots and vtcode revert. Commands |
| “Done” is asserted without proof | Built-in evals verify the environment instead of trusting the agent's report, measured with pass@k and pass^k. Eval guide |
| Big changes ship unreviewed | The Planning Workflow keeps planning read-only: draft with /plan, approve at a review gate, then hand off to build or auto. Planning workflow |
| Edits drift from project conventions | Project instructions (AGENTS.md) are loaded into every turn, so the agent codes to your rules instead of rediscovering them. Getting started |
| Interactive only is not enough | Headless vtcode exec with JSON events, scheduled tasks via vtcode schedule, and isolated eval worktrees support CI, cron, and agent-to-agent flows. Full automation |
| One provider locks you in | Built-in adapters for Gemini, OpenAI, Anthropic, DeepSeek, xAI, Meta, NVIDIA NIM, and more — plus OpenAI-compatible custom providers, local inference via Ollama, LM Studio, and llama.cpp, and a providers_whitelist for air-gapped setups. Providers |
The result is a terminal-native workflow that is:
- Inspectable — every run leaves a durable
ThreadEventrecord you can replay and audit. - Parallelizable — run isolated loops in git worktrees with propose/verify sub-agents (Loop engineering).
- Extensible — bring your own capabilities via MCP, Skills, Plugins, ACP, A2A, and WebMCP (MCP · Plugins · ACP).
- Keyboard-first — a TUI built for the keyboard, with the terminal remaining the source of truth.
- Scriptable — the same harness drives the TUI, headless
exec,eval, andschedule, so interactive and unattended runs behave identically.
VT Code is not just a model producing a plausible next response. It is a runtime you can inspect, resume, extend, and verify.
Architecture
One binary, four layers. Everything the model touches goes through the harness; nothing bypasses it.
graph LR
subgraph entry [Entry points]
TUI[TUI]
CLI[CLI / exec / cron]
ACP[Editor via ACP]
end
subgraph harness [Harness]
LOOP[Agent loop]
CTX[Context assembly + compaction]
SEC[Tool policy + sandboxed exec]
EVT[(ThreadEvent log)]
end
subgraph ext [Extensions]
MCPX[MCP servers]
SKILLS[Skills]
PLUGINS[Plugins]
end
MODELS[OpenAI · Anthropic · Gemini · local]
TUI --> LOOP
CLI --> LOOP
ACP --> LOOP
LOOP --> CTX
LOOP --> SEC
LOOP <--> EVT
LOOP <--> ext
LOOP <--> MODELS
- Entry points: the TUI, headless
exec/ask, cron schedules, and editors over ACP all drive the same loop. - Harness: context assembly, policy checks, and sandboxing wrap every
model turn; the
ThreadEventlog records everything for replay and rollback. - Extensions and models: attach without patching the core; swap providers without touching your workflow.
For contributors, the layers map to workspace crates: entry points live in
vtcode (src/) and vtcode-acp; the harness is vtcode-core with
vtcode-safety for policy and sandboxing; the ThreadEvent contract is
vtcode-exec-events; extensions are vtcode-mcp, vtcode-skills, and
vtcode-agent-plugins; provider clients live in vtcode-llm.
For layer-by-layer details, extension seams, and internal composition rules, see the Architecture guide.
Quick start
1. Install
|
# or: brew install vinhnx/tap/vtcode
# or: cargo install vtcode
2. Configure
/secret add <provider> inside the TUI does the same. vtcode login covers
OAuth providers (ChatGPT, GitHub Copilot); plain env vars and workspace
.env still work for CI. See
Getting started for the credential
resolution order.
[!CAUTION] Never commit API keys or put them in
vtcode.toml.
3. Run
See Commands for the complete CLI surface, including headless
exec, one-shot ask, and session resume.
WebMCP browser bridge (opt-in)
Pair the TUI with a browser editor for authenticated, bounded workspace editing:
See the WebMCP user guide for hosts and deployment.
What's inside
One static Rust binary: no runtime dependencies, no plugins to install, nothing to wire up. Everything below ships in the default build.
At a glance: durable sessions · sandboxed execution · every major model · MCP, Skills & plugins · terminal-native TUI · built-in evals
Commands
Bare vtcode opens the interactive TUI. Four subcommands cover most of the
work:
The complete CLI surface, flags, and exit codes are documented in the command reference.
A second tier handles session lifecycle and day-to-day operations:
| Command | Purpose |
|---|---|
vtcode continue |
Resume the last session, or fork it into a new one with --session-id |
vtcode schedule |
Durable recurring prompts, by cron or one-shot; install-service survives restarts |
vtcode secret |
Store provider API keys in your OS keyring, never in shell history or workspace files |
vtcode models |
Inspect, test, and compare providers and models |
vtcode snapshots / vtcode revert |
List and roll back to workspace snapshots |
vtcode tool-policy |
Allow or deny specific tools per workspace |
vtcode trajectory |
Pretty-print run logs for debugging and audits |
vtcode analyze, vtcode check, vtcode schema tools, vtcode man, and
vtcode update round out the operator surface. See vtcode --help for the
full list.
Everyday recipes
# Review only the uncommitted diff, then exit with a verdict
# Nightly dependency audit as a durable cron job
# Resume yesterday's session and fork it for a new experiment
# See exactly what the agent did in the last run
Headless exec usage is covered in the
exec mode guide; durable cron schedules in
the scheduled tasks guide.
Documentation
| Layer | Guides |
|---|---|
| Start | Installation · Getting started · Wiki |
| Use | TUI · CLI · WebMCP · Automation · Planning · Configuration |
| Extend | Skills · Plugins · MCP · Editors (ACP) |
| Operate | Safety · Protocols · Loop engineering · Architecture |
The full catalog lives in the Documentation Index.
The WebMCP hosted app (fallback mirror) pairs with the TUI bridge; deployment details live in the WebMCP deployment reference.
Development
graph LR
types --> config --> core --> tools --> agent --> TUI
Rust stable, edition 2024, MSRV 1.93. Clone and run the fast gate:
CI runs with RUSTFLAGS="-D warnings" and --locked; match locally with
cargo check --locked. See the
development overview and
testing guide for details.
Contributing
Contributions are welcome:
- Code: pick an open issue or propose one; keep changes surgical and covered by tests.
- Docs: fixes and new guides in
docs/; every user-facing feature should land with its documentation. - Evals: new suites and regression cases are high-leverage contributions; see the eval guide for suite authoring and metrics.
- Bug reports: include
vtcode trajectoryoutput when possible; it makes runs reproducible.
Before opening a PR: follow Conventional Commits
(type(scope): subject), run ./scripts/check-dev.sh and cargo nextest run,
and keep the diff focused.
Contributors
Thank you to everyone who shaped VT Code.
Support
Sponsorship
VT Code is built and maintained in spare time. If it helped you ship or learn something, a sponsorship keeps the project independent.
License
First-party code is MIT OR Apache-2.0. See LICENSE. Third-party code keeps its original licenses: see THIRD-PARTY-NOTICES.