CLI Reference
Sietch is a secure, decentralized file system designed for operation in harsh, disconnected environments. It allows users to securely synchronize encrypted data across machines, even with limited connectivity. This reference documents all available commands, their options, and practical examples.
Global Flags
These flags are available for all sietch commands:
-v, --verbose- Enable verbose output-h, --help- Show help for any command
Core Commands Overview
Vault Management
init- Initialize a new Sietch vaultscaffold- Scaffold a vault from templates
File Operations
add- Add files to your vaultget- Retrieve files from your vaultdelete- Delete files from your vaultls- List files in your vault
Sync & Discovery
sync- Synchronize with another vaultdiscover- Discover peers on local networksneak- Transfer data via sneakernet (USB, physical media)
Maintenance
dedup- Manage deduplication and storage optimizationcompletion- Generate shell autocompletion
Vault Management
sietch init
Initialize a new Sietch vault with secure encryption and configurable options. This creates the necessary directory structure and configuration files for your vault.
Key Options:
| Option | Type | Default | Description |
|---|---|---|---|
--name | string | my-sietch | Name of the vault |
--path | string | . | Path to create the vault |
--key-type | string | aes | Encryption type: aes, gpg, or none |
--passphrase | flag | - | Protect key with passphrase |
--passphrase-value | string | - | Passphrase value (NOT RECOMMENDED) |
--key-file | string | - | Path to existing key file |
Encryption & Security:
| Option | Type | Default | Description |
|---|---|---|---|
--aes-mode | string | gcm | AES encryption mode (gcm, cbc) |
--use-scrypt | flag | - | Use scrypt for key derivation |
--scrypt-n | int | 32768 | scrypt N parameter |
--scrypt-r | int | 8 | scrypt r parameter |
--scrypt-p | int | 1 | scrypt p parameter |
--rsa-bits | int | 4096 | RSA key size (min 2048) |
Storage Configuration:
| Option | Type | Default | Description |
|---|---|---|---|
--chunking-strategy | string | fixed | Chunking strategy: fixed or cdc |
--chunk-size | string | 4MB | Size of chunks |
--compression | string | none | Compression: none, gzip, or zstd |
--hash | string | sha256 | Hash algorithm: sha256 or blake3 |
Deduplication:
| Option | Type | Default | Description |
|---|---|---|---|
--enable-dedup | flag | true | Enable deduplication |
--dedup-strategy | string | content | Deduplication strategy |
--dedup-min-size | string | 1KB | Minimum chunk size for dedup |
--dedup-max-size | string | 64MB | Maximum chunk size for dedup |
--dedup-gc-threshold | int | 1000 | Unreferenced chunks before GC suggestion |
Other Options:
| Option | Type | Default | Description |
|---|---|---|---|
--interactive | flag | - | Use interactive mode |
--from-config | string | - | Initialize from config file |
--template | string | - | Use predefined template |
--force | flag | - | Force re-initialization |
--author | string | - | Author metadata |
--tags | strings | - | Tags for vault |
--sync-mode | string | manual | Sync mode: manual or auto |
Examples:
# Quickstart vault with defaults
sietch init
# Named vault with AES encryption
sietch init --name "desert-cache" --key-type aes --passphrase
sietch scaffold
Scaffold a new Sietch vault using predefined templates optimized for specific use cases.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--template | string | - | Template to use (required) |
--name | string | - | Name for the vault |
--path | string | - | Path where to create the vault |
--force | flag | - | Force creation even if directory exists |
--list | flag | - | List available templates |
Available Templates:
- photoVault - Optimized for photo storage with high compression and smart deduplication
- reporterVault - Optimized for journalism and document management with secure storage
Examples:
# List available templates
sietch scaffold --list
File Operations
sietch add
Add a file from your local filesystem to your Sietch vault.
Usage:
sietch add <source_path> <destination_path> [flags]
Options:
| Option | Type | Description |
|---|---|---|
--force | flag | Force add without confirmation |
--tags | string | Comma-separated tags for the file |
--passphrase-value | string | Passphrase for encrypted vault |
Examples:
# Add a document
sietch add document.txt vault/documents/
# Add with tags
sietch add report.pdf vault/reports/ --tags "urgent,quarterly"
sietch get
Retrieve a file from your Sietch vault and save it to your local filesystem.
Usage:
sietch get <file_path> <destination_path> [flags]
Options:
| Option | Type | Description |
|---|---|---|
--force | flag | Force overwrite if file exists |
--skip-decryption | flag | Retrieve raw chunks (for recovery) |
Examples:
# Get a specific file
sietch get document.txt ~/Documents/
# Get from subdirectory
sietch get vault/photos/vacation.jpg ./retrieved_photos/
sietch ls
List files stored in your Sietch vault with various display options.
Usage:
sietch ls [path] [flags]
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--long | flag | - | Use long listing format |
--tags | flag | - | Show file tags |
--sort | string | path | Sort by: name, size, time, path |
Examples:
# List all files
sietch ls
# List files in specific directory
sietch ls docs/
sietch delete
Delete a file from your Sietch vault and optionally clean up associated chunks.
Usage:
sietch delete <file_path> [flags]
Options:
| Option | Type | Description |
|---|---|---|
--force | flag | Force deletion without confirmation |
--keep-chunks | flag | Keep chunks, only delete manifest |
Examples:
# Delete a specific file
sietch delete docs/report.pdf
# Force delete without confirmation
sietch delete notes.txt --force
Sync & Discovery
sietch sync
Synchronize files with another Sietch vault over the network using libp2p.
Usage:
sietch sync [peer-address] [flags]
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--port | int | - | Port for libp2p (0 for random) |
--timeout | int | 60 | Discovery timeout in seconds |
--read-only | flag | - | Only receive files, don't send |
--force-trust | flag | - | Auto-trust new peers |
Examples:
# Auto-discover and sync with local peers
sietch sync
# Sync with custom timeout
sietch sync --timeout 30
sietch discover
Discover other Sietch vaults on your local network using mDNS.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--timeout | int | 60 | Discovery timeout in seconds |
--continuous | flag | - | Run until interrupted |
--port | int | - | Port for libp2p node |
--vault-path | string | . | Path to vault directory |
Examples:
# Run discovery with default settings
sietch discover
# Custom timeout
sietch discover --timeout 30
sietch sneak
Transfer files and chunks from another vault via sneakernet (USB drives, external media).
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--source | string | - | Source vault path |
--dest | string | current | Destination vault path |
--interactive | flag | true | Interactive vault selection |
--dry-run | flag | - | Show what would be transferred |
--files | strings | - | Specific file patterns to transfer |
--exclude | strings | - | File patterns to exclude |
--auto-resolve | flag | - | Auto-resolve conflicts by renaming |
Examples:
# Interactive discovery and selection
sietch sneak
# Dry run to see what would transfer
sietch sneak --source /media/usb/vault --dry-run
Maintenance
sietch dedup
Manage deduplication settings and operations in your Sietch vault.
Subcommands:
stats- Show deduplication statisticsgc- Run garbage collection on unreferenced chunksoptimize- Optimize vault storage
Examples:
# Show deduplication stats
sietch dedup stats
sietch completion
Generate autocompletion scripts for your shell.
Supported Shells:
bash- Bash completionfish- Fish completionzsh- Zsh completionpowershell- PowerShell completion
Examples:
# Generate bash completion
sietch completion bash > /etc/bash_completion.d/sietch
# Generate fish completion
sietch completion fish > ~/.config/fish/completions/sietch.fish
# Generate zsh completion
sietch completion zsh > ~/.config/zsh/completions/_sietch