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:
Option | Type | Description |
---|---|---|
--recursive | flag | Recursively add directories |
--compress | string | Override default compression |
--exclude | string | Exclude patterns (e.g., *.tmp ) |
--dry-run | flag | Show what would be added without changes |
Basic Usage
# Add a single file to the vault
sietch add document.pdf
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:
Option | Type | Description |
---|---|---|
--output-dir | string | Directory to extract files to |
--preserve-paths | flag | Maintain directory structure |
--overwrite | flag | Overwrite existing files |
Extract Single File
# Extract a file to current directory
sietch extract document.pdf
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:
Option | Type | Description |
---|---|---|
--output | string | Output file path |
--temp | flag | Decrypt to temporary file |
--verify | flag | Verify file integrity after decryption |
Security Considerations
Listing Files
sietch list
View the contents of your vault.
Bash
$sietch list
Click to copy
Options:
Option | Type | Description |
---|---|---|
--path | string | List specific path |
--format | string | Output format: text , json |
--recursive | flag | Show all files recursively |
--details | flag | Show chunk count, size, modified time |
List All Files
# List all files in the vault
sietch list
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:
Option | Type | Description |
---|---|---|
--peer | string | Compare with peer's version |
--version | string | Compare with specific version |
--output | string | Output 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.
Learn how to efficiently sync your vault with peers in various network conditions.
Table of Contents