Veyra Command Reference

This page maps Git commands to their Veyra equivalents and marks what is implemented today.

Rule: Git's spelling is canonical. Moving a script to Veyra should be close to s/git/veyra/. New, clearer names exist only as aliases (see DESIGN.md Β§2, A5).

Legend: βœ… implemented and tested Β· 🟑 partial (see note) Β· πŸ—“ planned (phase in ROADMAP.md)

Veyra and Git share the same repository. Anything marked πŸ—“ can be done with git today, and Veyra records it as an external operation, so veyra undo still works afterwards.


Repository setup

GitVeyraStatusNotes
git init [dir]veyra init [dir] [-b <branch>] [--object-format sha256]βœ…Respects init.defaultBranch. SHA-256 repositories work end to end.
git clone <url> [dir]veyra clone <url> [dir]βœ…HTTPS (rustls), SSH, file:// and local paths through gitoxide
git clone --depth N / git fetch --depth N / --unshallowveyra clone --depth N / veyra fetch --depth N / --unshallowβœ…Shallow history in Git's .git/shallow
git clone --filter=…veyra clone --filter=blob:none (also blob:limit=<n>[kmg], tree:<depth>)βœ…A partial clone configured exactly like Git's (promisor remote, .promisor packs), so both tools fetch missing objects on demand. Veyra fetches them in batches before checkouts and merges.
git backfillveyra backfillβœ…Downloads every object a partial clone left on the remote
git statusveyra status [--short] [--porcelain] [--json]βœ…--short and --porcelain (v1) output match git status --porcelain. Paths are shown relative to the repository root.
git configveyra config [--global] <key> [<value>], --unset, --listβœ…Same files as Git
git help / --versionveyra help, veyra --versionβœ…
git clone --sparseveyra clone <url> --scope <name> / --sparse <dir>β€¦βœ…Only the scope's directories are checked out (cone-mode sparse). Scopes are declared in .veyra/scopes.toml. Add --filter=blob:none to download only the scope's files.
git sparse-checkout set/add/list/disableveyra sparse set [dirs] [--scope s] [--no-cone] / add / list / disableβœ…Same .git/info/sparse-checkout and skip-worktree bits as Git (git sparse-checkout list agrees). --no-cone takes Git's gitignore-style patterns (last match wins). Refuses to hide files with local changes.

Staging and committing

GitVeyraStatusNotes
git add <paths> / .veyra add <paths> (alias stage)βœ…Globs (*.rs) work even in PowerShell. Stages deletions, like Git 2.x.
git add -A / -uveyra add -A / -uβœ…
git add -fveyra add --forceβœ…Needed for ignored files
git add -pveyra add -p [paths]βœ…y/n/q/a/d/s (split) per hunk, deletions and binary files as a whole. No hunk editing (e) yet.
git rm [--cached] [-r] [-f]veyra rm (alias remove)βœ…Refuses files with changes unless -f
git mvveyra mv (alias move)βœ…
git restore <paths>veyra restore <paths> / veyra discard <paths>βœ…Difference: the old contents are checkpointed first, so veyra undo recovers them
git restore --stagedveyra restore --staged / veyra unstageβœ…--source, --worktree supported
git commit -m … [-a] [--amend] [--allow-empty]veyra commit β€¦βœ…-F file, --no-edit, or the editor (GIT_EDITOR / core.editor)
git commit --trailerveyra commit --trailer "K: v"βœ…
β€”veyra commit --assisted-by "<tool>"βœ…Adds Assisted-by:. Provenance is declared, never guessed.
β€”veyra commit --intent <id>βœ…Adds Intent:
β€”secret scan + intent check on commitβœ…--allow-secrets, --no-verify
git commit -S / commit.gpgSignveyra commit -S / --no-gpg-signβœ…OpenPGP, X.509 or SSH per gpg.format / user.signingKey (via gitoxide). Merges, cherry-picks and rebases are signed too when commit.gpgSign is set.
Git hookspre-commit, prepare-commit-msg, commit-msg, post-commit, pre-push, post-checkout, post-merge, pre-rebase, post-rewriteβœ…core.hooksPath respected. Hooks run through Git for Windows' sh on Windows. Never run in repositories you don't own. --no-verify skips them.
β€”veyra commit --smart / --split [--dry-run]βœ…Optional AI (see veyra ai). --smart proposes a message you accept, edit or reject; --split proposes a sequence of commits for the staged change, by file or by hunk (hunks of one file can go to different commits), validated to cover every file and hunk exactly once before you see it. Each commit is a normal, undoable commit with an Assisted-by: trailer, and hooks and secret scanning still run.

