pub enum Commands {
Show 20 variants
Chat,
Ask {
prompt: String,
},
ChatVerbose,
Analyze,
Performance,
Trajectory {
file: Option<PathBuf>,
top: usize,
},
Benchmark,
CreateProject {
name: String,
features: Vec<String>,
},
CompressContext,
Revert {
turn: usize,
partial: Option<String>,
},
Snapshots,
CleanupSnapshots {
max: usize,
},
Init,
InitProject {
name: Option<String>,
force: bool,
migrate: bool,
},
Config {
output: Option<PathBuf>,
global: bool,
},
ToolPolicy {
command: ToolPolicyCommands,
},
Models {
command: ModelCommands,
},
Security,
TreeSitter,
Man {
command: Option<String>,
output: Option<PathBuf>,
},
}
Expand description
Available commands with comprehensive features
Variants§
Chat
Interactive AI coding assistant with advanced capabilities
Features: • Real-time code generation and editing • Tree-sitter powered analysis • Research-preview context management
Usage: vtcode chat
Ask
Single prompt mode - prints model reply without tools
Perfect for: • Quick questions • Code explanations • Simple queries
Example: vtcode ask “Explain Rust ownership”
ChatVerbose
Verbose interactive chat with enhanced transparency
Shows: • Tool execution details • API request/response • Performance metrics
Usage: vtcode chat-verbose
Analyze
Analyze workspace with tree-sitter integration
Provides: • Project structure analysis • Language detection • Code complexity metrics • Dependency insights • Symbol extraction
Usage: vtcode analyze
Performance
Display performance metrics and system status\n\nShows:\n• Token usage and API costs\n• Response times and latency\n• Tool execution statistics\n• Memory usage patterns\n\nUsage: vtcode performance
Trajectory
Pretty-print trajectory logs and show basic analytics
Sources: • .vtcode/logs/trajectory.jsonl (default) Options: • –file to specify an alternate path • –top to limit report rows (default: 10)
Shows: • Class distribution with percentages • Model usage statistics • Tool success rates with status indicators • Time range of logged activity
Fields
Benchmark
Benchmark against SWE-bench evaluation framework
Features: • Automated performance testing • Comparative analysis across models • Benchmark scoring and metrics • Optimization insights
Usage: vtcode benchmark
CreateProject
Create complete Rust project with advanced features
Features: • Web frameworks (Axum, Rocket, Warp) • Database integration • Authentication systems • Testing setup • Tree-sitter integration
Example: vtcode create-project myapp web,auth,db
CompressContext
Compress conversation context for long-running sessions
Benefits: • Reduced token usage • Faster responses • Memory optimization • Context preservation
Usage: vtcode compress-context
Revert
**Revert agent to a previous snapshot
Features: • Revert to any previous turn • Partial reverts (memory, context, full) • Safe rollback with validation
Examples: vtcode revert –turn 5 vtcode revert –turn 3 –partial memory
Fields
Snapshots
List all available snapshots
Shows: • Snapshot ID and turn number • Creation timestamp • Description • File size and compression status
Usage: vtcode snapshots
CleanupSnapshots
Clean up old snapshots
Features: • Remove snapshots beyond limit • Configurable retention policy • Safe deletion with confirmation
Examples: vtcode cleanup-snapshots vtcode cleanup-snapshots –max 20
Init
Initialize project with enhanced dot-folder structure
Features: • Creates project directory structure • Sets up config, cache, embeddings directories • Creates .project metadata file • Tree-sitter parser setup
Usage: vtcode init
InitProject
Initialize project with dot-folder structure - sets up ~/.vtcode/projects/
Features: • Creates project directory structure in ~/.vtcode/projects/ • Sets up config, cache, embeddings, and retrieval directories • Creates .project metadata file • Migrates existing config/cache files with user confirmation
Examples: vtcode init-project vtcode init-project –name my-project vtcode init-project –force
Fields
Config
**Generate configuration file - creates a vtcode.toml configuration file
Features: • Generate default configuration • Support for global (home directory) and local configuration • TOML format with comprehensive settings • Tree-sitter and performance monitoring settings
Examples: vtcode config vtcode config –output ./custom-config.toml vtcode config –global
Fields
ToolPolicy
Manage tool execution policies - control which tools the agent can use
Features: • Granular tool permissions • Security level presets • Audit logging • Safe tool execution
Examples: vtcode tool-policy status vtcode tool-policy allow file-write vtcode tool-policy deny shell-exec
Fields
command: ToolPolicyCommands
Models
Manage models and providers - configure and switch between LLM providers\n\nFeatures:\n• Support for latest models (DeepSeek, etc.)\n• Provider configuration and testing\n• Model performance comparison\n• API key management\n\nExamples:\n vtcode models list\n vtcode models set-provider deepseek\n vtcode models set-model deepseek-reasoner
Fields
command: ModelCommands
Security
Security and safety management\n\nFeatures:\n• Security scanning and vulnerability detection\n• Audit logging and monitoring\n• Access control management\n• Privacy protection settings\n\nUsage: vtcode security
TreeSitter
Tree-sitter code analysis tools\n\nFeatures:\n• AST-based code parsing\n• Symbol extraction and navigation\n• Code complexity analysis\n• Multi-language refactoring\n\nUsage: vtcode tree-sitter
Man
Generate or display man pages for VTCode commands\n\nFeatures:\n• Generate Unix man pages for all commands\n• Display detailed command documentation\n• Save man pages to files\n• Comprehensive help for all VTCode features\n\nExamples:\n vtcode man\n vtcode man chat\n vtcode man chat –output chat.1
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnwindSafe for Commands
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