<h2class="text-white mt-0">Bash scripting is powerful, keep track of how you use it</h2>
<hrclass="divider light my-4">
<pclass="text-white-50 mb-4"> 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!). <br>
<br> 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.
<br>To install hishtory on your second machine, you must first retrieve your secret key from first first machine. To do so, run <code>hishtory status</code> and copy your "Secret Key".
<buttonclass="btn btn-link"type="button"data-toggle="collapse"data-target="#collapseZero"aria-expanded="true"aria-controls="collapseZero"> How does this work? </button>
<divclass="card-body"> Hishtory hooks into your shell to record everything you could want to know about your shell history. It supports two modes: <ol>
<li>Offline mode: It persists all this data in a local SQLite database</li>
<li>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</li>
</ol>
</div>
</div>
</div>
<divclass="card">
<divclass="card-header"id="headingOne">
<h2class="mb-0">
<buttonclass="btn btn-link collapsed"type="button"data-toggle="collapse"data-target="#collapseOne"aria-expanded="false"aria-controls="collapseOne"> Can I use this without syncing my bash history to the internet? </button>
<divclass="card-body"> 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. </div>
</div>
</div>
<divclass="card">
<divclass="card-header"id="headingTwo">
<h2class="mb-0">
<buttonclass="btn btn-link collapsed"type="button"data-toggle="collapse"data-target="#collapseTwo"aria-expanded="false"aria-controls="collapseTwo"> What about `.bash_history`? </button>
<divclass="card-body"> 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). </div>
</div>
</div>
<divclass="card">
<divclass="card-header"id="headingThree">
<h2class="mb-0">
<buttonclass="btn btn-link collapsed"type="button"data-toggle="collapse"data-target="#collapseThree"aria-expanded="false"aria-controls="collapseThree"> Is this free? </button>
<buttonclass="btn btn-link collapsed"type="button"data-toggle="collapse"data-target="#collapseFour"aria-expanded="false"aria-controls="collapseFour"> Who made this? </button>
<divclass="card-body"> Made with ❤️ by <ahref="https://daviddworken.com">David Dworken</a>. 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. </div>