Description
pet is a simple command-line snippet manager written in Go. It lets you save, tag, search and run command-line snippets, so you do not have to remember complex or rarely used commands or dig through shell history. Snippets can use variables with one or several default values. You can search snippets interactively, run them directly, and edit them easily, since the config is a TOML file. Snippets can sync automatically through a GitHub Gist or GitLab Snippets. The README shows how to register the previous command as a snippet, and how to select snippets from the current line in bash, zsh and fish, similar to Ctrl-R. Snippets can also be copied to the clipboard. The project is about eight years old and is used by many developers. It can be installed from a binary release, through Homebrew on macOS, or from packages for Red Hat, Debian, Ubuntu and Arch Linux, or built from source.…
Highlights
- Save, tag, search and run command snippets
- Variables with default values in snippets
- Sync snippets via GitHub Gist or GitLab
- Select snippets from the current line in bash, zsh and fish
Ratings & Reviews
No ratings yet
Be the first to rate Pet.
People also visit
CodeExpander Pro
Cross-platform text expansion tool that instantly inserts snippets, code…
Pet FAQ
What is pet?
A command-line snippet manager that lets you save, tag, search and run commands.
How do I install it?
Grab a binary release, use Homebrew on macOS, or install from packages for Red Hat, Debian, Ubuntu and Arch Linux.
Can I sync my snippets?
Yes. Snippets can sync automatically through a GitHub Gist or GitLab Snippets.
How is it configured?
The config is a TOML file, and snippets can be edited directly.
What are the best Pet alternatives?
Popular alternatives to Pet include CodeExpander Pro, snips.sh and uPaste. See all Pet alternatives



