cmd-tracker is an npm package that automatically captures, categorizes and saves every terminal command you type in a project.
Perfect for:
- 🎓 Students learning Linux, Git, Docker, Angular etc.
- 👨💻 Developers who want to track commands used in a project
- 📝 Anyone who wants to revise terminal commands they've used
You work normally in terminal
↓
Commands auto-captured in background
↓
Saved to .tracker/commands.json in your project
↓
Run tracker list → see entire command history
Install in your learning/project repo:
npm install @adithya-naik/cmd-trackerStep 1 — Initialize in your repo:
npx tracker initStep 2 — Enable automatic capture:
npx tracker hook
source ~/.bashrc # bash
source ~/.zshrc # zsh (Mac)
source ~/.config/fish/config.fish # fishStep 3 — Work normally! Then revise:
npx tracker listThat's it! Every command you type is now saved automatically 🪄
| Command | Description |
|---|---|
tracker init |
Initialize tracker in your project |
tracker hook |
Enable automatic command capture |
tracker unhook |
Disable automatic command capture |
tracker list |
Show all saved commands |
tracker list <category> |
Filter by category |
tracker search <query> |
Search through commands |
tracker stats |
Show statistics by category |
tracker favorite <cmd> |
Toggle command as favorite |
tracker favorites |
Show all favorites |
tracker export |
Export as JSON |
tracker export --csv |
Export as CSV (opens in Excel) |
tracker clear |
Clear all commands |
tracker clear <category> |
Clear specific category |
Commands are automatically categorized into:
| Category | Commands |
|---|---|
🔀 git |
git status, git push, git commit... |
📦 npm |
npm install, npx, npm run... |
🐳 docker |
docker ps, docker build... |
🐧 linux |
ls, cd, mkdir, chmod... |
🟢 node |
node, nodemon... |
🔴 angular |
ng new, ng serve, ng generate... |
🐍 python |
python, pip install... |
🔷 go |
go build, go run, go get... |
☕ java |
java, javac, mvn, gradle... |
🦀 rust |
cargo build, cargo run, rustc... |
🔷 dotnet |
dotnet run, dotnet build... |
☸️ kubernetes |
kubectl get pods, helm install... |
🗄️ database |
mysql, psql, mongosh, redis-cli... |
☁️ cloud |
aws s3 ls, gcloud, az login... |
📥 packageManagers |
yarn, pnpm, brew, snap... |
🧪 testing |
jest, vitest, playwright, cypress... |
🤖 ai |
claude, gemini, opencode, aider... |
📌 others |
everything else |
Filter by category:
tracker list git # see all git commands
tracker list linux # see all linux commands
tracker list npm # see all npm commandsSearch commands:
tracker search "install" # find all install commands
tracker search "git" # find all git related commandsSave favorites for quick revision:
tracker favorite "git rebase -i HEAD~3"
tracker favorites # see all starred commandsExport for sharing/backup:
tracker export # creates tracker-export.json
tracker export --csv # creates tracker-export.csv (opens in Excel!)After running tracker init, a .tracker folder is created:
your-project/
├── .tracker/
│ └── commands.json ← your personal command history
├── your-files...
└── package.json
✅
.tracker/is automatically added to.gitignoreYour command history stays local — never pushed to GitHub
| Platform | Support |
|---|---|
| Mac (zsh) | ✅ Full support |
| Linux (bash) | ✅ Full support |
| Windows (Git Bash) | ✅ Supported |
| Windows (PowerShell) | |
| Fish | ✅ Full support |
Windows CMD/PowerShell users: use
tracker save "command"manually or use Git Bash / WSL for automatic capture
Mac:
brew install fishUbuntu/Debian:
sudo apt install fishFedora:
sudo dnf install fishWindows (WSL):
sudo apt install fishnpx tracker init
npx tracker hook
source ~/.config/fish/config.fishThat's it! Every command you type in fish will now be saved automatically! 🎉
Contributions are welcome! Feel free to:
- Open an issue for bugs or feature requests
- Submit a pull request
MIT © Jatoth Adithya Naik