cli.sgit.ai / Command reference / sgit vault

sgit vault

Vault management and credential store.

Generated from sgit help all --format json, sgit-ai v0.23.0. 41 subcommands below. To change this page, change the command's register() in the CLI and regenerate.

sgit vault

Subcommands

sgit vault add

Store a vault key under an alias

sgit vault add [options] <alias>
ArgumentWhat it is
aliasrequiredHuman-friendly name for this vault
OptionWhat it does
--vault-keyVault key (prompted if omitted)

sgit vault attach

Bind a key to an existing .sg_vault/bare checkout (e.g. a fresh git clone of a one-repo vault)

sgit vault attach [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--base-urlAPI base URL (overrides --remote, global --base-url, and saved config)
--no-verify-tlsSkip TLS certificate verification (staging / self-signed only)
--read-keyRead key (with --vault-id) -> read-only attach
--remoteUse the named remote (URL + tls_verify from saved config); overrides the default remote for this command
--tokenSG/Send access token (overrides global --token and saved config)
--transportHow to reach the vault: auto (default — a folder is local, an http(s) host is api unless its batch endpoint is absent), api (live SG/API), static (any GET host, read-only), local (a folder, read-only) One of: api, auto, local, static.
--vault-idVault id, required with --read-key
--vault-keyFull vault key -> read-write attach
--verify-tlsVerify TLS certificates (default)

sgit vault backup

Create a backup zip of the vault

sgit vault backup [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--include-keyEmbed VAULT-KEY in the zip (opt-in; prompts unless --yes)
--labelLabel suffix in the filename (default: manual)
--output-dirOutput directory (default: .sg_vault/backups/)
--yesSkip confirmation prompts

sgit vault backups

List available backups for a vault

sgit vault backups [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)

sgit vault clean

Remove working copy, keeping bare vault; or prune empty dirs

sgit vault clean [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--empty-dirsRemove empty directories left after file deletions (normal vault)

sgit vault delete-on-remote

Hard-delete this vault from the server, keep local clone intact

sgit vault delete-on-remote [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--base-urlAPI base URL (overrides --remote, global --base-url, and saved config)
--jsonOutput result as JSON
--no-verify-tlsSkip TLS certificate verification (staging / self-signed only)
--remoteUse the named remote (URL + tls_verify from saved config); overrides the default remote for this command
--tokenSG/Send access token (overrides global --token and saved config)
--transportHow to reach the vault: auto (default — a folder is local, an http(s) host is api unless its batch endpoint is absent), api (live SG/API), static (any GET host, read-only), local (a folder, read-only) One of: api, auto, local, static.
--verify-tlsVerify TLS certificates (default)
--yesSkip confirmation prompt

sgit vault derive-keys

Derive vault_id / read_key / write_key / file ids from a vault key or {read_key}:{vault_id} (plumbing: bare hex output, accepts sgit_private_/sgit_public_ prefixes)

sgit vault derive-keys <vault_key>
ArgumentWhat it is
vault_keyrequiredVault key ({passphrase}:{vault_id}), {read_key_hex}:{vault_id}, or either with its sgit_private_vault_/sgit_private_read_/sgit_public_read_ prefix

sgit vault format

Show or raise the vault format gate (object-id width, minimum client, features)

sgit vault format [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--base-urlAPI base URL
--featureAdd a feature flag (e.g. signatures-required); repeatable
--min-clientRefuse clients older than this version, by name
--remove-featureRemove a feature flag; repeatable
--setRaise the format: 2 = new objects get 128-bit (32-hex) ids; existing objects keep theirs, no move
--tokenAccess token

sgit vault ignore

Show always-ignored folders, or deliberately remove a now-ignored folder from the vault

sgit vault ignore [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--applyRemove tracked files under FOLDER from the vault in one visible commit; the work tree is untouched
--yesSkip the confirmation prompt

sgit vault info

Show vault identity, remote, branch, and web URL

sgit vault info [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--base-urlAPI base URL
--tokenAccess token

sgit vault list

List stored vault aliases

sgit vault list

sgit vault mirror

Copy a published vault you cannot read (custody without access) — keyless, verifiable

sgit vault mirror [options] [source] [dest]
ArgumentWhat it is
sourceoptionalPublished URL or folder to mirror from
destoptionalDestination folder
OptionWhat it does
--verifyRe-check an existing mirror without fetching

sgit vault move

Move vault to a new identity (key rotation + optional server move)

sgit vault move [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--cleanupFinish or roll back a partially-completed move
--dry-runWalk all 8 steps without any side effects
--new-keyNew vault key (auto-generated if omitted)
--reasonReason recorded in the sentinel commit
--toTarget API URL (same server if omitted)
--tokenSG/Send access token
--yesSkip all interactive prompts (CI / scripted use)

sgit vault rekey

Replace the vault key and re-encrypt all content

sgit vault rekey [options]
OptionWhat it does
--jsonOutput result as JSON
--new-keyNew vault key to use (generated if omitted)
--yesSkip confirmation prompts

sgit vault rekey check

Show vault state without making changes

sgit vault rekey check [directory]
ArgumentWhat it is
directoryoptional

sgit vault rekey commit

Commit all files under the current key (run after init)

sgit vault rekey commit [directory]
ArgumentWhat it is
directoryoptional

sgit vault rekey init

Re-initialise vault with a new key (run after wipe)

sgit vault rekey init [options] [directory]
ArgumentWhat it is
directoryoptional
OptionWhat it does
--new-keyKey to use (generated if omitted)

sgit vault rekey wipe

Wipe local encrypted store only (.sg_vault/ removed, files kept)

sgit vault rekey wipe [options] [directory]
ArgumentWhat it is
directoryoptional
OptionWhat it does
--yesSkip confirmation prompt

sgit vault remote

Manage vault remotes

sgit vault remote

sgit vault remote add

Add a remote

sgit vault remote add [options] <name> <url> [remote_vault_id]
ArgumentWhat it is
namerequiredRemote name (e.g. origin)
urlrequiredRemote API URL
remote_vault_idoptionalRemote vault ID (defaults to current vault)
OptionWhat it does
--defaultSet as the default remote
--directory, -dVault directory (default: .)
--no-health-checkSkip connectivity check on add
--no-verify-tlsSkip TLS certificate verification

sgit vault remote list

List configured remotes

sgit vault remote list [options]
OptionWhat it does
--directory, -dVault directory (default: .)

sgit vault remote remove

Remove a remote

sgit vault remote remove [options] <name>
ArgumentWhat it is
namerequiredRemote name to remove
OptionWhat it does
--directory, -dVault directory (default: .)

sgit vault remote rename

Rename a remote

sgit vault remote rename [options] <old_name> <new_name>
ArgumentWhat it is
old_namerequiredCurrent remote name
new_namerequiredNew remote name
OptionWhat it does
--directory, -dVault directory (default: .)

sgit vault remote set-default

Set the default remote

sgit vault remote set-default [options] <name>
ArgumentWhat it is
namerequiredRemote name to set as default
OptionWhat it does
--directory, -dVault directory (default: .)

sgit vault remote set-url

Update the URL of a remote

sgit vault remote set-url [options] <name> <new_url>
ArgumentWhat it is
namerequiredRemote name
new_urlrequiredNew API URL
OptionWhat it does
--directory, -dVault directory (default: .)
--no-health-checkSkip connectivity check against the new URL

sgit vault remote show

Show details of a remote

sgit vault remote show [options] <name>
ArgumentWhat it is
namerequiredRemote name
OptionWhat it does
--directory, -dVault directory (default: .)

sgit vault remove

Remove a stored vault key

sgit vault remove <alias>
ArgumentWhat it is
aliasrequiredVault alias to remove

sgit vault restore

Restore a vault from a backup zip

sgit vault restore [options] <source> <destination>
ArgumentWhat it is
sourcerequiredBackup zip path, or vault-dir:backup-id
destinationrequiredTarget directory to restore into
OptionWhat it does
--keyVault key (required for expanded if not in zip)
--modebare: vault only; expanded: vault + working copy (default: expanded) One of: bare, expanded.
--verbosePrint each file as it is written (vault objects and working copy)
--yesSkip confirmation prompts

sgit vault serve

Moved: sgit serve --static

sgit vault serve [rest]
ArgumentWhat it is
restoptional

sgit vault show

Show vault key for an alias

sgit vault show <alias>
ArgumentWhat it is
aliasrequiredVault alias

sgit vault show-key

Show the vault key for the current directory

sgit vault show-key [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)

sgit vault stash

Stash uncommitted changes

sgit vault stash [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)

sgit vault stash drop

Drop last stash without applying

sgit vault stash drop [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)

sgit vault stash list

List stashes

sgit vault stash list [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)

sgit vault stash pop

Restore last stash

sgit vault stash pop [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)

sgit vault tag

Named, signed release pointers

sgit vault tag [options]
OptionWhat it does
--base-urlAPI base URL (overrides --remote, global --base-url, and saved config)
--directory==SUPPRESS==
--no-verify-tlsSkip TLS certificate verification (staging / self-signed only)
--remoteUse the named remote (URL + tls_verify from saved config); overrides the default remote for this command
--tokenSG/Send access token (overrides global --token and saved config)
--transportHow to reach the vault: auto (default — a folder is local, an http(s) host is api unless its batch endpoint is absent), api (live SG/API), static (any GET host, read-only), local (a folder, read-only) One of: api, auto, local, static.
--verify-tlsVerify TLS certificates (default)

sgit vault tag create

Tag a pushed commit (default: this clone's head)

sgit vault tag create [options] <name> [commit]
ArgumentWhat it is
namerequiredTag name, e.g. v1.0 or release/2026-10
commitoptionalCommit id, short id or tag (default: HEAD)
OptionWhat it does
--base-urlAPI base URL (overrides --remote, global --base-url, and saved config)
--directoryVault directory (default: .)
--forceRe-point an existing tag on purpose
--no-verify-tlsSkip TLS certificate verification (staging / self-signed only)
--remoteUse the named remote (URL + tls_verify from saved config); overrides the default remote for this command
--tokenSG/Send access token (overrides global --token and saved config)
--transportHow to reach the vault: auto (default — a folder is local, an http(s) host is api unless its batch endpoint is absent), api (live SG/API), static (any GET host, read-only), local (a folder, read-only) One of: api, auto, local, static.
--verify-tlsVerify TLS certificates (default)
-m, --messageTag message

sgit vault tag delete

Delete a tag

sgit vault tag delete [options] <name> [directory]
ArgumentWhat it is
namerequired
directoryoptionalVault directory (default: .)
OptionWhat it does
--base-urlAPI base URL (overrides --remote, global --base-url, and saved config)
--no-verify-tlsSkip TLS certificate verification (staging / self-signed only)
--remoteUse the named remote (URL + tls_verify from saved config); overrides the default remote for this command
--tokenSG/Send access token (overrides global --token and saved config)
--transportHow to reach the vault: auto (default — a folder is local, an http(s) host is api unless its batch endpoint is absent), api (live SG/API), static (any GET host, read-only), local (a folder, read-only) One of: api, auto, local, static.
--verify-tlsVerify TLS certificates (default)

sgit vault tag list

List the tags

sgit vault tag list [options] [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)
OptionWhat it does
--base-urlAPI base URL (overrides --remote, global --base-url, and saved config)
--no-verify-tlsSkip TLS certificate verification (staging / self-signed only)
--remoteUse the named remote (URL + tls_verify from saved config); overrides the default remote for this command
--tokenSG/Send access token (overrides global --token and saved config)
--transportHow to reach the vault: auto (default — a folder is local, an http(s) host is api unless its batch endpoint is absent), api (live SG/API), static (any GET host, read-only), local (a folder, read-only) One of: api, auto, local, static.
--verify-tlsVerify TLS certificates (default)

sgit vault tag show

Show a tag and verify its signature

sgit vault tag show [options] <name> [directory]
ArgumentWhat it is
namerequired
directoryoptionalVault directory (default: .)
OptionWhat it does
--base-urlAPI base URL (overrides --remote, global --base-url, and saved config)
--no-verify-tlsSkip TLS certificate verification (staging / self-signed only)
--remoteUse the named remote (URL + tls_verify from saved config); overrides the default remote for this command
--tokenSG/Send access token (overrides global --token and saved config)
--transportHow to reach the vault: auto (default — a folder is local, an http(s) host is api unless its batch endpoint is absent), api (live SG/API), static (any GET host, read-only), local (a folder, read-only) One of: api, auto, local, static.
--verify-tlsVerify TLS certificates (default)

sgit vault uninit

Remove vault metadata (.sg_vault/), creating an auto-backup zip first

sgit vault uninit [directory]
ArgumentWhat it is
directoryoptionalVault directory (default: .)

This page as markdown · its source, admin/content/reference/sgit-cli-reference.json