npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

@adithya-naik/cmd-tracker

v1.0.5

Published

πŸ“Ÿ A developer tool that auto-captures, categorizes and saves terminal commands per project for easy revision

Downloads

208

Readme

πŸ“Ÿ cmd-tracker

A developer tool that auto-captures, categorizes and saves terminal commands per project for easy revision

npm version npm downloads npm total downloads GitHub stars GitHub issues License: MIT Node.js


🎯 What is cmd-tracker?

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

How it works

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

πŸ“¦ Installation

Install in your learning/project repo:

npm install @adithya-naik/cmd-tracker

πŸš€ Quick Start

Step 1 β€” Initialize in your repo:

npx tracker init

Step 2 β€” Enable automatic capture:

npx tracker hook
source ~/.bashrc                # bash
source ~/.zshrc                 # zsh (Mac)
source ~/.config/fish/config.fish  # fish

Step 3 β€” Work normally! Then revise:

npx tracker list

That's it! Every command you type is now saved automatically πŸͺ„


πŸ“‹ All Commands

| 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 |


πŸ—‚οΈ Categories

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 |


πŸ’‘ Usage Examples

Filter by category:

tracker list git      # see all git commands
tracker list linux    # see all linux commands
tracker list npm      # see all npm commands

Search commands:

tracker search "install"   # find all install commands
tracker search "git"       # find all git related commands

Save favorites for quick revision:

tracker favorite "git rebase -i HEAD~3"
tracker favorites   # see all starred commands

Export for sharing/backup:

tracker export          # creates tracker-export.json
tracker export --csv    # creates tracker-export.csv (opens in Excel!)

πŸ“ Project Structure

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 .gitignore Your command history stays local β€” never pushed to GitHub

πŸ”’ Automatic Secret Redaction

alt text

Security is a core priority of cmd-tracker. Before any command is written to .tracker/commands.json, it is automatically scanned for sensitive information.

If a command contains credentials such as API keys, access tokens passwords, or private keys, the sensitive value or credential segment is replaced with [REDACTED], while the rest of the command is preserved. This keeps your command history useful without exposing secrets.

Example

AWS example β€” Before

export AWS_SECRET_ACCESS_KEY=mySecretKey

AWS example β€” Saved as

export AWS_SECRET_ACCESS_KEY=[REDACTED]

Another example:

curl example β€” Before

curl -u sampleuser:examplePass https://api.example.com

curl example β€” Saved as

curl -u [REDACTED] https://api.example.com

πŸ›‘οΈ Supported Secret Types

The sanitizer automatically detects and redacts:

  • AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, etc.)
  • API keys
  • Access tokens
  • Authentication tokens
  • Passwords
  • Bearer tokens
  • HTTP Basic Authentication credentials
  • curl -u / curl --user credentials
  • GitHub Personal Access Tokens
  • GitLab Personal Access Tokens
  • Slack tokens
  • SSH private keys
  • PEM private keys

⚠️ Commands That Are Not Saved

If a command consists entirely of sensitive information (for example, only a GitHub token or a private key), cmd-tracker will not save it.

Example:

Input

ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Result

Command not saved (contains only sensitive data)

βœ… Why This Matters

This feature helps prevent accidental exposure of secrets while keeping your command history clean and useful.

  • πŸ”’ Prevents credentials from being stored in .tracker/commands.json
  • πŸ“– Preserves the readable parts of commands for future reference
  • 🚫 Avoids saving commands that contain nothing except sensitive information
  • πŸ’» Works automaticallyβ€”no configuration required

πŸ–₯️ Platform Support

| Platform | Support | |---|---| | Mac (zsh) | βœ… Full support | | Linux (bash) | βœ… Full support | | Windows (Git Bash) | βœ… Supported | | Windows (PowerShell) | ⚠️ Manual save only | | Fish | βœ… Full support |

Windows CMD/PowerShell users: use tracker save "command" manually or use Git Bash / WSL for automatic capture


🐟 Fish Shell Support

Install Fish Shell

Mac:

brew install fish

Ubuntu/Debian:

sudo apt install fish

Fedora:

sudo dnf install fish

Windows (WSL):

sudo apt install fish

Setup tracker in Fish

npx tracker init
npx tracker hook
source ~/.config/fish/config.fish

That's it! Every command you type in fish will now be saved automatically! πŸŽ‰


🀝 Contributing

Contributions are welcome! Feel free to:

  • Open an issue for bugs or feature requests
  • Submit a pull request

πŸ“„ License

MIT Β© Jatoth Adithya Naik


⭐ Star this repo if you find it useful!

GitHub β€’ npm β€’ Issues