History and inspection

GitVeyraStatusNotes
git log [revs] [-n N] [--oneline] [--all]veyra log β€¦βœ…Decorations. --json. --trailer Intent=<id>. --all hides refs/veyra/*.
git log --graphveyra log --graphβœ…Topological order, lane rendering like Git's
git show [rev]veyra show [rev] [--stat]βœ…
git diff / --staged / <rev> / <a> <b> / a..bveyra diff β€¦βœ…--stat, --name-only, --name-status, -U<n>, -- <paths>. Hunks match git diff.
git blame [-L a,b]veyra blame <file> [-L a,b] [--rev R] [--json]βœ…Line attribution matches git blame
git reflogveyra op logβœ…Records every operation, including staging and uncommitted files
git shortlog [-s] [-n] [-e] [range]veyra shortlogβœ…Output matches git shortlog; --json
git describe [--tags] [--long] [--always] [--dirty]veyra describeβœ…Same names as git describe
git grep [-i] [-w] [-F] [-n] [-l] [-c] [--cached] [rev] [-- paths]veyra grepβœ…Rust regex syntax; exits 1 when nothing matches, like Git
git bisect start/good/bad/skip/run/log/resetveyra bisect β€¦βœ…Picks the commit that splits the candidates most evenly, merges included. run: exit 0 good, 125 skip, 1–127 bad. Every step is journaled. The session is Git's (BISECT_* files, refs/bisect/*), so either tool can continue or reset it.
git format-patch [-o dir] [--stdout] <range>veyra format-patchβœ…mbox files that git am applies
git apply [--cached|--index] [--check] [-R]veyra applyβœ…Git and plain unified diffs. Hunks apply at their position or where their context matches exactly, never fuzzily; nothing is written unless every file applies. Binary patches are refused. Journaled.
git am <mbox>…veyra amβœ…Reads git format-patch output (author, date, subject, body); one journaled commit per patch
git notes add/append/show/list/remove [--ref R]veyra notes β€¦βœ…Git's notes layout (refs/notes/commits by default); git notes show reads Veyra's notes
β€”veyra diff --semantic / --functions [--json]βœ…Functions, methods, classes and types that were added, removed, modified, had their signature changed, were only reformatted, or renamed (renames need a token-identical, non-trivial body). Rust, TypeScript/TSX, JavaScript, Python, Go, Java, C, C++, C#, Ruby, PHP, Kotlin, Swift, Scala, Bash, Lua and Elixir (Tree-sitter). Other files are listed as unsupported.

Branches

GitVeyraStatusNotes
git branch / -a / -vveyra branch / branch listβœ…--json
git branch <name> [start]veyra branch <name> / branch create <name>βœ…A branch literally named list, create, … needs the create form
git branch -d / -Dveyra branch -d/-D / branch delete [--force]βœ…veyra undo restores deleted branches
git branch -mveyra branch -m / branch renameβœ…Keeps the reflog and branch.<name>.* upstream config
β€”veyra branch stale [--days N]βœ…Age + merged status
β€”veyra branch cleanup [--dry-run]βœ…Deletes local branches fully merged into the default branch. veyra undo restores them.
β€”veyra branch compare <branch> [base]βœ…Ahead/behind, merge base, changed files and a suggestion. --json.
β€”veyra branch graphβœ…The branch tree by commit ancestry (not names), with ahead/behind counts
β€”veyra branch explain [name]βœ…Base, ahead/behind, areas touched, predicted conflicts (in-memory merge, writes nothing), suggested action
git switch <b> / -c / --detach / -veyra switch β€¦βœ…Refuses to overwrite local changes. --force checkpoints first. Creates tracking branches from origin/<b>.
git checkout <b> / -b / -- <paths>veyra checkout β€¦βœ…Prefer switch and restore

Merging and rewriting

GitVeyraStatusNotes
git merge <rev> [--ff-only] [--no-ff] [-m]veyra merge β€¦βœ…Fast-forward, clean 3-way merge, or conflicts written exactly like Git (markers + index stages + MERGE_HEAD)
git merge -s ours|subtree, -X ours|theirs|subtree=<dir>, git merge A B Cveyra merge -s … / -X … / veyra merge A B Cβœ…-s ours keeps our tree; -X ours/theirs decides conflicting hunks; subtree merges find (or are told) the directory; an octopus merge with any conflict is refused before anything changes
git merge --abort / --continueveyra merge --abort / --continueβœ…Abort replays the operation log
git reset [--soft|--mixed|--hard] [rev]veyra reset β€¦βœ…Difference: --hard checkpoints first
git reset <paths>veyra reset <paths> / unstageβœ…
git cherry-pick [-x] [-n] [-m N]veyra cherry-pickβœ…Keeps the original author. Conflicts leave CHERRY_PICK_HEAD like Git. Several commits use Git's .git/sequencer, so --continue / --skip / --abort work from either tool.
git revert [-n] [-m N]veyra revertβœ…The safe way to reverse pushed commits. --continue / --skip / --abort, sequences shared with Git.
git rebase <upstream> [--onto X]veyra rebaseβœ…Defaults to the branch's upstream. --continue / --skip / --abort. State lives in Git's .git/rebase-merge, so a rebase started by either tool can be continued or aborted by the other. veyra undo restores the pre-rebase branch.
git rebase -iveyra rebase -i <upstream>βœ…pick, reword, edit, squash, fixup, drop, exec, break (and their one-letter forms), plus reordering. Uses GIT_SEQUENCE_EDITOR / sequence.editor, then the commit editor.
git rerere / rerere forget / rerere clearveyra merge resolutions [status|list|forget <path>|clear|enable [--auto-stage]|disable] (alias veyra rerere …)βœ…Git's own .git/rr-cache format and conflict ids: resolutions recorded by Veyra are replayed by Git and vice versa. Enabled by rerere.enabled (or an existing rr-cache). Replays apply to merges, cherry-picks, reverts, rebases and stash applications, slightly shifted conflicts included; rerere.autoUpdate stages them. Every replay is reported.
β€”structural merge (automatic in merge, pull, cherry-pick, revert, rebase, stash apply/pop)βœ…When Git's line merge conflicts but the two sides changed different top-level symbols, Veyra merges the file symbol by symbol. It refuses on syntax errors, same-symbol edits, delete-vs-modify and reorders on both sides, and re-parses the result. Every resolution is printed, and recorded as a Veyra-Structural-Merge: trailer. veyra.structuralMerge = true Β· stage (resolve, then stop for review) Β· false.
β€”veyra merge <branch> --assist / veyra ai resolve [paths]βœ…AI-proposed resolutions for the conflicts that remain after structural merge and rerere. Proposals that still contain markers or don't parse are discarded; the rest are shown as a diff with a confidence level. Accepting stages the file (journaled, so veyra undo restores the conflict). --yes accepts only high-confidence proposals; uncertain ones always need a person.

Undo, recovery and checkpoints (Veyra-only)

CommandStatusWhat it does
veyra undo [--dry-run] [--force] [--op <id>]βœ…Undoes the latest operation: any Veyra command, or a change made with plain git. Touches only what that operation changed, and refuses if those things changed again (unless --force, which is itself undoable).
veyra undo commitβœ…The same, but checks that the last operation really is a commit (β‰ˆ git reset --soft HEAD~1)
veyra redo [--force]βœ…Re-applies the last undone operation
veyra op log [-n N] [--all] [--json]βœ…The operation journal, newest first, with ← undo / ← redo markers
veyra op show <id>βœ…Refs, HEAD, index and file changes of one operation
veyra op restore <id> [--before]βœ…Makes the whole repository match that moment
veyra op prune --older-than 30dβœ…Retention (the newest 20 are always kept)
veyra checkpoint [-m msg]βœ…Snapshots tracked and untracked, non-ignored files. No commit, index untouched, never pushed.
veyra checkpoint list / diff <id> / restore <id> [paths]βœ…restore takes a fresh checkpoint first
veyra checkpoint enable / disableβœ…Toggles veyra.autoCheckpoint (snapshot on every command)
veyra checkpoint watch --interval 10mβœ…Foreground timer, no daemon
veyra checkpoint prune --older-than 14dβœ…
veyra stash [push] [-m] [-u] [--keep-index] / list / show [-p] / apply [--index] / pop / drop / clear (aliases shelve, unshelve)βœ…Same refs/stash structure and reflog as Git: git stash and veyra stash see each other's entries. A conflicted pop keeps the entry.
veyra clean -f [-d] [-n] [paths]βœ…Like git clean, but the files are checkpointed first, so veyra undo brings them back. Ignored files are never removed (no -x yet).

Worktrees and submodules

GitVeyraStatusNotes
git worktree add/list/remove/pruneveyra worktree add <path> [branch] [-b new] [--detach] / list / remove [--force] / pruneβœ…Via gitoxide. Each linked worktree has its own operation log and keep ref, so veyra undo there only touches that worktree.
git submodule status/init/update/add/foreachveyra submodule [status] / init / update [--init] [--recursive] / add <url> [path] / foreach <cmd>βœ…Submodules are cloned into their path (Git's embedded layout). Relative URLs resolve against origin.

Remotes

GitVeyraStatusNotes
git remote [-v], add, removeveyra remote β€¦βœ…
git fetch [remote]veyra fetch [--depth N] [--unshallow]βœ…In a partial clone, fetches keep the filter
git pull [--ff-only]veyra pullβœ…Fetch + fast-forward or merge
git push [remote] [refspec…]veyra pushβœ…Implemented on gix's transport (HTTPS, SSH, local). Supports -u, --tags, --delete, +refspec, --force, --force-with-lease, --dry-run, --no-verify. Credential helpers are used. Changed blobs are sent as deltas against their previous version (a thin pack, like git push --thin).
git ls-remote [--heads] [--tags] [remote|url]veyra remote refs (alias veyra ls-remote)βœ…Same output as git ls-remote; --json
β€”veyra sync [--push]βœ…Fetch, then fast-forward, or rebase onto the upstream if both sides moved. Refuses with uncommitted changes. Pushes only with --push.

Tags and releases

GitVeyraStatusNotes
git tag / <name> [rev] / -a -m / -s / -d / -fveyra tag … / tag create|delete|listβœ…-s (or tag.gpgSign) signs. Annotated tags have a tagger.
git verify-commit / git verify-tagveyra verify commit [rev] / veyra verify tag <name>βœ…Uses Git's verification config (gpg.ssh.allowedSignersFile, gpg.program, …)
β€”veyra release notes [range]βœ…Markdown notes since the last version tag, grouped by Conventional Commits type, breaking changes first; --json
β€”veyra release prepare <version> [--dry-run] [-s] [--force]βœ…Preflight (tag is new, clean tree, changes since the last release; warnings for non-semver versions, not on the default branch, unpushed, unsigned, no test attestation), then an annotated tag with the release notes. Journaled.
β€”veyra release verify <tag>βœ…Tag signature, signature status of every commit in the release, attestations; exits non-zero on a bad signature

Diagnostics, security and intent (Veyra-only)

CommandStatusWhat it does
veyra doctor [--full] [--json]βœ…PASS/WARN/FAIL with evidence for identity, integrity, in-progress ops, storage, large files, secrets, branches, journal and compatibility. --full also rehashes and parses every object, verifies pack checksums and checks connectivity. Exits non-zero on FAIL.
veyra security scan [--staged | --rev R] [--json]βœ…Built-in and custom rules, redacted output, fingerprints. Exits non-zero on high-confidence findings.
veyra security allow <fingerprint>βœ…Allowlists a reviewed false positive in .veyra/secrets.toml
veyra intent create --title … [--guard-path G --guard-contains T]βœ…Writes .veyra/intents/<id>.toml
veyra intent list / show / verify [--staged|--rev] / close / logβœ…verify exits non-zero on violations
veyra explain <git command…>βœ…What it does, risk, recovery, Veyra equivalent
git fsck [--full]veyra doctor [--full]βœ…
git count-objects -vveyra storage stats [--json]βœ…
git gc / git maintenance runveyra maintenance run [--prune-expire 2w]βœ…
git pruneveyra maintenance prune [--expire 2w] [-n]βœ…
β€”veyra serve [--port 7420] [--no-open]βœ…
β€”veyra impact [--staged | --commit R | --branch [BASE]] [--tests] [--history N] [--json]βœ…
β€”veyra verify --history [--rev R] [-n N]βœ…
β€”veyra attest run [--sign] -- <cmd> / attest review [--reject] [--sign] / attest listβœ…
β€”veyra verify --provenance [--rev R]βœ…
β€”veyra ai [status] / ai configure [--provider anthropic|command] [--model M] [--effort E] [--command CMD] [--global] / ai disableβœ…
β€”veyra ai explain [REV|--staged] / ai review [scope] / ai summarize [RANGE] / ai risks [scope]βœ…
β€”veyra intent suggest <paths> [--dry-run]βœ…
β€”veyra analyze [--migration] [--infra] [scope] [--fail-on high|medium|low] [--json]βœ…

To see impact, analyze, diff --semantic and commit signatures on every pull request, use the Veyra review GitHub Action: CI.md.

Plumbing

Plumbing commands keep their Git names at the top level (hidden from the main help).

GitVeyraStatus
git rev-parse <spec>veyra rev-parse [--short]βœ…
git cat-file -t/-s/-pveyra cat-fileβœ…
git hash-object [-w]veyra hash-objectβœ… (applies the clean filter inside a worktree, like Git)
git ls-files [-s]veyra ls-filesβœ…
git show-refveyra show-refβœ…
git write-treeveyra write-treeβœ…
git commit-tree <tree> [-p P]… -m Mveyra commit-treeβœ… (signs when commit.gpgSign is set)
git update-ref [-d] <ref> <new> [<old>]veyra update-refβœ… (journaled, so undoable)
git for-each-ref [--format] [patterns]veyra for-each-refβœ… (%(refname[:short]), %(objectname[:short]), %(objecttype), %(subject))
git merge-base [--is-ancestor] A Bveyra merge-baseβœ…
git pack-objects --stdoutveyra pack-objects --stdoutβœ… (ids on stdin)
git archive [--format tar|tgz|zip] [--prefix] [-o] [rev] [paths]veyra archiveβœ… (tar with the commit id in the pax header, so git get-tar-commit-id works)
git bundle create/verify/list-heads/unbundleveyra bundle β€¦βœ… (v2 bundles that git clone and git bundle verify accept; ranges become prerequisites)

Full Git compatibility will be claimed only when a published conformance matrix, backed by automated tests, supports it.


Configuration reference (veyra.* keys in Git config)

KeyDefaultMeaning
veyra.autoCheckpointfalseAlso checkpoint on read-only commands (status, diff, log)
veyra.checkpointMaxFileSize20mLarger files are skipped by snapshots (and reported)
veyra.checkpointExcludeβ€”Multi-valued globs never snapshotted (beyond .gitignore)
veyra.secretsPolicyblockblock Β· warn Β· off for high-confidence findings on commit
veyra.intentPolicywarnwarn Β· block Β· off for guard violations on commit
veyra.ai.provideroffanthropic Β· command Β· off
veyra.ai.modelclaude-opus-5-5Claude API model
veyra.ai.effortmediumlow Β· medium Β· high Β· xhigh Β· max
veyra.ai.commandβ€”Local model command for provider = command
veyra.ai.fallbackstrueClaude API server-side refusal fallbacks (fallbacks: "default")
veyra.ai.maxTokens16000Output limit per request
veyra.structuralMergetruetrue Β· stage Β· false: resolve conflicts in different symbols automatically, resolve and stop for review, or never

Committed, shared policy:

FilePurpose
.veyra/intents/*.tomlIntent records (see DESIGN.md Β§5.2)
.veyra/secrets.tomlallow = [fingerprints], exclude_paths = [globs], [[rule]] custom patterns

Environment

VariableEffect
VEYRA_AGENT=1Agent mode: destructive commands (reset --hard, branch -D, switch --force, discard/restore, undo --force, op restore, checkpoint restore) require --yes
NO_COLORDisables colour
GIT_EDITOR, VISUAL, EDITORCommit message editor (after core.editor), run like Git: sh -c '<editor> "$@"'
GIT_SEQUENCE_EDITORTodo-list editor for rebase -i (before sequence.editor)

Exit codes

0 success Β· 1 error, failed check (doctor FAIL, security scan high-confidence finding, intent verify violation) or merge conflicts Β· 2 usage error