I built a CLI snippet manager in Rust because I was tired of googling the same things

I have a habit. Every time I sit down to code I end up googling the same thing, how to center a div, the Rust test module boilerplate, docker run flags, ffmpeg commands. Every. Single. Time.

So I built sinbo, a CLI snippet manager that lets you store code once and retrieve it anywhere.

sinbo add docker-run -t docker        # save it once
sinbo get docker-run                  # get it anywhere
sinbo copy docker-run                 # or copy to clipboard

What it does

Snippets are stored locally as plain files in your config directory. No cloud, no account, no sync. Just files you own.

You can tag snippets, add descriptions, and filter by tag:

sinbo add nginx-conf -t infra server -d "default nginx config"
sinbo list -t infra
sinbo search "nginx"

Encryption

The feature I am most proud of, sensitive snippets like API keys and tokens can be encrypted at rest using AES-256-GCM with Argon2id key derivation.

sinbo add github-token --encrypt
sinbo get github-token   # prompts for password

The plaintext never touches disk. Only the .enc file is stored.

Variable placeholders

Snippets can contain placeholders using a custom SINBO:var: syntax:

# snippet content:
docker run -p SINBO:port: -it SINBO:name:

# usage:
sinbo get docker-run -a port=8080 name=myapp
# output: docker run -p 8080 -it myapp

Piping

Since sinbo get prints to stdout it composes naturally with other tools:

sinbo get deploy-script | sh
sinbo get query | psql mydb
sinbo get docker-run -a port=8080 | sh

Shell completions

Tab completion for snippet names works out of the box for bash, zsh, fish and powershell:

echo 'eval "$(sinbo completions bash)"' >> ~/.bashrc && source ~/.bashrc

Then sinbo get [TAB] shows your actual snippet names.

What I learned

This was my first time implementing real encryption in Rust. The aes-gcm and argon2 crates made it approachable but I still had to understand the underlying concepts to use them correctly. Building sinbo pushed me to actually learn AES-256-GCM, why nonces matter, and what Argon2id does.

Try it

cargo install sinbo

github: https://github.com/opmr0/sinbo

Would love any feedback or ideas❤️.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Companies expand AI adoption while keeping control

Next Post

Strengthening enterprise governance for rising edge AI workloads

Related Posts