cli.sgit.ai / Command reference / sgit file

sgit file

File operations (cat, ls, write).

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

sgit file

Subcommands

sgit file cat

Decrypt and print a vault file to stdout

sgit file cat [options] <path> [directory]
ArgumentWhat it is
pathrequiredFile path inside the vault
directoryoptionalVault directory (default: .)
OptionWhat it does
--idPrint only the blob ID (zero network calls)
--jsonPrint file metadata as JSON (path, blob_id, size, content_type, fetched)

sgit file ls

List vault files with fetch status

sgit file ls [options] [path] [directory]
ArgumentWhat it is
pathoptionalSubdirectory or file path (default: root)
directoryoptionalVault directory (default: .)
OptionWhat it does
--idsInclude blob IDs in output
--jsonOutput full entry metadata as JSON array

sgit file write

Write a file directly to vault HEAD (agent/programmatic workflow)

sgit file write [options] <path> [directory]
ArgumentWhat it is
pathrequiredVault-relative file path to write
directoryoptionalVault directory (default: .)
OptionWhat it does
--alsoAdditional files to include atomically (repeatable)
--fileRead content from LOCAL_FILE instead of stdin
--jsonPrint result as JSON instead of plain text
--messageCommit message (auto-generated if omitted)
--pushPush immediately after writing; stdout contains only the blob ID

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