I Built a Command Manager for the Terminal (And You Might Need It Too)
Source: Dev.to

GitHub:
The Problem
As developers we use the terminal constantly, but our command workflows are messy:
- Shell history is hard to navigate and doesn’t persist well.
- Aliases are session‑specific and don’t handle complex scripts.
- Documentation gets outdated or lost in random files.
- Scripts are scattered across different directories.
We need a better way to manage our command toolkit.
Introducing Pock
Pock is a command manager that works like bookmarks for your terminal. Save any command with a simple name, run it instantly, and keep a full history of executions.
Quick Start
# Install (macOS)
brew install pock # (coming soon)
# Or download from releases
# Save a command
pock add deploy "git push origin main"
# Run it
pock run deploy
# View all saved commands
pock listCore Features
1. Save Commands and Scripts
# Save inline commands
pock add sync-db "pg_dump production | psql development"
# Save script files (content is stored)
pock add release ./scripts/release.sh -d "Production release"2. Execution History
Every command run is logged with:
- Timestamp
- Exit code
- Full stdout/stderr output
- Execution duration
pock history deploy --output3. Import / Export
Share command libraries with your team:
# Export your commands
pock export my-commands.json
# Team members import them
pock import my-commands.jsonWhy Go?
- Single binary distribution (no dependencies)
- Great CLI tooling (Cobra, Viper)
- Cross‑platform compilation
- Fast startup time
- Easy to install
Technical Architecture
pock/
├── cmd/ # Cobra commands
├── internal/
│ ├── storage/ # SQLite database layer
│ └── helpers/ # Config and utilities
└── pkg/ # Public packages- Storage: SQLite (via bbolt/bolt) for local data
- CLI Framework: Cobra + Viper
- Output Capture: Custom exec wrapper
Real‑World Usage
# Development workflow
pock add dev "docker-compose up -d && npm run dev"
pock add test "npm run lint && npm test && npm build"
# Database tasks
pock add db-backup "./scripts/backup-db.sh"
pock add db-reset "dropdb myapp && createdb myapp && npm run migrate"
# Deployment
pock add deploy-staging "./deploy.sh staging"
pock add deploy-prod "./deploy.sh production"What’s Next?
- Community marketplace for sharing commands
- Command scheduling / cron integration
- Team collaboration features
- VS Code extension
- Web UI for command management
Try It Out!
Installation
# macOS
curl -L https://github.com/ddev94/pock/releases/download/v1.0.1/pock-1.0.1.pkg -o pock-1.0.1.pkg
open pock-1.0.1.pkg
# Linux
wget https://github.com/ddev94/pock/releases/download/v1.0.1/pock-1.0.1-1.x86_64.tar.gz
tar -xzf pock-1.0.1-1.x86_64.tar.gz
sudo cp pock-1.0.1/usr/local/bin/pock /usr/local/bin/GitHub:
Feedback Welcome!
I’d love to hear:
- What commands would you save first?
- What features are missing?
- Any bugs or issues you encounter
Drop a comment or open an issue on GitHub! ⭐
Built with Go. Open source (ISC License). Privacy‑focused.