The Read module enables reading and displaying file contents directly from the vault without downloading to disk.
The Read module allows you to view file contents in the terminal, useful for:
- Quickly viewing text files without saving to disk
- Verifying file contents before full download
- Sharing content via terminal without creating temporary files
- Reducing disk I/O for frequent lookups
Read and display the contents of a file directly from the vault.
Usage:
./zep read <vault-path> [--shared <share-string>]Aliases: cat, view, display
Arguments:
vault-path: Path to file in vault
Flags:
--shared <share-string>: Read a shared file using share reference
./zep read documents/notes.txtOutput:
Here are my notes for today...
Line 1
Line 2
...
./zep read config/settings.jsonRecipients can read shared files without downloading:
./zep read _ --shared "username:shareref:password:RmlsZW5hbWU="Combine with other commands:
# Search for files and read matches
./zep search notes | xargs -I {} ./zep read {}
# Process content with grep
./zep read documents/log.txt | grep ERROR- Find file in vault index
- Fetch encrypted file from GitHub
- Decrypt using file's encryption key
- Display to stdout
The Read module:
- Outputs raw file content to stdout
- Handles binary files (may appear as garbage)
- Respects terminal encoding
- Works with pipes and redirection
For vault files:
- Locate file in index → get storage ID and encryption key
- Fetch encrypted data from GitHub (file stored as hex ID)
- Decrypt with PBKDF2-derived key using AES-256-GCM
- Verify authentication tag (GCM)
- Output to stdout
For shared files:
- Fetch encrypted pointer file
- Decrypt pointer with share password
- Parse JSON to get file's storage ID and encryption key
- Fetch and decrypt file (same as vault files)
- Output to stdout
# Read and review setup guide before proceeding
./zep read docs/README.md# Check file size and type without full download
./zep read metadata/info.txt# Find specific text in files
./zep read path/to/file.txt | grep "search term"# View config files without temporary files
./zep read config/database.conf# Tail recent entries
./zep read logs/app.log | tail -20
# Count log lines
./zep read logs/app.log | wc -l
# Filter errors
./zep read logs/error.log | grep FATALReading binary files (images, PDFs, archives) to terminal:
- May display as gibberish
- Not recommended for non-text files
- Use
downloadinstead for binary files
Large files read to terminal:
- Load entirely into memory
- May take time with large files
- No progress indicator during read
- Consider download for large files
Terminal encoding may affect display:
- UTF-8 files work best
- Non-UTF-8 content may display incorrectly
- Binary content always appears as gibberish
Each read operation:
- Fetches encrypted file from GitHub (network I/O)
- Decrypts locally (CPU-bound)
- Outputs to stdout
Performance depends on:
- File size
- Network latency
- Terminal speed (if piped)
- Entire file loaded into memory
- Not suitable for extremely large files
- Consider download + streaming for large logs
Reading sensitive files displays content in terminal:
- Appears in shell history (consider
history -c) - May be logged by terminal multiplexer
- Could be captured by clipboard managers
- Consider environment before reading sensitive data
When reading shared files:
- Share password is passed on command line (visible in process list)
- Considersecure sharing methods for sensitive content
- Share links should use secure distribution channels
Read command works with:
- Vault index lookup
- Encryption/decryption
- Shared file system
- Terminal output
| Task | Command | Benefit |
|---|---|---|
| Save to disk | download |
Persistent file, better for binary |
| Search content | search |
Find by filename/path |
| List files | ls |
Browse vault structure |
| View metadata | info |
File stats without content |
- Download Module - Save files to disk
- Search Module - Find files by name
- Shared Files - Share via reference
- Encryption Module - How decryption works