$ u --help
User script manager and executor
Usage: u <script> [args...]
Options:
--help Print this help message and exit
Available scripts:
scripts/create (create) Create a new script
scripts/delete (delete) Permanently delete a script
scripts/edit (edit) Edit a script with $EDITOR
scripts/help (help, list) List available scripts
Available templates:
bash A shell script runnable with bash
perl A perl script
python2 A python2 script
python3 A python3 script
python3-uv A python3 script runnable with uv
ruby A ruby script
sh A shell script runnable with sh
I had an unorganized collection of scripts that were lying around in various directories, and I thought it would be interesting to build a small tool to manage them.
There are two novel ideas about this implementation:
$HOME/.uscripts
├── scripts/
│ ├── scripts.create/
│ ├── scripts.delete/
│ ├── scripts.edit/
│ └── scripts.help/
├── templates/
│ ├── bash/
│ ├── perl/
│ ├── python2
│ ├── python3/
│ ├── python3-uv/
│ ├── ruby/
│ └── sh/
├── utils/
├── main.py
└── manifest.json
I’ve actually found this to be pretty useful, especially using uv
to eval python scripts with
dependencies declared in a special comment at the top of the file – thus
eliminating the need for a virtualenv or a requirements.txt file.
There’s a lot more I could do with this (semantic search??) but for now it’s suited my needs well.