pub struct Cli {Show 23 fields
pub color: Color,
pub workspace_path: Option<PathBuf>,
pub model: Option<String>,
pub provider: Option<String>,
pub api_key_env: String,
pub workspace: Option<PathBuf>,
pub enable_tree_sitter: bool,
pub performance_monitoring: bool,
pub research_preview: bool,
pub security_level: String,
pub show_file_diffs: bool,
pub max_concurrent_ops: usize,
pub api_rate_limit: usize,
pub max_tool_calls: usize,
pub debug: bool,
pub verbose: bool,
pub config: Option<PathBuf>,
pub log_level: String,
pub no_color: bool,
pub theme: Option<String>,
pub skip_confirmations: bool,
pub full_auto: bool,
pub command: Option<Commands>,
}
Expand description
Main CLI structure for vtcode with advanced features
Fields§
§color: Color
Color output selection (auto, always, never)
workspace_path: Option<PathBuf>
Optional positional path to run vtcode against a different workspace
model: Option<String>
LLM Model ID with latest model support
Available providers & models: • gemini-2.5-flash-preview-05-20 - Latest fast Gemini model (default) • gemini-2.5-flash - Fast, cost-effective • gemini-2.5-pro - Latest, most capable • gpt-5 - OpenAI’s latest • claude-sonnet-4-20250514 - Anthropic’s latest • qwen/qwen3-4b-2507 - Qwen3 local model • deepseek-reasoner - DeepSeek reasoning model • x-ai/grok-code-fast-1 - OpenRouter Grok fast coding model • qwen/qwen3-coder - OpenRouter Qwen3 Coder optimized for IDE usage • grok-2-latest - xAI Grok flagship model
provider: Option<String>
LLM Provider with expanded support
Available providers: • gemini - Google Gemini (default) • openai - OpenAI GPT models • anthropic - Anthropic Claude models • deepseek - DeepSeek models • openrouter - OpenRouter marketplace models • xai - xAI Grok models
Example: –provider deepseek
api_key_env: String
API key environment variable\n\nAuto-detects based on provider:\n• Gemini: GEMINI_API_KEY
\n• OpenAI: OPENAI_API_KEY
\n• Anthropic: ANTHROPIC_API_KEY
\n• DeepSeek: DEEPSEEK_API_KEY
\n• OpenRouter: OPENROUTER_API_KEY
\n• xAI: XAI_API_KEY
\n\nOverride: –api-key-env CUSTOM_KEY
workspace: Option<PathBuf>
Workspace root directory for file operations
Security: All file operations restricted to this path Default: Current directory
enable_tree_sitter: bool
Enable tree-sitter code analysis
Features: • AST-based code parsing • Symbol extraction and navigation • Intelligent refactoring suggestions • Multi-language support (Rust, Python, JS, TS, Go, Java)
performance_monitoring: bool
Enable performance monitoring
Tracks: • Token usage and API costs • Response times and latency • Tool execution metrics • Memory usage patterns
research_preview: bool
Enable research-preview features
Includes: • Advanced context compression • Conversation summarization • Enhanced error recovery • Decision transparency tracking
security_level: String
Security level for tool execution
Options: • strict - Maximum security, prompt for all tools • moderate - Balance security and usability • permissive - Minimal restrictions (not recommended)
show_file_diffs: bool
Show diffs for file changes in chat interface
Features: • Real-time diff rendering • Syntax highlighting • Line-by-line changes • Before/after comparison
max_concurrent_ops: usize
Maximum concurrent async operations
Default: 5 Higher values: Better performance but more resource usage
api_rate_limit: usize
Maximum API requests per minute
Default: 30 Purpose: Prevents rate limiting
max_tool_calls: usize
Maximum tool calls per session
Default: 10 Purpose: Prevents runaway execution
debug: bool
Enable debug output for troubleshooting
Shows: • Tool call details • API request/response • Internal agent state • Performance metrics
verbose: bool
Enable verbose logging
Includes: • Detailed operation logs • Context management info • Agent coordination details
config: Option<PathBuf>
Configuration file path
Supported formats: TOML Default locations: ./vtcode.toml, ~/.vtcode/vtcode.toml
log_level: String
Log level (error, warn, info, debug, trace)
Default: info
no_color: bool
Disable color output
Useful for: Log files, CI/CD pipelines
theme: Option<String>
Select UI theme for ANSI styling (e.g., ciapre-dark, ciapre-blue)
skip_confirmations: bool
Skip safety confirmations
Warning: Reduces security, use with caution
full_auto: bool
Enable full-auto mode (no interaction)
Runs the agent without pausing for approvals. Requires enabling in configuration.
command: Option<Commands>
Implementations§
Source§impl Cli
impl Cli
Sourcepub fn load_config(&self) -> Result<ConfigFile, Box<dyn Error>>
pub fn load_config(&self) -> Result<ConfigFile, Box<dyn Error>>
Load configuration from a simple TOML-like file without external deps
Supported keys (top-level): model, api_key_env, verbose, log_level, workspace Example: model = “gemini-2.5-flash-preview-05-20” api_key_env = “GEMINI_API_KEY” verbose = true log_level = “info” workspace = “/path/to/workspace”
Sourcepub fn get_workspace(&self) -> PathBuf
pub fn get_workspace(&self) -> PathBuf
Get the effective workspace path
Sourcepub fn get_api_key_env(&self) -> String
pub fn get_api_key_env(&self) -> String
Get the effective API key environment variable
Automatically infers the API key environment variable based on the provider when the current value matches the default or is not explicitly set.
Sourcepub fn is_verbose(&self) -> bool
pub fn is_verbose(&self) -> bool
Check if verbose mode is enabled
Sourcepub fn is_tree_sitter_enabled(&self) -> bool
pub fn is_tree_sitter_enabled(&self) -> bool
Check if tree-sitter analysis is enabled
Sourcepub fn is_performance_monitoring_enabled(&self) -> bool
pub fn is_performance_monitoring_enabled(&self) -> bool
Check if performance monitoring is enabled
Sourcepub fn is_research_preview_enabled(&self) -> bool
pub fn is_research_preview_enabled(&self) -> bool
Check if research-preview features are enabled
Sourcepub fn get_security_level(&self) -> &str
pub fn get_security_level(&self) -> &str
Get the security level
Sourcepub fn is_debug_mode(&self) -> bool
pub fn is_debug_mode(&self) -> bool
Check if debug mode is enabled (includes verbose)
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Parser for Cli
impl Parser for Cli
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnwindSafe for Cli
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more