Skip to content

Creating and Editing Snips

Stuart Meeks edited this page Jun 8, 2026 · 1 revision

Creating and Editing Snips

A Snip is a single parameterised command belonging to one CLI.

Create a Snip

Select a CLI in the switcher, then click New snip in the CLI view header. (New Snips always belong to a CLI, so the action is only available with a CLI selected.)

The Snip editor

Snip editor

  • Title (required) — the Snip's display name.
  • CLI (required) — which CLI this Snip belongs to. Changing it here moves the Snip to another CLI.
  • Command template (required) — the command, with {token} placeholders for the parts you fill in at use time, e.g. pl-app deploy --env {env} --tag {tag}.
  • Description — optional notes rendered as Markdown (bold, code, lists, links, and so on). Shown in the fill flyout so context is in front of you before you copy or run.
  • Tags — a comma-separated list. Tags are trimmed, de-duplicated and matched case-insensitively. See Tags and Tag Icons.
  • Parameters — the local parameters for this Snip (see below and Parameters and Shared Parameters).
  • Advanced overrides — optionally override the CLI's shell and working directory for this Snip specifically (useful when one command in an otherwise PowerShell CLI needs, say, bash). Leave unset to inherit the CLI's settings.

Command templates and tokens

A token is {name} where name starts with a letter or underscore and contains letters, digits or underscores. Anything that isn't a recognised token is left exactly as typed. A Snip can repeat a token ({env} twice) — it's filled once and substituted everywhere.

You don't have to define a parameter for every token: a token with no matching parameter (locally, on the CLI, or globally) is simply left in place in the preview, which keeps Copy disabled until it resolves. See Parameters and Shared Parameters for how tokens resolve.

Parameters on a Snip

In the Parameters section, add a row per parameter:

  • Name — must match the token (env for {env}).
  • TypeText (free input) or Choice (dropdown).
  • Default — optional value the input is pre-filled with.
  • Options — for Choice, the comma-separated list of allowed values.

Parameters defined here are local and take precedence over any shared parameter of the same name. To avoid repeating the same parameter across many Snips, define it once as a shared parameter on the CLI or globally instead.

Move a Snip to another CLI

Open the Snip editor and change the CLI selector. On save, the Snip moves to the chosen CLI (its tags, parameters and history are unaffected).

Delete and restore

The Delete action on a Snip card is a soft delete — the Snip moves to the Trash rather than being erased. From the Trash you can Restore it to its CLI or Delete permanently (which can't be undone). See Data Storage and Backups for the Trash.

Clone this wiki locally