A minimal CLI tool written in Rust to store, read, list, and delete snippet files locally.
Snippets are stored as plain files under ~/.config/.snippethold/ (or
/tmp/.config/.snippethold/ if $HOME is not set).
- Rust and
cargoinstalled.
git clone https://github.com/TechCore3/snippethold-rs.git
cd snippethold-rs
cargo build --releaseThe compiled binary will be located at target/release/snippethold.
You can also install it
cargo install --path .The compiled binary will be located at ~/.cargo/bin/snippethold
snippethold usage:
snippethold -s <file> <contents> (stores file)
snippethold -S <file> (shows file)
snippethold -l (lists files)
snippethold -r <file> (removes viles)
Save a snippet directly by passing the content as an argument:
snippethold -s my_snippet.txt "echo 'hello world'"Or pipe input from stdin:
cat script.sh | snippethold -s my_snippet.txtPrint the contents of a single snippet file to stdout:
snippethold -S my_snippet.txtList the file paths of all saved snippets:
snippethold -lDelete a stored snippet file:
snippethold -r my_snippet.txtAll files are created inside:
$HOME/.config/.snippethold//tmp/.config/.snippethold/(fallback if$HOMEis unset)
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE]