File Operations

Once you've set up your Sietch vault, you'll need to know how to work with files inside it. Sietch provides several commands for adding, retrieving, and managing files within your encrypted vault.


Adding Files

sietch add

The add command lets you add files or directories to your vault. Files are automatically chunked, encrypted, and stored according to your vault's configuration.

Bash
$sietch add ../secrets/thumper-plans.pdf /docs/
Click to copy

Options:

OptionTypeDescription
--recursiveflagRecursively add directories
--compressstringOverride default compression
--excludestringExclude patterns (e.g., *.tmp)
--dry-runflagShow what would be added without changes
Basic Usage
# Add a single file to the vault
sietch add document.pdf
Add to Path
# Add a file to a specific path in the vault
sietch add research.pdf /research/
Add Directory
# Add entire directory recursively
sietch add --recursive ./field-notes/
Files added to your vault are immediately encrypted and can only be accessed with your encryption keys.

Extracting Files

sietch extract

Extract files from your vault to the filesystem.

Bash
$sietch extract document.pdf ./output/
Click to copy

Options:

OptionTypeDescription
--output-dirstringDirectory to extract files to
--preserve-pathsflagMaintain directory structure
--overwriteflagOverwrite existing files
Extract Single File
# Extract a file to current directory
sietch extract document.pdf
Extract to Directory
# Extract a file to a specific directory
sietch extract document.pdf ./extracted/
Extract Multiple Files
# Extract multiple files (supports glob patterns)
sietch extract "research/*.pdf" ./output/

Decrypting Files

sietch decrypt

The decrypt command allows you to decrypt files directly from the vault.

Bash
$sietch decrypt thumper-plans.pdf .
Click to copy

Options:

OptionTypeDescription
--outputstringOutput file path
--tempflagDecrypt to temporary file
--verifyflagVerify file integrity after decryption

Security Considerations


Listing Files

sietch list

View the contents of your vault.

Bash
$sietch list
Click to copy

Options:

OptionTypeDescription
--pathstringList specific path
--formatstringOutput format: text, json
--recursiveflagShow all files recursively
--detailsflagShow chunk count, size, modified time
List All Files
# List all files in the vault
sietch list
List Specific Directory
# List files in a specific directory
sietch list --path /research/
Detailed Listing
# Show detailed information about files
sietch list --details

Advanced File Operations

sietch status

Check the status of files in your vault.

Bash
$sietch status
Click to copy

This command shows:

  • Files staged for sync
  • Files with conflicts
  • Recently modified files
  • Sync status with known peers

sietch diff

Compare files across versions or with peers.

Bash
$sietch diff document.pdf --peer 192.168.1.42
Click to copy

Options:

OptionTypeDescription
--peerstringCompare with peer's version
--versionstringCompare with specific version
--outputstringOutput format: text, json

sietch rm

Remove files from your vault.

Bash
$sietch rm outdated.pdf
Click to copy
  • Removes files from the vault index
  • Can specify --purge to delete chunks (if not used by other files)
  • Use --dry-run to preview what would be removed

File Verification

sietch verify

Verify file integrity within your vault.

Bash
$sietch verify research.pdf
Click to copy
This command checks that files match their recorded hashes and that all chunks are present and uncorrupted.

Practical Examples

Working with Sensitive Documents

# Add a sensitive document to your vault
sietch add ~/Documents/passport-scan.pdf /identity/

# Verify the file was properly stored
sietch verify /identity/passport-scan.pdf

# Later, extract when needed
sietch extract /identity/passport-scan.pdf ~/temp/

Creating a Research Archive

# Add a directory of research documents
sietch add --recursive ~/research/desert-ecology/ /research/

# Check what's been stored
sietch list --path /research/ --details

# Sync with a collaborator
sietch sync --peer 192.168.1.42 --paths /research/

Next Steps:
Learn how to efficiently sync your vault with peers in various network conditions.