CLI Overview
The AVC CLI is the primary interface — every other surface (VSCode extension, web UI, MCP server) calls these commands underneath. Each command supports --json for machine-readable output.
Global flags
Section titled “Global flags”| Flag | Description |
|---|---|
--json | Emit results as JSON to stdout instead of human-readable text |
--help | Show help for any command |
Errors are written to stderr; the process exits with code 1 on failure.
Project setup
Section titled “Project setup” avc init Initialize AVC for a project. Optionally set up agent integration files.
Snapshots
Section titled “Snapshots” avc snapshot Create a snapshot of the current project state.
avc list List snapshots on the active branch.
avc info Show snapshot metadata and file list.
avc log Tree-style history of snapshots.
avc delete Permanently delete a snapshot.
Diff & restore
Section titled “Diff & restore” avc diff Compare two snapshots file-by-file.
avc diff-current Compare a snapshot against the working tree.
avc restore Roll back the entire project to a snapshot.
avc restore-file Restore a single file from a snapshot.
avc cat Print file contents from a snapshot to stdout.
avc file-history List every snapshot that contains a specific file.
avc annotate Show which snapshot introduced each line.
Branches & merge
Section titled “Branches & merge” avc branch Create, list, switch, delete, and diff branches.
avc merge Three-way merge with conflict detection and abort.
Agents & UI
Section titled “Agents & UI”JSON output convention
Section titled “JSON output convention”Every command that returns structured data accepts --json. The shape mirrors what’s documented per-command. Errors always include an error field:
{ "error": "snapshot 'snap-foo' not found" }For scripts and agents, prefer --json — it’s stable across CLI text-output revisions.