Stinkpot: SQLite-Backed Shell History

nerdypepper1 pts0 comments

oppi.li/stinkpot at main · Tangled

oppi.li

stinkpot

Star

Fork

Atom

Configure Feed

Issues

Pull Requests

Commits

Tags

Feed URL

Select the types of activity you want to include in your feed.

sqlite-backed shell history

Star

Fork

Atom

Configure Feed

Issues

Pull Requests

Commits

Tags

Feed URL

Select the types of activity you want to include in your feed.

Go

82.5%

Nix

17.5%

main

No tags found

Code

Clone this repository

Use permalink

HTTPS

https://tangled.org/oppi.li/stinkpot<br>https://tangled.org/did:plc:wqstj3k5tslmm246baaf3tpa<br>getComputedStyle(s).display !== 'none').textContent)"<br>class="px-3 py-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"<br>title="Copy to clipboard"

SSH

git@tangled.org:oppi.li/stinkpot<br>git@tangled.org:did:plc:wqstj3k5tslmm246baaf3tpa<br>getComputedStyle(s).display !== 'none').textContent)"<br>class="px-3 py-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"<br>title="Copy to clipboard"

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz

Download .zip

.gitignore

3 days ago

flake.lock

6 days ago

flake.nix

3 days ago

go.mod

3 days ago

go.sum

6 days ago

main.go

3 days ago

readme.txt

3 days ago

Commits

readme

Signed-off-by: oppiliappan

:not(:empty)~:not(:empty)]:before:content-['·'] [&>:not(:empty)~:not(:empty)]:before:mx-1 [&>:not(:empty)~:not(:empty)]:before:select-none">

ff739923

oppi.li

1 hour ago

main

show timestamp in UI

Signed-off-by: oppiliappan

:not(:empty)~:not(:empty)]:before:content-['·'] [&>:not(:empty)~:not(:empty)]:before:mx-1 [&>:not(:empty)~:not(:empty)]:before:select-none">

1aa6d6d8

oppi.li

3 days ago

create idx on timestamp

speeds up reverse search, the sqlite plan now uses covering index<br>instead of temp b-tree for order-by

Signed-off-by: oppiliappan

:not(:empty)~:not(:empty)]:before:content-['·'] [&>:not(:empty)~:not(:empty)]:before:mx-1 [&>:not(:empty)~:not(:empty)]:before:select-none">

843bd02f

oppi.li

4 days ago

Branches

main

1 hour ago

Default

readme.txt

stinkpot

stinkpot is an sqlite backed shell-history searcher for<br>bash.

stinkpot is a much tinier atuin (https://atuin.sh). i have<br>been using atuin for a while, but i don't use most of its<br>features: the sync server, atuin AI, dotfiles manager,<br>script manager or the KV store. while sync is interesting,<br>my machines have very different setups and i tend to run<br>very different commands on them.

my only usecase for atuin was the session agnostic history<br>management, and the searcher TUI. stinkpot provides these<br>while being about 400 lines of go.

stinkpot is a tiny turtle species apparently, hence the<br>name.

develop

to build:

go build -o stinkpot .

usage

if you use home-manager for nixos, stinkpot has a<br>home-manager module:

home-manager.users. = {<br>imports = [<br>./home.nix<br>inputs.stinkpot.homeManagerModules.default<br>];<br>};

if not, just call eval the init script in your .bashrc:

eval "$(stinkpot init)"

start by importing your existing bash history into stinkpot:

stinkpot import

and then hit ctrl+r at your shell to trigger reverse search:

> search history...<br>1s vim flake.nix<br>3m redis-server<br>3m jj l<br>35m jj show m<br>36m jj git fetch<br>39m cd<br>40m vim readme.txt<br>788 matches · ↑/↓ move · enter accept · esc cancel

hit tab/enter to accept the selection, hit enter again to<br>execute. the history database is stored in<br>~/.local/share/stinkpot. if upgrades break the DB, just<br>delete it and run the import command.

empty stinkpot days before text gray

Related Articles