373 releases (72 breaking)
Uses new Rust 2024
| new 0.107.0 | May 21, 2026 |
|---|---|
| 0.105.13 | May 14, 2026 |
| 0.96.9 | Mar 31, 2026 |
| 0.55.1 | Dec 29, 2025 |
| 0.47.6 | Nov 30, 2025 |
#117 in Configuration
84 downloads per month
Used in 5 crates
(4 directly)
1.5MB
31K
SLoC
vtcode-config
Config loader components shared across VT Code and downstream adopters.
Exposes VTCodeConfig and ConfigManager for reading and validating
vtcode.toml files. Applications can customize the filesystem layout via
ConfigDefaultsProvider and opt into the bootstrap feature (enabled by
default) to scaffold configuration directories with project-specific defaults.
Modules
| Module | Purpose |
|---|---|
loader |
Config parsing, merging, watching, and layer stack |
core |
Primary config structs (AgentConfig, ModelConfig, SandboxConfig, …) |
defaults |
ConfigDefaultsProvider and helpers for search paths |
acp |
Agent Client Protocol configuration |
api_keys |
API key source resolution |
auth |
OAuth / ChatGPT / Copilot auth flows |
codex |
TUI and history persistence settings |
constants |
Compile-time constants |
context |
Dynamic context and ledger settings |
debug |
Debug and trace configuration |
hooks |
Lifecycle hook configuration |
ide_context |
IDE context provider configuration |
mcp |
MCP server and client configuration |
models |
Model identifiers and metadata |
optimization |
Performance tuning knobs (caching, pooling, profiling) |
subagents |
Sub-agent discovery and specs |
Public entrypoints
| Export | Description |
|---|---|
VTCodeConfig |
Deserialized configuration root |
ConfigManager |
Load, merge, and watch configuration files |
ConfigDefaultsProvider |
Trait for customizing default paths and values |
install_config_defaults_provider |
Register a custom defaults provider globally |
ConfigLayerStack |
Ordered stack of config layers with merge semantics |
ConfigWatcher / SimpleConfigWatcher |
File-system watchers for live reload |
Usage
use vtcode_config::ConfigManager;
fn main() -> anyhow::Result<()> {
let manager = ConfigManager::load_from_workspace(".")?;
println!("Active provider: {}", manager.config().agent.provider);
Ok(())
}
Features
| Feature | Default | Description |
|---|---|---|
bootstrap |
✓ | Scaffold config directories on first load |
schema |
— | JSON Schema generation via schemars |
API reference
Dependencies
~28–54MB
~848K SLoC