Skip to content
Terminal > Drive

Workflows

Parameterized commands with placeholder arguments you fill at run time.


A workflow is a saved command with named placeholders — the long incantation you keep reaching into shell history for, turned into a one-click template. Workflows live in Mel Drive as *.workflow.json files under ~/.local/share/mel/drive/.

Anatomy of a workflow

A workflow has a title and a command string. Anywhere the command should take input, you write a placeholder in braces:

yt-dlp -x --audio-format mp3 {url}

In the workflow's card, each {argument} renders as a highlighted chip inside the command, and the arguments are listed beside it at a glance. Mel seeds Drive with a sample "Download youtube audio" workflow on first run so you can see the shape immediately.

Using a workflow

  1. Press Ctrl+Shift+R to open Drive (or open the tools panel with Ctrl+Shift+\, ⌃\ on a Mac, and switch to the Drive view).
  2. Click the workflow. Mel inserts its command into the active pane's prompt with the first {argument} placeholder selected, and the workflow's card opens above the prompt.
  3. Type the real value over the selected placeholder, fill in any others, and run.

That first-argument selection is the whole trick: insert, type, enter. No clicking around to find the part you need to change.

The workflow card

The card sits above the prompt, so the command and its arguments stay in view while you type:

  • The header shows the workflow's title and when it was last edited, with ✎ (edit), a chevron that folds the card down to its header, and ✕ (close). A team workflow has no ✎: it is read-only.
  • On the left is the command, with its arguments highlighted. Click the command to put it in the prompt again; that also closes the card.
  • On the right are the description and the argument chips. A workflow with neither says "No description".
  • A band at the bottom is headed Environment variables, with a New environment variables button that opens a new environment set.

Press Esc or click anywhere outside the card to close it.

Creating and editing

  • Create: + menu in the Drive header → Workflow.
  • Edit: click the ✎ icon on the workflow's card to open it in the editor.

Write placeholders as {name} directly in the command text — anything in braces becomes an argument chip. Since workflows are plain JSON files on disk, you can also create or edit them with any editor, or check them into a dotfiles repo.

Hover previews

Like every Drive object, hovering a workflow in the tree shows a preview card with its title, the command snippet, and when it was last edited — handy when you have several similar workflows and can't remember which is which.

Workflows vs prompts vs notebooks

  • Use a workflow for a shell command you run with different values.
  • Use a prompt for a reusable agent query.
  • Use a notebook for documentation that mixes prose with commands.