Skip to main content

vtcode_core/cli/args/
review.rs

1use clap::{Args, ValueHint};
2use std::path::PathBuf;
3
4/// Arguments for `vtcode review`.
5#[derive(Args, Debug, Clone)]
6pub struct ReviewArgs {
7    /// Emit structured JSON events to stdout (one per line)
8    #[arg(long)]
9    pub json: bool,
10    /// Optional path to write the JSONL transcript
11    #[arg(long, value_name = "PATH", value_hint = ValueHint::FilePath)]
12    pub events: Option<PathBuf>,
13    /// Write the last agent message to this file
14    #[arg(long, value_name = "PATH", value_hint = ValueHint::FilePath)]
15    pub last_message_file: Option<PathBuf>,
16    /// Review the last committed diff instead of the current diff
17    #[arg(long, conflicts_with_all = ["target", "files"])]
18    pub last_diff: bool,
19    /// Review a custom git target expression
20    #[arg(long, value_name = "TARGET", conflicts_with = "files")]
21    pub target: Option<String>,
22    /// Optional review style or focus area
23    #[arg(long, value_name = "STYLE")]
24    pub style: Option<String>,
25    /// Review specific files instead of a diff target (repeatable)
26    #[arg(long, value_name = "FILE", conflicts_with = "target")]
27    pub files: Vec<PathBuf>,
28    /// Free-form natural-language review instructions (focus, scope, depth).
29    /// Never interpolated into shell commands; stored as prompt guidance.
30    /// Mutations stay disabled unless the text explicitly asks to implement fixes.
31    #[arg(value_name = "INSTRUCTIONS")]
32    pub instructions: Vec<String>,
33}