Skip to main content

Automatically index your shell history in a full-text search database. Magic!

Project description

Automatically index your shell history in a full-text search database. Magic!


  • Uses SQLite3’s excellent FTS4 extension to provide full-text search.
  • Respects HISTTIMEFORMAT if set.


  • Bash
  • Python 3


Install from pip:

pip install duiker

Or, simply download the single Python file and add it to your PATH.


Import your existing shell history:

history | duiker import -


If you want to automatically import your shell history on-the-fly, you can add duiker import to your PROMPT_COMMAND [1].

Run duiker magic to print a shell snippet that automatically imports your last command into Duiker:

duiker magic

Configure this shell snippet as part of your PROMPT_COMMAND. Run duiker magic --help for an example.


Duiker indexes your shell history in an SQLite3 full-text search table.

You can use any MATCH [2] expression to search the database:

$ duiker search git
2017-04-13 15:50:02         git staged
2017-04-13 15:50:14         git commit -a
2017-04-13 15:55:07         git diff
$ duiker search '(git OR fossil) diff'
2017-04-27 15:15:01         git diff
2017-04-27 15:15:49         git diff
2017-04-28 14:49:19         fossil diff
2017-04-28 14:53:09         fossil diff src/
$ duiker search 'sqlite*'
2017-03-04 19:00:42         sqlite3 db.sqlite
2017-03-04 19:13:11         rm db.sqlite


Duiker only supports Bash at present. Pull requests for other shells welcome.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for duiker, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size duiker-0.1.0-py3-none-any.whl (7.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size duiker-0.1.0.tar.gz (5.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page