avc branch
Branches isolate agent work in .avc/workspaces/<branch>/ so experiments never touch your real project until you merge. See Concepts → Branches for the conceptual model.
Subcommands
Section titled “Subcommands”avc branch create <name> # create a branch from the current snapshotavc branch list # list all branches; * marks activeavc branch switch <name> # switch active branchavc branch delete <name> # delete branch + remove workspaceavc branch diff <name> # cumulative diff from branch point to branch HEADavc branch create
Section titled “avc branch create”avc branch create feat-authavc branch create feat-auth --from snap-abc123| Flag | Description |
|---|---|
--from <snapshot_id> | Branch from a specific snapshot instead of the latest on main |
--json | JSON output |
JSON output:
{ "id": "br-feat-auth", "name": "feat-auth", "base_snapshot_id": "snap-abc123", "workspace_path": "/path/to/project/.avc/workspaces/feat-auth", "success": true}avc branch create auto-switches to the new branch. After running it, you’re on the new branch and subsequent snapshots land there.
avc branch list
Section titled “avc branch list”avc branch listavc branch list --jsonJSON output:
[ { "id": "br-main", "name": "main", "active": true, "base_snapshot_id": "", "workspace_path": "" }, { "id": "br-feat-auth", "name": "feat-auth", "active": false, "base_snapshot_id": "snap-abc123", "workspace_path": "/path/.../feat-auth" }]avc branch switch
Section titled “avc branch switch”avc branch switch mainavc branch switch feat-authUpdates .avc/config.toml’s [branch] active field. No files are moved — switching is instantaneous because each branch already has its own workspace.
avc branch delete
Section titled “avc branch delete”avc branch delete feat-bad-ideaRemoves the branch record from the database and deletes the workspace directory. The object store is unaffected (other branches/snapshots may still reference those blobs).
You cannot delete main.
avc branch diff
Section titled “avc branch diff”avc branch diff feat-authavc branch diff feat-auth --jsonReturns the cumulative diff from the branch’s base snapshot to the latest snapshot on that branch — i.e., “what has the agent done so far?”.
The JSON shape is identical to avc diff.
Workflow example
Section titled “Workflow example”# Start a new agent task on a branchavc branch create feat-refactor
# Agent works in .avc/workspaces/feat-refactor/# Snapshots as usual; they land on the branchavc snapshot "WIP refactor" --agent claude
# Review and merge back when doneavc merge feat-refactor --previewavc merge feat-refactor