No description
| src | ||
| .gitignore | ||
| CMakeLists.txt | ||
| README.md | ||
skriv
Encrypted CLI note-taking application with markdown support and automatic categorization.
Features
- 🔐 AES-256 encryption via libsodium
- 📝 Markdown notes with $EDITOR integration
- 🏷️ Dynamic titles and categories from note content
- 🔄 Session-based authentication (1-hour timeout)
- 📦 Archive management
- 🎨 Colorful terminal interface
- 💾 Secure memory handling (mlock)
Dependencies
sudo pacman -S libsodium openssl cmake gcc
Installation
make install
Binary installs to ~/.local/bin/skriv (ensure it's in your PATH).
Usage
# First launch - set master password
skriv
# Subsequent launches use session (valid 1 hour)
skriv
Commands
| Command | Alias | Description |
|---|---|---|
new |
n |
Create new note |
list |
l |
List all notes |
edit |
e |
Select and edit note |
delete |
d |
Select and delete note |
archive |
a |
Archive note |
view |
v |
View/unarchive notes |
lock |
- | Lock vault and clear session |
quit |
q |
Lock and exit |
Note Format
Directory Structure
~/.local/share/skriv/
├── .key # Password salt
├── encrypted/ # Encrypted notes
├── decrypted/ # Temporary (cleared on lock)
└── archived/ # Archived notes
/dev/shm/skriv-<uid> # Session file (tmpfs)
Backup & Restore
Backup to USB
cd ~/.local/share/skriv
tar -czf /path/to/usb/skriv-backup-$(date +%Y%m%d).tar.gz .key encrypted/
Restore
mkdir -p ~/.local/share/skriv
tar -xzf /path/to/backup.tar.gz -C ~/.local/share/skriv
skriv # Unlock with your password
Note: Only .key and encrypted/ are needed for restore.
Security
- Encryption: AES-256 via libsodium secretbox
- Key Derivation: Argon2id (interactive parameters)
- Memory Protection:
mlock()prevents key swapping to disk - Session Storage: tmpfs (
/dev/shm) - cleared on reboot - Session Lifetime: 60 minutes
- File Permissions: 0600 on sensitive files