Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Reference

Shard exposes a unified CLI with Git-like ergonomics. All commands support a --json flag for machine-readable output.

CommandWhat it doesKey flags
initInitialize a repository--private, --db flat|sled|sqlite, --compression zstd|zlib|none, --chunker fixed|rabin, --passphrase
add <path>Stage files for commit(recursive for directories)
commitCreate a signed commit-m <msg>, --author <name>
logShow commit history--json
checkout <commit>Restore files from commit--json
statusShow working tree state--json
verify <commit>Verify integrity + signature--json
diff <commit1> <commit2>Compare two commits--json
pruneRemove unreachable objects--json
tagManage commit tagsadd, list, delete
branchManage branchescreate, delete, list
merge <branch>Merge branch into current HEAD-m <msg>, --author <name>
configView/edit configurationget, set
shareAnnounce commits to P2P network--json
syncDiscover + fetch from peers--json
pull <peer> <commit>Pull commit from specific peer--json
push <peer>Push commits to peer--json
peer add <multiaddr>Add a known peer--public-key <hex>
backup <output>Create a tar.gz backup--json
restore <backup>Restore repo from backup--json
export <commit> <dir>Reconstruct commit to directory--json
import <dir>Ingest directory as commit-m <msg>, --author <name>
recoverRecover from WAL crash--json
healthShow repository diagnostics + metrics--json
serveStart HTTP API server--addr <host:port>
unlockCache passphrase for session--passphrase
relayStart P2P relay node--listen <multiaddr>
transferManage P2P transfer queuelist, remove
keyManage signing keysrotate, list, verify, add-authorized, remove-authorized, list-authorized
completionsGenerate shell completionsbash, zsh, fish, elvish, powershell

Global flags

FlagEffect
--jsonMachine-readable JSON output
--log-formatLog output format: plain (default) or json
--verboseDebug-level logging