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.
- The same data, as published: sgit-cli-reference.json. Diff two releases' files to see exactly what changed.
- Your installed version, offline:
sgit help all, or sgit help <command>. - Global options go before the command:
sgit [--base-url URL] [--token TOKEN] [--vault PATH] [--debug] <command> ....
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
| Command | Subcommands | What it does |
|---|
sgit clone | | Clone a vault from the remote server |
sgit init | | Create a new empty vault and register it on the server |
sgit create | | Create a new vault and push it to the server in one step |
sgit status | | Show uncommitted changes in working directory |
sgit commit | | Commit local changes to the clone branch |
sgit pull | | Pull named branch changes and merge into clone branch |
sgit push | | Push clone branch to the named branch |
sgit fetch | | Fetch file content on demand (sparse clone) |
sgit write | | Write a file directly to vault HEAD (agent workflow) |
sgit cat | | Decrypt and print a vault file to stdout |
sgit ls | | List vault files with fetch status |
sgit file | 3 | File operations (cat, ls, write) |
sgit publish | | Generate the plaintext surface for static publishing (.sg_vault/publish/ — the only path that changes) |
Branches and merges
History
| Command | Subcommands | What it does |
|---|
sgit history | 7 | Commit history and diffs |
The vault as a whole
| Command | Subcommands | What it does |
|---|
sgit vault | 41 | Vault management and credential store |
sgit remote | 7 | Manage vault remotes (alias for sgit vault remote) |
sgit migrate | 3 | Run vault data migrations |
sgit cache | 4 | Declare cached paths (fast single-request reads) |
Keys and identity
| Command | Subcommands | What it does |
|---|
sgit pki | 10 | PKI key management and encryption |
Checking and looking inside
Running a vault locally
| Command | Subcommands | What it does |
|---|
sgit serve | 8 | Run this vault on your machine: the vault UI + API in a container (Docker, Podman, Apple container), or --static |
Other ways to clone
| Command | Subcommands | What it does |
|---|
sgit clone-branch | | Thin 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-headless | | Credentials-only clone: derive keys, write config, no data |
sgit clone-range | | Clone a specific commit range (range_from..range_to) |
| Command | Subcommands | What it does |
|---|
sgit help | | Show help (use sgit help all for full surface) |
sgit version | | Show sgit-ai version |
sgit update | | Update sgit-ai to the latest version |
For developers of sgit
| Command | Subcommands | What it does |
|---|
sgit dev | 26 | Dev/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