Your shell history: synced, queryable, and in context


Bash scripting is powerful, keep track of how you use it


Bash keeps a list of every command you run locally, but this list of commands is devoid of context (where did I run that command? what was the output of the command? how long did it take to run?) and it is easily corrupted (open two terminals at once? Say goodbye to your bash history!).

Hishtory keeps track of the command you ran, how long it took to run, whether it succeeded or failed, where you ran it, and on what machine. It syncs this information across all your machines, so you can always find that useful bash pipeline you wrote a month ago.

Setup Process



To install hishtory on your first machine:
       curl -o hishtory https://hishtory.dev/binaries/hishtory-linux; chmod +x hishtory; ./hishtory install

To install hishtory on your second machine, you must first retrieve your secret key from first first machine. To do so, run hishtory status and copy your "Secret Key". Then to install it on your second machine:
       curl -o hishtory https://hishtory.dev/binaries/hishtory-linux; chmod +x hishtory; ./hishtory install $YOUR_HISHTORY_SECRET

FAQ


Hishtory hooks into your shell to record everything you could want to know about your shell history. It supports two modes:
  1. Offline mode: It persists all this data in a local SQLite database
  2. Online mode: Only if you opt-in, it syncs this data between all your machines so your history is immediately queryable from every one of your machines

Yes! The default is to use it in the offline mode where your shell history stays 100% local and never leaves your machine. Only if you opt-in will it be synced to your other machines with hishtory installed.

If it works for you, great! But I find I constantly get annoyed with `.bash_history` either because I lose context (which directory do I need to run that command from?) or because I full on lose the file (it tends to get corrupted if you open multiple terminals at the same time).

Yes! This is just a hobby project for me that I use, and I hope other people get some use out of.

Made with ❤️ by David Dworken. I'm a Security Engineer working at Google. I built this to solve a problem for myself, and wanted to share it with others who may find it useful.

Feedback, thoughts, ideas, or other questions? Let us know