![]() |
Store code once, retrieve it anywhere. |
sinbo is a CLI snippet manager. Store code once, retrieve it anywhere.
Click to expand
macOS / Linux
curl -sSf https://raw.githubusercontent.com/sinbo-cli/sinbo/main/install.sh | shWindows
iwr https://raw.githubusercontent.com/sinbo-cli/sinbo/main/install.ps1 -UseBasicParsing | iexVia cargo
cargo install sinbosinbo add rust-test -e rs # open editor, save as a Rust snippet
sinbo get rust-test # print the snippet
sinbo copy rust-test # copy to clipboard
sinbo list # list all snippets
sinbo search "hello" # fuzzy search across all snippetssinbo opens your $EDITOR when adding or editing snippets. Set it in your shell config:
export EDITOR="vim" # Vim
export EDITOR="nvim" # Neovim
export EDITOR="nano" # Nano
export EDITOR="hx" # Helix
export EDITOR="code --wait" # VSCode (--wait is required)
export EDITOR="idea --wait" # IntelliJ (--wait is required)
export EDITOR="subl --wait" # Sublime (--wait is required)The
--extflag sets the temp file extension so your editor applies the right syntax highlighting.sinbo add my-snippet -e rsopens a.rsfile.
Add a new snippet. Opens $EDITOR if no input is piped.
sinbo add rust-test -e rs # open editor with .rs syntax
sinbo add center-div -f style.css # read from file
sinbo add docker-run -t docker infra # add with tags
sinbo add api-key --encrypt # encrypt with a password
echo "hello world" | sinbo add greeting # read from stdin| Flag | Short | Description |
|---|---|---|
--ext |
-e |
File extension for syntax highlighting |
--file-name |
-f |
Read content from a file |
--tags |
-t |
Tag the snippet |
--description |
-d |
Add a description to the snippet |
--encrypt |
Encrypt the snippet with a password |
Print a snippet to stdout. Prompts for a password if the snippet is encrypted.
sinbo get rust-test # print to stdout
sinbo get docker-run -a port=8080 name=myapp # substitute placeholders
sinbo get api-key # prompts for password if encrypted| Flag | Short | Description |
|---|---|---|
--args |
-a |
Substitute placeholders (key=value) |
--copy |
-c |
Copy to clipboard |
Copy a snippet to clipboard. Prompts for a password if the snippet is encrypted.
sinbo copy rust-test # copy to clipboard
sinbo copy docker-run -a port=8080 name=myapp # substitute then copy| Flag | Short | Description |
|---|---|---|
--args |
-a |
Substitute placeholders (key=value) |
List all saved snippets. Encrypted snippets are shown with a Locked indicator.
sinbo list # list all
sinbo list -t docker # filter by tag
sinbo list -s # show full content
sinbo list -p # preview first 25 characters| Flag | Short | Description |
|---|---|---|
--tags |
-t |
Filter by tags |
--show |
-s |
Show full snippet content |
--peek |
-p |
Preview first 30 characters of content |
Fuzzy search across snippet names and content. Encrypted snippet content is not searched.
sinbo search "docker run" # search all snippets
sinbo search "deploy" -t infra # search within a tag| Flag | Short | Description |
|---|---|---|
--tags |
-t |
Scope search to snippets with tag |
Edit an existing snippet in $EDITOR. Preserves extension for syntax highlighting. Encrypted snippets cannot be edited.
sinbo edit rust-test
sinbo edit rust-test -t rust testing # update tags while editing| Flag | Short | Description |
|---|---|---|
--tags |
-t |
Update tags |
--description |
-d |
Update description |
Rename an existing snippet.
sinbo rename old-name new-nameDelete a snippet. Prompts for confirmation.
sinbo remove rust-testEncrypt an existing plaintext snippet. Prompts for a password twice. The plaintext file is removed after encryption.
sinbo encrypt api-keyPermanently decrypt an encrypted snippet back to plaintext. Prompts for the password.
sinbo decrypt api-keyTags let you group and filter snippets:
sinbo add nginx-conf -t infra server
sinbo add k8s-deploy -t infra k8s
sinbo list -t infra # shows both
sinbo search "deploy" -t infra # search within infra tagSensitive snippets like API keys and tokens can be encrypted at rest.
sinbo add github-token --encrypt # new encrypted snippet
sinbo encrypt github-token # encrypt an existing snippet
sinbo decrypt github-token # permanently decrypt
sinbo get github-token # prompts for passwordEncryption uses AES-256-GCM with Argon2id key derivation. The plaintext never touches disk, only the .enc file is stored. Encrypted snippets appear in list and search normally, but their content is never shown or searched.
Warning
sinbo encryption protects against casual filesystem access. It is not a substitute for a dedicated secrets manager like Bitwarden for high-value credentials.
Warning
.enc files are binary. Do not open or edit them in a text editor, any modification will corrupt the file permanently.
Snippets can contain placeholders using the SINBO:name: 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 myappFallback values are supported, if no -a value is provided the fallback is used:
# snippet content:
docker run -p SINBO:port:8080: -it SINBO:name:myapp:
# usage without args:
sinbo get docker-run
# output: docker run -p 8080 -it myappSnippets can be exported to .sinbo.json files and imported back.
sinbo export docker-run # export to current directory
sinbo export docker-run -p ~/backups # export to a specific directory
sinbo import ~/backups/docker-run.sinbo.json # import from fileEncrypted snippets cannot be exported, decrypt them first. If a name conflict is detected on import or export, sinbo will prompt you to overwrite or rename.
Since sinbo get prints to stdout, snippets compose naturally with other tools:
sinbo get deploy-script | sh # run a shell snippet
sinbo get query | psql mydb # pipe into psql
sinbo get nginx-conf | sudo tee /etc/nginx/nginx.conf # write to a file
sinbo get docker-run -a port=8080 | sh # substitute then runbash
echo 'eval "$(sinbo completions bash)"' >> ~/.bashrc && source ~/.bashrczsh
echo 'eval "$(sinbo completions zsh)"' >> ~/.zshrc && source ~/.zshrcfish
sinbo completions fish > ~/.config/fish/completions/sinbo.fishpowershell
Add-Content $PROFILE "`nsinbo completions powershell | Invoke-Expression"sinbo-lsp provides inline snippet completions in any editor. Type sinbo: to get a completion list of all your saved snippets, selecting one inserts the full content.
See sinbo-lsp/README.md for installation and editor setup.
Snippets are stored as plain files in your system config directory:
- Linux/macOS:
~/.config/sinbo/snippets/ - Windows:
%APPDATA%\sinbo\snippets\
| File | Contents |
|---|---|
{name}.code |
Plaintext snippet content |
{name}.enc |
Encrypted snippet content |
{name}.meta.json |
Tags, extension, and timestamp |
Plain .code files are grep-able, copyable, and easy to back up directly.
MIT - LICENSE

