agent: SentimentAnalyzer
system:
role: classifier
instruction: "Classify the input as positive, negative, or neutral."
user: "{input_text}"
output:
sentiment: "one of: positive, negative, neutral"
confidence: "float between 0 and 1"
vars:
input_text: "The product broke on day one."
A Structured Prompt Compiler for Deterministic LLM Workflows.
Write prompts in .llm files, validate them before spending tokens,
compile provider-native JSON, and run them against live APIs.
run Command
156 Rust Tests
Write Once. Check Before Runtime. Ship Provider-Native Output.
The compiler enforces structure before execution, keeps prompt sources reviewable, and emits the exact JSON shape your provider APIs expect.
{
"messages": [
{
"role": "system",
"content": "role: classifier\ninstruction: Classify the input as positive, negative, or neutral."
},
{
"role": "user",
"content": "The product broke on day one."
}
]
}
CLI Flow
Keep the developer loop short: validate first, transpile next, run only when the payload is explicit.
$ llm_format validate sentiment.llm
$ llm_format transpile sentiment.llm --target openai-chat
$ llm_format run sentiment.llm --provider openai --model gpt-4o-mini
Core Features
The value is not speculative syntax. It is a compiler-backed workflow for structured prompt authoring, validation, transpilation, and execution.
Validate Before Runtime
Catch missing required keys, type mismatches, undefined vars, include cycles, and merge conflicts before any API call is made.
Compile to OpenAI Chat JSON
Emit a clean Chat Completions payload ready for CLI previews, direct HTTP calls, or SDK handoff.
Compile to Anthropic Messages JSON
Generate the Messages API shape directly, with the compiler handling prompt normalization before the request is sent.
Format and Lint .llm Files
Use canonical formatting for stable diffs and lint rules for prompt quality issues that are worth catching before execution.
Compose Prompts with Include and Vars
Share base instructions across files, merge structured prompt sections, and expand vars at compile time.
Execute Live Requests with Run
Validate, transpile, inject model settings, and send provider-native requests from the CLI with a single command.
CLI Command Surface
The command surface is small, explicit, and built around deterministic compiler behavior.
Distribution Surface
promptus-dsl is already useful in multiple entry modes. The CLI is primary, the VS Code extension supports authoring, and this Pages site can host a lightweight browser demo.
Compiler-first local workflow
Build from source or run the binary directly for parse, validate, transpile, bench, lint, and live execution.
Download release binaries
Release automation already stages native binaries for Windows, macOS, and Linux from tagged builds.
Author prompts with guardrails
Syntax support, inline diagnostics, completions, hover, go-to-definition, and formatter integration are available today through manual `.vsix` installation.
Landing page & demo
This site is a polished product entry with a lightweight in-browser demo, not a claim that the full web product is complete.
Status and Trust
The project is already shipping practical value: deterministic compiler behavior, native provider targets, and a test-backed Rust core rather than a marketing-only format concept.