Runprompt
run .prompt files from the command line
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
I built a single-file Python script that lets you run LLM prompts from the command line with templating, structured outputs, and the ability to chain prompts together.When I discovered Google's Dotprompt format (frontmatter + Handlebars templates), I realized it was perfect for something I'd been wanting: treating prompts as first-class programs you can pipe together Unix-style. Google uses Dotprompt in Firebase Genkit and I wanted something simpler - just run a .prompt file directly on the command line.Here's what it looks like:--- model: anthropic/claude-sonnet-4-20250514 output: format: json schema: sentiment: string, positive/negative/neutral confidence: number, 0-1 score --- Analyze the sentiment of: {{STDIN}}Running it:cat reviews.txt | ./runprompt sentiment.prompt | jq '.sentiment'The things I think are interesting:* Structured output schemas: Define JSON schemas in the frontmatter using a simple `field: type, description` syntax. The LLM reliably returns valid JSON you can pipe to other tools.* Prompt chaining: Pipe JSON output from one prompt as template variables into the next. This makes it easy to build multi-step agentic workflows as simple shell pipelines.* Zero dependencies: It's a single Python file that uses only stdlib. Just curl it down and run it.* Provider agnostic: Works with Anthropic, OpenAI, Google AI, and OpenRouter (which gives you access to dozens of models through one API key).You can use it to automate things like extracting structured data from unstructured text, generating reports from logs, and building small agentic workflows without spinning up a whole framework.Would love your feedback, and PRs are most welcome!
HN · launched Nov 27, 2025 · 134 upvotes (top 7%) · 0 views
Niche: prompt engineering and management tools · 173 launches, 13 in the last 7 days ▼ -19% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- AI-native
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 173 launches in prompt engineering and management tools →
Could you build this?
Yes A single-file Python CLI that parses markdown frontmatter, renders Handlebars/Jinja templates, and calls standard LLM APIs.
Discussion
20 comments analyzed.
Competitors mentioned: llm (Simon Willison's tool), pmp (prompt management tool), mlflow (for prompt storage), dotprompt (Google's format)
Concerns raised: Centralized SQLite database storage instead of project-local files, Functions require command-line specification each time vs. config file defaults, Confusing configuration and setup with unclear data locations, Python-based tools are difficult to install and manage across environments, Generic name 'llm' makes it hard to search for
Feature requests: JSON schema validation with retry logic for reliable outputs, Caching mechanism to avoid re-executing identical prompts, Support for local LLMs via BASE_URL configuration, File modalities support for different data types, Config file hierarchy (.prompt-functions in current/home directory)
Competitors
Other products that read as similar to this one : 46 launches clear the similarity bar, closest 8 shown.
Attention rank: #2 of 47 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 7 days after the earliest competitor.
- VideoPrompt · ph · 2026-10-14 · 1 upvotes · similarity 0.43
- TokenPropulsion 2.0 · ph · 2026-10-19 · 1 upvotes · similarity 0.42
- LLM Playground OS · ph · 2026-09-06 · 1 upvotes · similarity 0.40
- Script2Prompt AI · ph · 2026-09-09 · 2 upvotes · similarity 0.40
- I built a free LLMs.txt generator · hn · 2026-04-25 · 5 upvotes · similarity 0.39
- Polo Prompt · ph · 2026-09-21 · 3 upvotes · similarity 0.38
- Bash4LLM+ · hn · 2026-06-28 · 60 upvotes · similarity 0.38
- Compile English specs into 22 MB neural functions that run locally · hn · 2026-04-15 · 11 upvotes · similarity 0.37
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.