runprompt  by chr15m

Executable prompt files for GenAI workflows

Created 1 month ago
412 stars

Top 70.9% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a minimal, single-file Python script for executing .prompt files, which bundle GenAI prompt templates with metadata. It targets developers and power users seeking a dependency-free tool to streamline prompt engineering workflows, enabling quick iteration and execution of complex prompts across various LLM providers.

How It Works

The core of the project is a lightweight Python script that parses .prompt files. These files utilize Handlebars syntax for templating and include frontmatter for specifying the GenAI model, configuration, and output format. The script supports piping standard input ({{STDIN}}) and extracting structured JSON output based on Picoschema definitions, offering a straightforward way to manage and run prompts.

Quick Start & Requirements

  • Install: Download the script using curl -O https://raw.githubusercontent.com/chr15m/runprompt/main/runprompt and make it executable with chmod +x runprompt.
  • Prerequisites: API keys for supported providers (Anthropic, OpenAI, Google AI, OpenRouter) are required and should be set as environment variables (e.g., OPENAI_API_KEY).
  • Links: API key setup links are provided for OpenAI, Anthropic, Google AI, and OpenRouter.

Highlighted Details

  • Single-file, dependency-free Python implementation.
  • Dotprompt format: combines prompt template and metadata in one .prompt file.
  • Supports Handlebars templating syntax.
  • Handles {{STDIN}} for piped input and structured JSON output via Picoschema.
  • .prompt files can be made directly executable using a shebang.
  • Supports multiple GenAI providers and custom endpoints (e.g., Ollama) via environment variables or CLI flags.

Maintenance & Community

A TODO.md file is referenced for the project roadmap. No specific community channels or contributor details are mentioned in the provided README.

Licensing & Compatibility

The license type is not explicitly stated in the provided README excerpt.

Limitations & Caveats

The current implementation does not support multi-message prompts, conditional logic within templates ({{#if}}), custom helpers, model configuration parameters (like temperature), partials, or nested Picoschema structures.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
18
Star History
17 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Wei-Lin Chiang Wei-Lin Chiang(Cofounder of LMArena), and
13 more.

awesome-tensor-compilers by merrymercy

0.1%
3k
Curated list of tensor compiler projects and papers
Created 5 years ago
Updated 1 year ago
Starred by Shengjia Zhao Shengjia Zhao(Chief Scientist at Meta Superintelligence Lab), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
14 more.

BIG-bench by google

0.1%
3k
Collaborative benchmark for probing and extrapolating LLM capabilities
Created 5 years ago
Updated 1 year ago
Starred by Lysandre Debut Lysandre Debut(Chief Open-Source Officer at Hugging Face), Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), and
14 more.

simpletransformers by ThilinaRajapakse

0%
4k
Rapid NLP task implementation
Created 6 years ago
Updated 4 months ago
Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
16 more.

text-to-text-transfer-transformer by google-research

0.1%
6k
Unified text-to-text transformer for NLP research
Created 6 years ago
Updated 2 days ago
Starred by Vaibhav Nivargi Vaibhav Nivargi(Cofounder of Moveworks), Chuan Li Chuan Li(Chief Scientific Officer at Lambda), and
5 more.

awesome-mlops by visenger

0.1%
14k
Curated MLOps knowledge hub
Created 5 years ago
Updated 1 year ago
Feedback? Help us improve.