A snappy personal code snippet manager for your terminal.
Save, search, and copy snippets without leaving your workflow.
Install • Quick Start • Commands • Data •
You know that one-liner you Google every time? The tsconfig you copy from an old project? The regex you always lose?
snipit stores them locally, tagged and searchable, ready to copy to your clipboard in one command. No account, no sync, no internet — just a JSON file on your machine.
npm i -g @fouaden/snipitRequirements: Node.js 18+
macOS/Linux: If you get an EACCES permission error, run
sudo npm install -g @fouaden/snipit # This happens when npm's global folder is owned by root.# save a snippet
snipit save "kill port 3000" --code "lsof -ti:3000 | xargs kill" --tag node
# find it
snipit list --tag node
# grab it
snipit get "kill port 3000" --copy# inline code
snipit save "kill port 3000" --code "lsof -ti:3000 | xargs kill" --tag node
# from a file — reads the file content and stores it
snipit save "tsconfig base" --file ./tsconfig.json --tag ts
# multiline — opens your default editor
snipit save "async fetch" --tag jsTags are comma-separated and optional:
snipit save "docker prune" --code "docker system prune -af" --tag "docker,ops"snipit list # all snippets
snipit list --tag ts # filter by tag
snipit list --search "docker" # search by titlesnipit get "kill port 3000" # prints to terminal
snipit get "kill port 3000" --copy # prints + copies to clipboardSince output goes to stdout, you can pipe it too:
snipit get "tsconfig base" > tsconfig.json
snipit get "nginx config" | ssh user@server "cat > /etc/nginx/nginx.conf"snipit delete 3 # use the ID shown in snipit listsnipit import -f ./new-snippets.json
snipit export -o ./my-snippets.jsonSnippets are stored at ~/.snipit/snippets.json as a plain JSON file. No database, no server, no account.
{
"snippets": [
{
"id": 1,
"title": "kill port 3000",
"code": "lsof -ti:3000 | xargs kill",
"tags": ["node"],
"created": "2026-02-25"
}
],
"lastId": 1
}You can back it up, sync it with Dropbox, or commit it to a private repo — it's just a file.
MIT