A simple app for saving and reusing terminal commands.
Keep your most-used commands in one place and run them anytime.
pock helps you save commands you use again and again, so you do not need to remember or retype them. You can give each command a short name, run it later, and keep your routine tasks organized.
- Save commands with easy-to-remember names
- Run saved commands in seconds
- Keep a history of what you ran with full output logs
- Export and import your command library
- Save script files for later use
- Keep everything on your own computer
Install directly from GitHub releases:
curl -o- https://raw.githubusercontent.com/ddev94/pock/main/install.sh | bashor with wget:
wget -qO- https://raw.githubusercontent.com/ddev94/pock/main/install.sh | bashTo install a specific version, pass it as an argument:
curl -o- https://raw.githubusercontent.com/ddev94/pock/main/install.sh | bash -s 1.0.2You only need a few commands to get started.
pock add hello "echo 'Hello, World!'"This saves the command under the name hello.
pock add deploy ./deploy.sh -d "Deployment script"When you add a script file, pock stores its content so you can run it anytime.
pock listpock run helloSave a command or script with a short name.
pock add <name> "<command>" [-d "description"]
pock add <name> ./script.sh [-d "description"]Show all saved commands.
pock list [--stats] [--all]Options:
--stats, -s: Show execution statistics--all, -a: Show all commands including disabled ones
Run a saved command. Output is captured and saved to history.
pock run <name>Delete a saved command.
pock remove <name>View execution history with optional output viewing.
pock history [command-name] [--limit 20] [--output]
pock history my-cmd --clear
pock history --clearOptions:
--limit, -l: Limit number of entries (default: 20)--output, -o: Show command output in history--clear: Clear history (all or for specific command)
Discover and install commands from community-shared libraries.
pock browseRegister and publish your commands to share with others.
pock registerPublish your local commands for community use.
pock publish [--name <command-name>]Save your commands to a file for backup or sharing.
pock export <output-file> [--name <command-name>]Import commands from a file or URL.
pock import <file-or-url> [--force]Display upcoming features and development roadmap.
pock featuresGenerate shell completion scripts for bash, zsh, or fish.
pock completion bash > /usr/local/etc/bash_completion.d/pock
pock completion zsh > /usr/local/share/zsh/site-functions/_pock
pock completion fish > ~/.config/fish/completions/pock.fishpock add sync-main "git checkout main && git pull --rebase origin main"
pock add deploy "git push origin main"
# Run your commands
pock list
pock run sync-mainpock add dev "npm run dev"
pock add test-all "npm run lint && npm run test && npm run build"pock add release ./scripts/release.sh -d "Release workflow"# View all history
pock history
# View history for specific command
pock history dev
# View history with output logs
pock history dev --output
# Clear specific command history
pock history dev --clearWe welcome contributions! Here's how you can help:
If you find a bug or have a feature request:
- Check if the issue already exists in the GitHub Issues
- If not, create a new issue with:
- A clear description of the problem or feature
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Your environment (OS, Go version, etc.)
-
Fork the repository
git clone https://github.com/ddev94/pock.git cd pock -
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Add tests if applicable
- Update documentation as needed
-
Test your changes
make test make build -
Commit your changes
git commit -m "Add: description of your changes" -
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Provide a clear description of the changes
- Reference any related issues
- Wait for review and address feedback
Be respectful and constructive in all interactions. We aim to maintain a welcoming community for everyone.
ISC
