md² documentation

Placeholders

Placeholders let one action definition work for every card. They are written as {{name}} and resolved on the desktop side, just before the process starts.

Placeholder Resolves to
{{card-file}} Path to the selected card’s Markdown file.
{{this-card}} Alias of {{card-file}}; the same path to the selected card’s Markdown file.
{{card-title}} Title of the selected card.
{{card-prompt}} The extra text you typed in the action popup for this run.
{{worktree-folder}} Absolute path to the action execution checkout.
{{repository-folder}} Absolute path to the opened repository.
{{project-folder}} Absolute path to the configured project.projectFolder under the opened repository. Equal to {{repository-folder}} when configuration is empty.
{{releases-folder}} Absolute path to the configured releases folder under the opened repository.

They work in both prompt (agent actions) and command (command actions).

Using them

In the prompt editor, type {{ for a typeahead list, or insert one from the toolbar.

{
  "id": "fix-bug",
  "label": "Fix bug",
  "description": "Fix the bug described on the card",
  "type": "agent",
  "prompt": "Fix the bug described in {{card-file}}.\n\nExtra instructions: {{card-prompt}}"
}
{
  "id": "open-in-editor",
  "label": "Open in VS Code",
  "description": "Open the card file in VS Code",
  "type": "command",
  "command": "code {{card-file}}"
}

Notes

See also: Action definition, Cookbook.