See HSTR in action with real-world scenarios
Watch HSTR in action - see how easy it is to search and navigate your command history:
Tip: Press Ctrl-r to invoke HSTR anytime from your command line!
If you work with Docker, you know how complex commands can get. HSTR makes it easy to find and reuse them.
You need to find that Docker run command you used last week for your development environment.
# Press Ctrl-r and type: docker run
# HSTR will show all your docker run commands:
docker run -it --rm -v $(pwd):/app -w /app node:18 npm install
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=dev postgres
docker run --name redis -d -p 6379:6379 redis:alpine
docker run -it --rm -v $(pwd):/app node:18 npm install # NODE
docker run -d -p 5432:5432 postgres # PG
docker run --name redis -d -p 6379:6379 redis # REDIS
# Now just type "NODE" or "PG" to find them instantly!
SSH tunnels are powerful but the commands are hard to remember.
You have several SSH tunnels to different servers but can never remember the exact ports and parameters.
# Tag your SSH tunnels for easy finding:
ssh -L 8080:localhost:3000 user@dev-server.com # SSH-DEV
ssh -L 3306:localhost:3306 user@db-server.com # SSH-DB
ssh -L 9200:localhost:9200 user@elastic.com # SSH-ELASTIC
# Press Ctrl-r, type "SSH-" to see all your tunnels
# Or just type "db" to find database related tunnels
Find that perfect git command you used months ago.
You need to find a specific git log format you created, or a complex git rebase command.
# Press Ctrl-r and search: git log
# HSTR shows all variations you've used:
git log --graph --oneline --all --decorate
git log --pretty=format:'%h %s' --since='2 weeks ago'
git log -p -- path/to/file.js
git log --author="yourname" --grep="bug fix"
Tip: Add these complex commands to favorites with Ctrl-f so you can access them even faster!
Reuse your complex database queries without maintaining a separate file.
# Run your queries and tag them:
psql -h localhost -U postgres -d mydb -c "SELECT * FROM users WHERE created_at > NOW() - INTERVAL '7 days'" # RECENT-USERS
mysql -u root -p mydb -e "SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = 'mydb'" # TABLE-STATS
# Later, just press Ctrl-r and type the tag!
Network troubleshooting involves many specialized commands.
# Check network connections
netstat -tuln | grep LISTEN
# DNS lookup with details
dig example.com +trace
# Test HTTP endpoint
curl -I -X GET https://api.example.com/health
# Check route to host
traceroute example.com
# All these get saved in your HSTR history for quick reuse!
System admin commands are often too complex to remember but too important to forget.
# Find large files
find / -type f -size +100M -exec ls -lh {} \; 2>/dev/null # LARGE-FILES
# Check disk usage by directory
du -h --max-depth=1 /var | sort -hr # DISK-USAGE
# Monitor system resources
watch -n 1 'ps aux --sort=-%mem | head -20' # TOP-MEMORY
# List open files by process
lsof -p $(pgrep -f "process-name") # OPEN-FILES
Best Practice: Tag system commands with clear identifiers. When an issue arises, you'll find the right diagnostic command immediately.
Complex build pipelines become simple with HSTR.
# Build commands with different options
npm run build -- --production --verbose # BUILD-PROD
npm run build:staging && npm run deploy:staging # DEPLOY-STAGE
docker build -t myapp:latest . && docker push myapp:latest # DOCKER-BUILD
# Test commands
npm test -- --coverage --verbose # TEST-COVERAGE
npm run test:e2e -- --headed # TEST-E2E
# Just type "BUILD", "DEPLOY", or "TEST" to filter!
Complex data transformations are easy to retrieve with HSTR.
# CSV processing
cat data.csv | cut -d',' -f1,3 | sort | uniq -c # CSV-UNIQUE
# JSON processing
cat data.json | jq '.[] | select(.status=="active")' # JQ-ACTIVE
# Log analysis
grep ERROR app.log | awk '{print $1, $2, $NF}' | sort | uniq -c | sort -rn # ERROR-STATS
# All saved and searchable in HSTR!
Use favorites to build your own command library:
# Add frequently used commands to favorites (Ctrl-f)
# Organize them with tags
# Access instantly when needed
Keep your history clean and relevant:
# Press Ctrl-r to open HSTR
# Navigate to unwanted commands
# Press DEL to remove them
# Your history stays focused and useful
Switch views based on what you need:
Use different search modes for different scenarios: