Commands

Enum Commands 

Source
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”

Fields

§prompt: String
§

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: • 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

§file: Option<PathBuf>

Optional path to trajectory JSONL file

§top: usize

Number of top entries to show for each section

§

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

Fields

§name: String
§features: Vec<String>
§

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

§turn: usize

Turn number to revert to

Required: Yes Example: 5

§partial: Option<String>

Scope of revert operation

Options: memory, context, full Default: full Examples: –partial memory (revert conversation only) –partial context (revert decisions/errors only)

§

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

Fields

§max: usize

Maximum number of snapshots to keep

Default: 50 Example: –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/ structure

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

§name: Option<String>

Project name - defaults to current directory name

§force: bool

Force initialization - overwrite existing project structure

§migrate: bool

Migrate existing files - move existing config/cache files to new structure

§

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

§output: Option<PathBuf>

Output file path - where to save the configuration file

§global: bool

Create in user home directory - creates ~/.vtcode/vtcode.toml

§

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

§

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

§

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

Fields

§command: Option<String>

Command name to generate man page for (optional)\n\nAvailable commands:\n• chat, ask, analyze, performance, benchmark\n• create-project, init, man\n\nIf not specified, shows main VTCode man page

§output: Option<PathBuf>

Output file path to save man page\n\nFormat: Standard Unix man page format (.1, .8, etc.)\nDefault: Display to stdout

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,