historian

Manage and query shell history stored in a SQLite database

brewmacoslinux
Try with needOr install directly
Source

About

Command-line utility for managing shell history in a SQLite database

Commands

historian

Examples

Search for commands containing a specific keyword$ historian search 'git commit'
Display recent command history with timestamps$ historian list --limit 20
Export shell history to SQLite database$ historian import