Prompts & Templates

Write prompt files and use variables

Promptmd runs Markdown files as prompts. A prompt file is just text, with optional YAML frontmatter.

Basic prompt

greetings.md
Say hello to the user.

Run it:

promd greetings

Variables

Any unknown --flag value passed to promd becomes a template variable.

weather.md
Check the weather in {{city}}.
promd weather --city Berlin

If a variable is missing, promptmd keeps the placeholder (and warns in verbose logs).

Using {{input}}

When you chain prompts, the next step receives the previous step output in {{input}}.

summarize.md
Summarize this in 3 bullet points:

{{input}}
story.md
Write a story about {{topic}}
promd story summarize --topic Bananas

Structured output (frontmatter)

Add an output: section to tell the backend you want a JSON object back.

extract.md
---
output:
  title: "short title"
  priority: "low|medium|high"
---

Read the following text and return JSON.

{{input}}

In later steps, you can reference properties:

next.md
Make a plan for: {{input.title}} (priority: {{input.priority}})

On this page