histstat is a small CLI tool that analyzes your shell history file and shows a ranking of the most frequently executed successful commands (exit status = 0).
It automatically detects the latest history file from bash, zsh, or fish, so no manual configuration is required.
- Automatically detects bash / zsh / fish history files
- Selects the most recently modified history file
- Counts only successful commands (exit status = 0)
- Handles
sudocorrectly (counts the actual command, notsudo) - Sorts commands by execution count
- Configurable output size via CLI option
Show the top 10 commands (default).
histstatShow the top 5 commands.
histstat -c 5