Skip to content

Commit 918ab51

Browse files
committed
Document executable prompt files.
1 parent 229eada commit 918ab51

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,24 @@ echo "John is 30" | ./runprompt extract.prompt | ./runprompt generate-bio.prompt
9191

9292
The JSON output from the first prompt becomes template variables in the second.
9393

94+
### Executable prompt files
95+
96+
Make `.prompt` files directly executable with a shebang:
97+
98+
```handlebars
99+
#!/usr/bin/env runprompt
100+
model: anthropic/claude-sonnet-4-20250514
101+
---
102+
Hello, I'm {{name}}!
103+
```
104+
105+
```bash
106+
chmod +x hello.prompt
107+
echo '{"name": "World"}' | ./hello.prompt
108+
```
109+
110+
Note: `runprompt` must be in your PATH, or use a relative/absolute path in the shebang (e.g. `#!/usr/bin/env ./runprompt`).
111+
94112
### CLI overrides
95113

96114
Override any frontmatter value from the command line:

0 commit comments

Comments
 (0)