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 detail card, each {argument} renders as a highlighted chip inside the command, and a row of argument chips below the command lists every parameter 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
- Open the tools panel (
ctrl+\) and switch to the Drive view. - Click the workflow — its detail card opens in the center panel, showing the command with its argument chips.
- Click the command. Mel inserts it into the active pane's prompt with the first
{argument}placeholder selected, so you can immediately type the real value over it. - Fill in the value and run.
That first-argument selection is the whole trick: insert, type, enter. No clicking around to find the part you need to change.
Creating and editing
- Create: + menu in the Drive header → Workflow.
- Edit: click the ✎ icon on the workflow's detail 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.
Related
- Mel Drive overview
- Environment variables — for values that should come from the environment rather than a placeholder