cli.sgit.ai / Command reference / sgit clone

sgit clone

Clone a vault from the remote server.

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

sgit clone [options] <vault_key> [directory]
ArgumentWhat it is
vault_keyrequiredVault key — one of: {passphrase}:{vault_id} (full clone), {read_key_hex}:{vault_id} (auto-detects read-only), or just {vault_id} when --read-key is set; - reads it from stdin (keeps it out of argv and history)
directoryoptionalDirectory to clone into (default: vault ID)
OptionWhat it does
--bareClone vault structure only — no working-copy files extracted (full implementation in B09; currently stubs)
--base-urlAPI base URL (overrides --remote, global --base-url, and saved config)
--depthShallow clone: fetch only the newest N commits of history (1 = HEAD only). Commit, push and pull work normally; history commands stop at the boundary (sgit fetch --unshallow).
--forceDelete existing directory and re-clone from scratch
--no-verify-tlsSkip TLS certificate verification (staging / self-signed only)
--pathScoped clone: hold only this vault folder (repeatable). Other folders are carried by id and never downloaded; commits and pulls touch only the held folders. Widen later with sgit fetch <folder>.
--read-keyRead-only clone using a 64-hex AES-256 read key. When set, the positional vault_key is the vault_id only (no passphrase prefix). Equivalent shorthand: pass "<HEX>:<vault_id>" as the positional.
--remoteUse the named remote (URL + tls_verify from saved config); overrides the default remote for this command
--sparseDownload only structure (commits + trees); fetch file content on demand
--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)

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