Uncover the hidden gems of your command history! This program analyzes your shell history file and presents the most frequently used commands in a visually appealing and easy-to-understand format. With powerful options to filter out noise and focus on what matters.
cargo install histopAfter installing:
histop --help
histop --versiongit clone https://github.com/rodrgz/histop
cd histop
cargo build # or nix build- Ash (
~/.ash_history) - Bash (
~/.bash_history) - Fish (
~/.local/share/fish/fish_history) - PowerShell (
~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt) - Tcsh (
~/.history,~/.tcsh_history,~/.csh_history) - Zsh (
~/.zsh_historyor~/.config/zsh/.zsh_history)
$ histop -h
histop 0.3.1
Usage: histop [options] [FILE]
-h, --help Print this help message
-v, --version Print version information
-f <FILE> Path to the history file (or pass FILE positionally)
-c <COUNT> Number of commands to print (default: 25)
-a Print all commands (overrides -c)
-m <MORE_THAN> Only consider commands used more than <MORE_THAN> times
-i <IGNORE> Ignore specified commands (e.g. "ls|grep|nvim")
-b <BAR_SIZE> Size of the bar graph (default: 25)
-n Do not print the bar
-nh Disable history mode (requires FILE or piped/redirected stdin)
-np Do not print the percentage in the bar
-nc Do not print the inverse cumulative percentage in the bar
-o <FMT> Output format: text (default), json, csv
--color <WHEN> Color output: auto (default), always, never
--config <PATH> Path to config file
██ Percentage
▓▓ Inverse cumulative percentage
When -nh is set and no -f is provided, histop reads from stdin if
input is piped or redirected.
histop -nh < arquivo.txt
cat arquivo.txt | histop -nhIf stdin is a terminal (not piped) and no FILE is provided, histop
returns an error and asks for either piped/redirected input or a file path.
$ histop -c 10 -i "cd"
1184 │▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████│ 19.08% ls
943 │░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████│ 15.19% nvim
792 │░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓███│ 12.76% git
670 │░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓███│ 10.80% nix
311 │░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓█│ 5.01% rg
310 │░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓█│ 5.00% exit
255 │░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓█│ 4.11% dust
253 │░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓█│ 4.08% histop
233 │░░░░░░░░░░░░░░░░░░░▓▓▓▓▓█│ 3.75% cargo
219 │░░░░░░░░░░░░░░░░░░░░▓▓▓▓█│ 3.53% man
- Rust 1.85 or later (edition 2024)
- Cargo package manager