cli.sgit.ai / Command reference

Command reference

All 158 commands of sgit-ai v0.23.0, generated from the parser the CLI actually builds. The CLI walks its own argparse tree (CLI__Reference, behind sgit help all --format json, schema sgit-cli-reference-v1); this site renders that JSON and nothing else. A flag cannot appear here unless the code registers it, and none the code registers can be missing.

Where to put a new command is a rule of the CLI (its CLAUDE.md): a daily-use verb at the top level, anything about the vault as a whole under vault, anything about commits under history, checks under check.

Daily work

CommandSubcommandsWhat it does
sgit cloneClone a vault from the remote server
sgit initCreate a new empty vault and register it on the server
sgit createCreate a new vault and push it to the server in one step
sgit statusShow uncommitted changes in working directory
sgit commitCommit local changes to the clone branch
sgit pullPull named branch changes and merge into clone branch
sgit pushPush clone branch to the named branch
sgit fetchFetch file content on demand (sparse clone)
sgit writeWrite a file directly to vault HEAD (agent workflow)
sgit catDecrypt and print a vault file to stdout
sgit lsList vault files with fetch status
sgit file3File operations (cat, ls, write)
sgit publishGenerate the plaintext surface for static publishing (.sg_vault/publish/ — the only path that changes)

Branches and merges

CommandSubcommandsWhat it does
sgit branch7Branch management
sgit merge-abortAbort an in-progress merge and restore working tree
sgit resolveResolve merge conflicts per file or all at once

History

CommandSubcommandsWhat it does
sgit history7Commit history and diffs

The vault as a whole

CommandSubcommandsWhat it does
sgit vault41Vault management and credential store
sgit remote7Manage vault remotes (alias for sgit vault remote)
sgit migrate3Run vault data migrations
sgit cache4Declare cached paths (fast single-request reads)

Keys and identity

CommandSubcommandsWhat it does
sgit pki10PKI key management and encryption

Checking and looking inside

CommandSubcommandsWhat it does
sgit check3Vault integrity checks
sgit inspect6Read-only vault inspection tools
sgit doctorCheck remote connectivity and configuration

Running a vault locally

CommandSubcommandsWhat it does
sgit serve8Run this vault on your machine: the vault UI + API in a container (Docker, Podman, Apple container), or --static

Other ways to clone

CommandSubcommandsWhat it does
sgit clone-branchThin clone: full commit history + HEAD trees/blobs only. Note: only HEAD is fully fetched — run 'sgit fetch <path>' or 'sgit pull' to access older history.
sgit clone-headlessCredentials-only clone: derive keys, write config, no data
sgit clone-rangeClone a specific commit range (range_from..range_to)

The tool itself

CommandSubcommandsWhat it does
sgit helpShow help (use sgit help all for full surface)
sgit versionShow sgit-ai version
sgit updateUpdate sgit-ai to the latest version

For developers of sgit

CommandSubcommandsWhat it does
sgit dev26Dev/perf instrumentation tools (sgit dev <tool>)

How this page is made

admin/content/reference/sgit-cli-reference.json is the output of sgit help all --format json from the release named above, installed from PyPI. The build turns it into one page per top-level command. To update: install the new release, run the command into that file, rebuild, and say in the release history which version the reference moved to.

This page as markdown · its source, admin/content/reference/index.md