pub struct Cli {Show 22 fields
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§
§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-lite-preview-06-17 - Fastest, most cost-effective (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
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
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\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-lite-preview-06-17” 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
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
.