A Deno script that analyzes your shell command usage using the Atuin database.
Basic usage:
deno run -A stats.tsFor better results with alias resolution:
alias | deno run -A stats.ts--db: Specify a custom path to the Atuin databasedeno run -A stats.ts --db /path/to/atuin/history.db
The script will try to find the Atuin database in the following order:
--dbcommand line argumentATUIN_DB_PATHenvironment variable- Common locations:
~/.local/share/atuin/history.db~/Library/Application Support/atuin/history.db(macOS)~/.config/atuin/history.db
- Shows top 10 most used commands
- Resolves aliases to their actual commands
- Handles subcommands (e.g.,
git commit,docker run) - Supports reading aliases from stdin for better command resolution
Reading stats from Atuin database in /Users/username/.local/share/atuin/history.db
Top 10 commands:
git commit: 150 times
ls: 120 times
cd: 100 times
git push: 80 times
npm run: 75 times
docker run: 50 times
vim: 45 times
cat: 40 times
grep: 35 times
rm: 30 times