Common Workflows
Find Command Builder
# find.yml — Interactive find command builder
matches:
- trigger: ":find"
replace: "find {{path}} {{type}} -name '{{name}}'"
vars:
- name: form
type: form
params:
layout: |
Path: [[path]]
Type: [[type]]
Name pattern: [[name]]
fields:
path:
default: "."
type:
type: choice
values:
- ""
- "-type f"
- "-type d"
- "-type l"
name:
default: "*"
Use with :find[Space], fill the form, and a command like find . -type f -name '*.log' appears in your prompt.
Cascading Find Menu
A more advanced find builder where the predicate changes based on the selected use case:
- trigger: ":findmenu"
replace: "find {{path}} {{predicate}} {{action}}"
vars:
- name: form
type: form
params:
layout: |
Path: [[path]]
Use case: [[usecase]]
Predicate: [[predicate]]
Action: [[action]]
fields:
path:
default: "."
usecase:
type: choice
values:
- By name
- By size
- By modified time
- By permissions
- Cleanup
predicate:
type: choice
depends_on: usecase
values:
By name:
- "-type f -name '*.log'"
- "-type f -name '*.sh'"
- "-type d -name 'node_modules'"
By size:
- "-type f -size +100M"
- "-type f -size +1G"
- "-type f -size -1M"
By modified time:
- "-type f -mtime -1"
- "-type f -mtime -7"
- "-type f -mtime +30"
By permissions:
- "-type f -perm /u=x"
- "-type f -perm /g=w"
- "-type f -perm 0777"
Cleanup:
- "-type f -name '*.tmp'"
- "-type f -empty"
- "-type d -empty"
action:
type: choice
values:
- "-print"
- "-ls"
- "-delete"
- "-exec ls -lh {} \\;"
Use with :findmenu[Space]. Select a use case, then pick a predicate and action.
Find by Name
A dedicated find-by-name form with manual type, name pattern, and action inputs:
- trigger: ":findname"
replace: "find {{path}} {{type}} -name '{{name}}' {{action}}"
vars:
- name: form
type: form
params:
layout: |
Path: [[path]]
Type: [[type]]
Name: [[name]]
Action: [[action]]
fields:
path:
default: "."
type:
type: choice
values:
- "-type f"
- "-type d"
- "-type l"
- "-type f -executable"
name:
default: "*"
placeholder: "*.log"
action:
default: "-print"
placeholder: "-print, -ls, -delete, -exec ls -lh {} \\;"
Use with :findname[Space]. Generated example:
find . -type d -name '*.rs' -exec ls -lh {} \;
Review generated commands before pressing Enter, especially commands using -delete, rm, chmod -R, or other destructive operations. The form adds a safety checkbox for dangerous actions.
Form Field Demo
The :formdemo trigger shows all available field types:
:formdemo[Space]
Fields shown:
- text input
- choice dropdown
- list (with
-prefix display) - multiline text area
- checkbox
- password (masked)
- cascade dropdown
Git Workflow
# git.yml
matches:
- trigger: "git!com"
replace: 'git commit -m "{{msg}}"'
vars:
- name: msg
type: form
params:
layout: "Commit message: [[msg]]"
- trigger: "git!rel"
replace: >
git add . &&
git commit -m "{{form.msg}}" &&
git tag -a {{form.tag}} -m "{{form.note}}" &&
git push &&
git push --tags
vars:
- name: form
type: form
params:
layout: |
Commit: [[msg]]
Tag: [[tag]]
Note: [[note]]
fields:
msg:
multiline: true
tag:
placeholder: "v1.0.0"
- trigger: "git!log"
replace: "git log --oneline --graph --decorate --all"
- trigger: "git!sta"
replace: "git status"
Docker Workflow
# docker.yml
matches:
- trigger: ":dcup"
replace: "docker compose up -d"
- trigger: ":dcdown"
replace: "docker compose down"
- trigger: ":dclogs"
replace: "docker compose logs -f"
- trigger: ":dcbuild"
replace: "docker compose build"
- trigger: ":dcrestart"
replace: "docker compose restart"
Development Workflow
# dev.yml
matches:
- trigger: ":build"
replace: "cargo build"
- trigger: ":test"
replace: "cargo test"
- trigger: ":clippy"
replace: "cargo clippy -- -D warnings"
- trigger: ":fmt"
replace: "cargo fmt"
- trigger: ":push"
replace: "git push origin {{branch}}"
vars:
- name: branch
type: shell
params:
cmd: "git branch --show-current"
System Administration
# sysadmin.yml
matches:
- trigger: ":disk"
replace: "{{disk}}"
vars:
- name: disk
type: shell
params:
cmd: "df -h / | tail -1"
- trigger: ":mem"
replace: "{{mem}}"
vars:
- name: mem
type: shell
params:
cmd: "free -h | grep Mem | awk '{print $3\"/\"$2}'"
- trigger: ":ports"
replace: "{{ports}}"
vars:
- name: ports
type: shell
params:
cmd: "ss -tlnp"
- trigger: ":log"
replace: "journalctl -xe --no-pager | tail -{{lines}}"
vars:
- name: lines
type: form
params:
layout: "Lines: [[lines]]"
fields:
lines:
default: "50"
AI Prompt Builder
# ai.yml
matches:
- trigger: ":aiask"
replace: |
Role: Act as an expert {{form.role}}.
Task:
{{form.task}}
Context:
```
{{clip}}
```
vars:
- name: clip
type: clipboard
- name: form
type: form
params:
layout: |
Persona: [[role]]
Task: [[task]]
fields:
role:
type: choice
values:
- "Linux SysAdmin (Bash/Docker focus)"
- "Python/Automation Expert"
- "Security Specialist"
- "Database Administrator"
task:
multiline: true
Hierarchical Find Builder
The :find-smart trigger uses hierarchical sections and a cascade dropdown to build find commands:
- trigger: ":find-smart"
replace: "find {{path}} {{preset}} {{extra}} {{action}}"
vars:
- name: form
type: form
params:
layout: |
Find Smart
----------
Scope
- Path: [[path]]
Search Criteria
- Use case (/ search): [[usecase]]
- Preset (/ search): [[preset]]
- Extra predicate: [[extra]]
Output Action
- Action (/ search): [[action]]
Review
- Note: [[note]]
fields:
path:
default: "."
placeholder: "e.g. ., /home, /var/log"
usecase:
type: choice
values:
- By name
- By size
- By modified time
- By file type
- Logs
- Archives
- Security audit
preset:
type: choice
depends_on: usecase
values:
By name:
- "-name 'Dockerfile'"
- "-name 'package.json'"
By size:
- "-type f -size +100M"
- "-type f -empty"
Logs:
- "-type f -name '*.log'"
- "-type f -path '*/logs/*'"
# ... see examples/forms-advanced.yml for full list
extra:
default: ""
placeholder: "optional, e.g. -not -path './.git/*'"
action:
type: choice
values:
- "-print"
- "-ls"
- "-exec ls -lh {} +"
- "-delete # DANGEROUS: review first"
Use with :find-smart[Space]. The searchable dropdowns (noted by / search in labels) let you quickly narrow options by typing.
Mixed Cascade Form
The :cascade-mixed trigger combines a cascade dropdown with normal text and multiline fields:
- trigger: ":cascade-mixed"
replace: |
Title: {{title}}
Selected {{category}}: {{item}}
Notes: {{notes}}
vars:
- name: form
type: form
params:
layout: |
Mixed Cascade
-------------
Metadata
- Title: [[title]]
Selection
- Category: [[category]]
- Item: [[item]]
Review
- Notes: [[notes]]
fields:
title:
placeholder: "short title"
category:
type: choice
values:
- Fruits
- Animals
- Colors
item:
type: choice
depends_on: category
values:
Fruits: [Apple, Banana, Cherry]
Animals: [Cat, Dog, Fox]
Colors: [Red, Green, Blue]
notes:
multiline: true
placeholder: "notes after cascade fields"
Use with :cascade-mixed[Space]. Select a category, then the item dropdown shows only matching options.
Searchable Dropdown Demo
The :bigdropdown trigger tests the / search feature on a 50-item choice list:
:bigdropdown[Space]
When the package dropdown is focused, press / and type part of a package name to filter:
Search: Package
─────────────────
Query: post
1 match
- postgresql
What's Next
Visit the Troubleshooting section if you encounter issues.