Introducing Rucksack: A place to store your one-liners
December 23, 2021
I’ve been administering Linux systems for several years across a few jobs, and one thing has remained fairly constant: I always keep a file called
useful_stuff.txt on my desktop. Invariably, this contains some crazy one-liners that I’ve come up with. Sometimes they’re fairly generic (such as how to parse an Apache log file and find the top IP addresses), while other times they’re very specialized to the applications run by the company.
A few years ago, I had a simple idea: wouldn’t it be great if I had an interactive command line tool to store my one-liners and hard to remember commands? In my mind, I could launch this tool and be presented with a menu of potential commands, along with auto-completion of any needed arguments.
A few months ago, I finally decided to sit down and write such a tool. Introducing Rucksack: A place to store your useful one-liners.
Very simply, Rucksack lets you store your useful commands and one-liners in a YAML file. It then presents you with a friendly interface to run them from, including auto-completion of commands and arguments. Argument auto-completions can come from static lists, or even from the output of other commands!
If this sounds interesting, check out the README and the tutorial for more info, and be sure to provide any feedback via GitHub Issues.
Previous article: Signals and the "kubectl delete" command
Next article: Referencing one subnet per AZ with Terraform