Tips & Workflows
Real-world workflow recipes that combine CommandIt features to save time in your daily work.
Git Workflows
Section titled “Git Workflows”Rebase and Force-Push Safely
Section titled “Rebase and Force-Push Safely”Create three snippets and compose them with &&:
| Snippet | Template |
|---|---|
| Git Fetch | git fetch origin {branch} |
| Rebase | git rebase origin/{branch} |
| Force Push | git push --force-with-lease origin {branch} |
How to use:
- Open the palette (
Control+Space) - Search for “Git Fetch” and press
Command+Returnto add it to the composition queue - Add “Rebase” and “Force Push” the same way
- Set the join strategy to And (
&&) so each step only runs if the previous succeeds - Press Enter — fill in the branch name once and all three commands share it
Branch Cleanup
Section titled “Branch Cleanup”A single snippet with a dynamic variable:
git branch --merged {{clipboard}} | grep -v '^\*\|main\|develop' | xargs git branch -dCopy a branch name to your clipboard, open the palette, and paste — it deletes all branches already merged into that branch (except main and develop).
Docker Workflows
Section titled “Docker Workflows”Build, Stop, and Redeploy
Section titled “Build, Stop, and Redeploy”Compose three snippets with &&:
| Snippet | Template |
|---|---|
| Docker Build | docker build -t {image} . |
| Docker Stop | docker stop {container} || true |
| Docker Run | docker run -d --name {container} -p {host_port}:{container_port} {image} |
Fill in the image name, container name, and ports once. The || true on stop prevents failure if the container isn’t running.
Capture a Docker Command from a Selection
Section titled “Capture a Docker Command from a Selection”- Highlight a long
docker runcommand in documentation or a teammate’s message (no need to copy — the hotkey does it for you) - Press
Control+Shift+Spaceto open the New Snippet form - CommandIt auto-detects ports, volume paths, image names, and environment variables as arguments
- Rename the arguments to something meaningful (e.g.,
8080becomes{host_port}) - Save — now you have a reusable template
Any time you find yourself editing the same parts of a command before running it, ⌃⇧Space turns those parts into fill-in arguments automatically — free for all users.
API Testing Workflows
Section titled “API Testing Workflows”cURL Request Template
Section titled “cURL Request Template”curl -X {method} {url}/{endpoint} \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ -d '{body}'Set argument types for maximum speed:
| Argument | Type | Default |
|---|---|---|
method | Select | GET, POST, PUT, DELETE |
url | Text | https://api.example.com |
endpoint | Text | |
token | Secret | (masked input) |
body | Multiline | {} |
The select dropdown for method means you pick from a list instead of typing. The secret type masks the token so it’s not visible on screen.
API Health Check Sequence
Section titled “API Health Check Sequence”Compose with Newline join for a quick multi-service health check:
curl -s -o /dev/null -w "%{http_code}" https://api.example.com/healthcurl -s -o /dev/null -w "%{http_code}" https://auth.example.com/healthcurl -s -o /dev/null -w "%{http_code}" https://cdn.example.com/healthEach URL is an argument so you can update endpoints without editing the snippet.
Database Workflows
Section titled “Database Workflows”Query with Clipboard Context
Section titled “Query with Clipboard Context”SELECT * FROM {table} WHERE {column} = '{{clipboard}}' LIMIT {limit};Copy an ID, email, or value from your app’s UI, open the palette, and paste. The {{clipboard}} variable auto-fills with whatever you copied, so you only need to specify the table and column.
Migration Snippet Set
Section titled “Migration Snippet Set”Create a category called DB Migrations with these snippets:
| Snippet | Template |
|---|---|
| Create table | CREATE TABLE {table} (id SERIAL PRIMARY KEY, {columns}, created_at TIMESTAMP DEFAULT NOW()); |
| Add column | ALTER TABLE {table} ADD COLUMN {column} {type} {constraint}; |
| Add index | CREATE INDEX idx_{table}_{column} ON {table} ({column}); |
| Rollback | DROP TABLE IF EXISTS {table}; |
Use category filtering (@DB Migrations) to quickly find these in the palette.
DevOps Workflows
Section titled “DevOps Workflows”SSH and Tail Logs
Section titled “SSH and Tail Logs”ssh {user}@{host} "tail -f /var/log/{service}/{logfile}" | grep --color=auto "{pattern}"Arguments:
| Argument | Type | Default |
|---|---|---|
user | Text | deploy |
host | Text | |
service | Select | nginx, app, postgres, redis |
logfile | Text | error.log |
pattern | Text | ERROR |
Kubernetes Context Switch and Status
Section titled “Kubernetes Context Switch and Status”Compose with ; (Then) join:
| Snippet | Template |
|---|---|
| Switch context | kubectl config use-context {context} |
| Get pods | kubectl get pods -n {namespace} -o wide |
| Get services | kubectl get svc -n {namespace} |
Switch context and immediately see the status of pods and services in one paste.
Text Manipulation Workflows
Section titled “Text Manipulation Workflows”Meeting Notes Template
Section titled “Meeting Notes Template”## {{date}} - {meeting_title}
**Attendees:** {attendees}
### Agenda{agenda}
### Action Items- [ ] {action_1}- [ ] {action_2}
### Notes{notes}The {{date}} variable auto-fills today’s date. Set agenda and notes to Multiline type for longer input.
Markdown Link from Clipboard
Section titled “Markdown Link from Clipboard”[{link_text}]({{clipboard}})Copy a URL, open the palette, type the link text, and paste — instant markdown link.
Workflow Tips
Section titled “Workflow Tips”Use Tags for Cross-Cutting Concerns
Section titled “Use Tags for Cross-Cutting Concerns”Categories organize by domain (Git, Docker, API). Tags cut across domains:
#production— commands that affect prod (search#productionbefore running anything risky)#debug— diagnostic and troubleshooting commands#setup— environment setup and onboarding commands
Combine with composable filters: @Docker #production shows only Docker commands tagged for production.
Favorites for Daily Drivers
Section titled “Favorites for Daily Drivers”Star the 5-10 snippets you use most. The Favorites smart filter puts them at the top of every search, and they’re accessible instantly when you open the palette.
Shell Commands for Dynamic Context
Section titled “Shell Commands for Dynamic Context”Dynamic variables like {{shell:git branch --show-current}} embed live context at paste time:
echo "Deploying branch {{shell:git branch --show-current}} to {environment}"Snippet Packs as Starting Points
Section titled “Snippet Packs as Starting Points”Install a snippet pack (e.g., Git, Docker, or API) from Settings > Packs to get a curated starting collection. Then customize the snippets for your specific projects — rename arguments, change defaults, or add your team’s conventions.