https://pypi.org/project/shelldog/
Your loyal companion for tracking shell commands - because every good developer needs a faithful friend who remembers everything!
/\_/\
( o.o )
> ^ < "Woof! I'm watching... silently." --0.1.0--
Shelldog is a silent, intelligent command tracker for your terminal. Think of it as your development diary that writes itself - tracking every command you run, so you never have to remember "what did I do yesterday?" ever again!
Ever found yourself thinking:
- "What was that curl command I ran last week?"
- "How did I set up this environment again?"
- "I need to write documentation... if only I could remember what I did!"
- "What commands did I run before that bug appeared?"
Shelldog sits quietly in the background and remembers EVERYTHING for you! 🧠
- 🤫 Silent Tracking - Works invisibly without cluttering your terminal
- 🔒 Privacy First - Automatically masks passwords, tokens, and API keys
- 🎯 Smart Detection - Knows when you're in a virtual environment
- 📁 Project-Level Logs - Each venv gets its own history file at the project root
- 🎭 Personality - Because who says CLI tools have to be boring?
- 🚀 Zero Performance Impact - Logs asynchronously in the background
- 🌈 Both Bash & Zsh - Works with your favorite shell
pip install shelldoggit clone https://github.com/Ansumanbhujabal/shelldog.git
cd shelldog
pip install -e .# Wake up the dog!
shelldog follow
# Activate tracking in your current shell
eval "$(shelldog follow -q)"That's it! Shelldog is now silently logging all your commands. 🎉
# See everything
shelldog log
# Just today's commands
shelldog log --today
# Last 20 commands
shelldog log -n 20shelldog status| Command | Description |
|---|---|
shelldog follow |
Start tracking commands (activates the good boy!) |
shelldog stop |
Stop tracking (sends doggo to sleep) |
shelldog log |
View command history |
shelldog status |
Check if Shelldog is watching |
shelldog clear |
Clear command history |
shelldog stats |
See cool statistics about your commands |
| Command | Description |
|---|---|
shelldog bark |
Make Shelldog bark! 🐕 |
shelldog treat |
Give Shelldog a treat! 🦴 |
shelldog goodboy |
Tell Shelldog he's a good boy! 🏆 |
- Shell Hook: Shelldog installs a tiny hook in your shell (via
DEBUGtrap in Bash orpreexecin Zsh) - Silent Logger: Every command gets logged asynchronously - zero impact on your workflow
- Smart Masking: Sensitive data (passwords, tokens, API keys) are automatically masked
- Venv Detection: Automatically detects if you're in a virtual environment
When you're in a virtual environment:
- Shelldog creates
shelldog_history.txtat your project root (next to your venv folder) - Each project gets its own command history
- No more mixing up commands from different projects!
my-project/
├── venv/
│ └── .shelldog/ # Hidden config folder
├── shelldog_history.txt # Your project's command history! 📝
├── src/
└── README.md
Shelldog automatically masks sensitive information:
# What you type:
export API_KEY=super_secret_key_123
# What gets logged:
export API_KEY=****Protected patterns:
export VARNAME=value→export VARNAME=****--password,--token,--api-key,--secret- Authorization headers in curl commands
- And more!
# Start your day
cd my-project
source venv/bin/activate
eval "$(shelldog follow -q)"
# Do your work
git pull origin main
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
# Later, review what you did
shelldog log --today# Something broke! What did you do?
shelldog log -n 50
# Find that specific command
shelldog log | grep docker
# See statistics
shelldog stats# After setting up a new environment
shelldog log > SETUP.md
# Now you have automatic documentation! 📚$ shelldog follow
🐕 Woof! I'm watching you.
Never forget what you did.
Always know where you've been.
I've got your back.
✓ Shelldog is now following your commands!
📝 Commands will be logged to:
/path/to/project/shelldog_history.txt
🎯 Project root level logging!
🎉 Stay pawsitive! 🐾
============================================================
✓ Initialization complete!
============================================================
🐕 Activate the hook by running:
eval "$(shelldog follow -q)"$ shelldog log -n 5
🐕 Shelldog History:
================================================================================
[2025-10-08 14:23:45] pip install requests
[2025-10-08 14:24:12] python app.py
[2025-10-08 14:25:33] git add .
[2025-10-08 14:25:40] git commit -m "Add new feature"
[2025-10-08 14:25:55] git push origin main
================================================================================
📊 Total entries: 5
🐕 *proud tail wag* I remembered everything!$ shelldog status
🐕 Shelldog Status:
==================================================
Tracking enabled: ✓ Yes
Shell hook active: ✓ Yes
Virtual env: ✓ Yes (venv-specific logging)
Venv path: /opt/CodeRepo/SideProjects/shelldog/venv
Log file: /opt/CodeRepo/SideProjects/shelldog/shelldog_history.txt
Log file exists: ✓ Yes
Logged commands: 247
==================================================
✓ Shelldog is actively tracking your commands! 🐕
Every great developer was once a beginner! 🌟- In a venv:
<project_root>/shelldog_history.txt - Global:
~/.shelldog/shelldog_history.txt
Shelldog keeps its configuration in:
- In a venv:
<venv>/.shelldog/ - Global:
~/.shelldog/
If you want to manually control when Shelldog watches:
# Start tracking
source ~/.shelldog/shelldog_hook.sh
# Stop tracking
source ~/.shelldog/shelldog_unhook.shWant Shelldog to start automatically? Add to your ~/.bashrc or ~/.zshrc:
# Auto-start Shelldog in virtual environments
if [[ -n "$VIRTUAL_ENV" ]]; then
eval "$(shelldog follow -q)" 2>/dev/null
fiMake sure the hook is active:
shelldog status
# If hook is not active, run:
eval "$(shelldog follow -q)"This can happen if you source the hook multiple times. Run:
shelldog stop
eval "$(shelldog follow -q)"It shouldn't! Shelldog filters itself out. If you see this, please file a bug report! 🐛
- All shell commands
- Script executions
- Git commands
- Package installations
- Database migrations
- Server starts/stops
- Basically everything you type!
shelldogcommands themselves- Internal shell functions
- Empty commands
- Shell initialization stuff
- Review Daily:
shelldog log --todayat the end of the day - Document Projects:
shelldog log > COMMANDS.mdfor documentation - Debug Sessions:
shelldog log -n 50to see recent commands - Find Patterns:
shelldog statsto see your most-used commands - Clean Slate:
shelldog clearwhen starting fresh
Q: Does Shelldog slow down my terminal?
A: Nope! Logging happens asynchronously in the background. Zero performance impact.
Q: Is my sensitive data safe?
A: Yes! Shelldog automatically masks passwords, tokens, and API keys.
Q: Can I use this in production?
A: Shelldog is designed for development environments. Use caution in production!
Q: Does it work with tmux/screen?
A: Yes! Each session tracks independently.
Q: What shells are supported?
A: Bash and Zsh are fully supported.
Because:
- Dogs are loyal (like your command history should be)
- Dogs remember everything (especially treats)
- Dogs are always happy to help
- CLI tools deserve more personality! 🎉
MIT License - See LICENSE file for details
Contributions are welcome! Feel free to:
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Submit pull requests
- 🎨 Improve documentation
Built with ❤️ by developers who got tired of asking "wait, what command did I just run?"
Made with 🐕 and ☕ by Ansuman Bhujabala
If Shelldog helps you, give him a treat! ⭐ this repo
🐕 *tail wagging intensifies*