Skip to content

Tips & Workflows

Real-world workflow recipes that combine CommandIt features to save time in your daily work.


Create three snippets and compose them with &&:

SnippetTemplate
Git Fetchgit fetch origin {branch}
Rebasegit rebase origin/{branch}
Force Pushgit push --force-with-lease origin {branch}

How to use:

  1. Open the palette (Control+Space)
  2. Search for “Git Fetch” and press Command+Return to add it to the composition queue
  3. Add “Rebase” and “Force Push” the same way
  4. Set the join strategy to And (&&) so each step only runs if the previous succeeds
  5. Press Enter — fill in the branch name once and all three commands share it
Snippet composition requires CommandIt Plus.

A single snippet with a dynamic variable:

git branch --merged {{clipboard}} | grep -v '^\*\|main\|develop' | xargs git branch -d

Copy a branch name to your clipboard, open the palette, and paste — it deletes all branches already merged into that branch (except main and develop).


Compose three snippets with &&:

SnippetTemplate
Docker Builddocker build -t {image} .
Docker Stopdocker stop {container} || true
Docker Rundocker 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.

  1. Highlight a long docker run command in documentation or a teammate’s message (no need to copy — the hotkey does it for you)
  2. Press Control+Shift+Space to open the New Snippet form
  3. CommandIt auto-detects ports, volume paths, image names, and environment variables as arguments
  4. Rename the arguments to something meaningful (e.g., 8080 becomes {host_port})
  5. Save — now you have a reusable template
Selection capture is the fastest way to templatize
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.

curl -X {method} {url}/{endpoint} \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{body}'

Set argument types for maximum speed:

ArgumentTypeDefault
methodSelectGET, POST, PUT, DELETE
urlTexthttps://api.example.com
endpointText
tokenSecret(masked input)
bodyMultiline{}

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.

Compose with Newline join for a quick multi-service health check:

curl -s -o /dev/null -w "%{http_code}" https://api.example.com/health
curl -s -o /dev/null -w "%{http_code}" https://auth.example.com/health
curl -s -o /dev/null -w "%{http_code}" https://cdn.example.com/health

Each URL is an argument so you can update endpoints without editing the snippet.


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.

Create a category called DB Migrations with these snippets:

SnippetTemplate
Create tableCREATE TABLE {table} (id SERIAL PRIMARY KEY, {columns}, created_at TIMESTAMP DEFAULT NOW());
Add columnALTER TABLE {table} ADD COLUMN {column} {type} {constraint};
Add indexCREATE INDEX idx_{table}_{column} ON {table} ({column});
RollbackDROP TABLE IF EXISTS {table};

Use category filtering (@DB Migrations) to quickly find these in the palette.


ssh {user}@{host} "tail -f /var/log/{service}/{logfile}" | grep --color=auto "{pattern}"

Arguments:

ArgumentTypeDefault
userTextdeploy
hostText
serviceSelectnginx, app, postgres, redis
logfileTexterror.log
patternTextERROR

Compose with ; (Then) join:

SnippetTemplate
Switch contextkubectl config use-context {context}
Get podskubectl get pods -n {namespace} -o wide
Get serviceskubectl get svc -n {namespace}

Switch context and immediately see the status of pods and services in one paste.


## {{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.

[{link_text}]({{clipboard}})

Copy a URL, open the palette, type the link text, and paste — instant markdown link.


Categories organize by domain (Git, Docker, API). Tags cut across domains:

  • #production — commands that affect prod (search #production before 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.

Composable filters require CommandIt Plus.

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.

Dynamic variables like {{shell:git branch --show-current}} embed live context at paste time:

echo "Deploying branch {{shell:git branch --show-current}} to {environment}"
Shell commands in snippets require CommandIt Plus. CommandIt asks for confirmation before running any shell command.

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.