2 releases
| 0.1.2 | Jul 23, 2025 |
|---|---|
| 0.1.0 | Oct 13, 2024 |
#957 in Command line utilities
74 downloads per month
26KB
323 lines
sq(squirrel): command-line snippet manager
sq(squirrel) is a command-line snippet manager based on Just(command runner).
- Bash version: argc(Bash framework)
- Rust version: native bin without bash and argc required
Features
Commands
- list: list snippet -
sq list - add: add new snippet -
sq addorsq add - edit: edit snippet -
sq edit snippet_name
Bash Edition
Get started
- Please install Just and argc first.
- Clone the repository to
$HOME/sq:git clone git@github.com:linux-china/sq.git $HOME/sq - Add the
sqdirectory to your PATH:export PATH=$PATH:/path/to/sq - Run
sq listto see the available snippets
Rust edition
- Install:
cargo binstall sq-cli
Why sq(squirrel)?
- Simple: sq is written by Bash and argc, easy to understand and modify
- Just: professional command runner with lots of features, good to save and run commands
- UX:
snippet.justis normal justfile, and easy to edit with your favorite editor
Pueue & sq
If you want to run cron job, and you can use pueue with sq. Instead of sending command line to pueue, you can use sq:
- Flexible to change script after added to pueue
- Easy to manage script with sq, no shell escaping, no worry about long command line.
References
- argc: a Bash CLI framework
- just: a command runner
- pet: Simple command-line snippet manager
- Just VSCode plugin: https://marketplace.visualstudio.com/items?itemName=skellock.just
- Just JetBrains plugin: https://github.com/linux-china/jetbrains-just-plugin
- Justfile cheat sheet: https://cheatography.com/linux-china/cheat-sheets/justfile/
- pueue: https://github.com/Nukesor/pueue
Dependencies
~15–30MB
~462K SLoC