Snippets
Save a command once, reuse it forever. Placeholders fill in the details. Goodbye, repetitive typing.
Questions this answers
- How do I save and reuse terminal commands with variables?
- Is there a snippet manager for terminal commands?
- Can I create command templates with placeholder values in a terminal?
How it works
Create snippets from any text: type a command, select it, and save it as a snippet with a name and optional description. Snippets support placeholder variables using a simple ${name} syntax. When you insert a snippet, Chau7 prompts you to fill in each placeholder before sending the command to the shell.
Insert snippets through the command palette (Cmd+Shift+P), a dedicated keyboard shortcut, or the snippet manager panel. Fuzzy search finds snippets by name, description, or content. Snippets are stored locally and can be organized into folders for different projects or workflows.
Snippets integrate with clipboard history: promote any clipboard entry to a snippet with one click. They also support multi-line commands, so complex pipelines, docker-compose configurations, or kubectl commands with multiple flags become single-action insertions.
Why it matters
Developers type the same complex commands hundreds of times: SSH tunnels with specific port mappings, Docker builds with eight flags, database queries with connection strings. Snippets let you save these once with placeholder tokens that prompt for values when invoked. It is aliases with parameters and a search interface.
Frequently asked questions
Can snippets have multiple placeholders?
Yes. A snippet can contain any number of ${placeholder} variables. When inserted, Chau7 presents a form with a field for each placeholder, pre-filled with default values if you defined them. Tab between fields to fill them in quickly.
Do snippets sync across machines?
Snippets are stored locally by default. You can export them as JSON for manual sharing or place the snippet file in a synced directory like iCloud Drive or Dropbox for cross-machine access.
Can I insert a snippet without the placeholder prompt?
Yes. If a snippet has no placeholders, it inserts directly. For snippets with placeholders, you can define default values so that pressing Enter without typing accepts the defaults for rapid insertion.