Generate shell commands and scripts from natural language using Claude AI.
If you don't have shelp yet, build it from the prompt file:
cat shelp-PROMPT.md | claude --model claude-opus-4-5 -pOr if you already have shelp, you can rebuild it:
./shelp --compile shelp-PROMPT.md./shelp --install ~/binThis will:
- Copy shelp to
~/bin - Optionally add
~/binto your PATH in~/.bashrc
Just describe what you want:
shelp find all python files modified today
# Output: find . -name "*.py" -mtime -1
shelp count lines of code excluding node_modules
# Output: find . -name "*.js" -not -path "./node_modules/*" | xargs wc -l
shelp split input by commas and add @company.com to each
# Output: tr ',' '\n' | sed 's/$/@company.com/'Use -o to create a complete, executable script:
shelp -o backup.sh backup my home directory to /mnt/backup with rsync
shelp -o analyze.py parse nginx logs and show top 10 IPs by request count
shelp -o deploy.sh deploy docker containers with health checks and rollbackThe script will be shown for confirmation before saving. You can edit the prompt if the output isn't quite right.
For complex tools, write detailed requirements in a file:
# Create mytool-PROMPT.md with your requirements
echo "Create a CLI tool that..." > mytool-PROMPT.md
# Compile it
shelp --compile mytool-PROMPT.mdThis creates mytool from mytool-PROMPT.md. The prompt file is kept for
future improvements.
Iterate on your scripts:
# Edit the prompt and regenerate
shelp --improve backup.sh
# Quick tweak without full rewrite
shelp --tweak backup.sh
# Improve shelp itself!
shelp --improveSee what prompt created a script:
shelp --prompt backup.sh
shelp --prompt # View shelp's own prompt| Option | Description |
|---|---|
-o, --output FILE |
Save as executable script |
--compile FILE |
Compile from -PROMPT.md file |
--improve [FILE] |
Improve a script (default: shelp) |
--tweak [FILE] |
Quick tweaks to a script |
--prompt [FILE] |
Show prompt for file |
--install [DIR] |
Install to directory (default: ~/bin) |
--model MODEL |
Use specific Claude model |
--opus |
Use claude-opus-4-5 model |
--help |
Show help with examples |
-
One-liner mode: Generates concise shell commands optimized for copy-paste
-
Script mode (
-o): Generates complete scripts with:- Proper shebang
- Comments explaining the code
- Error handling
- The prompt embedded in the file for future improvements
-
Compile mode (
--compile): Reads requirements from a-PROMPT.mdfile and creates the script. The prompt file is kept separate for easy editing. -
Improve/Tweak: Opens your editor to modify the prompt, then regenerates the script with context from the original version for incremental updates.
- Python 3.6+
- Claude CLI installed and configured
# Quick one-liners
shelp extract all URLs from a webpage
shelp find largest files in current directory
shelp convert JSON to CSV from stdin
# Scripts
shelp -o monitor.sh monitor disk usage and alert if over 90%
shelp -o scrape.py scrape product prices from a URL list
# Complex tools via compilation
cat > downloader-PROMPT.md << 'EOF'
Create a download manager that:
- Supports parallel downloads
- Shows progress bars
- Resumes interrupted downloads
- Validates checksums
EOF
shelp --compile downloader-PROMPT.md- Use
--opusfor complex tasks that benefit from more reasoning - Start with one-liners, save good ones with
-o - Use
--tweakfor quick fixes,--improvefor major changes - The prompt is your documentation - keep it clear!
shelp can improve itself:
shelp --improve
# Edit the prompt to add new features
# shelp regenerates with your changesAll improvements are tracked in a changelog embedded in the script.