v5.x • Deterministic Rust Toolchain • OpenAI + Anthropic Targets

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.

Native OpenAI Chat JSON Native Anthropic Messages JSON Live run Command 156 Rust Tests
sentiment.llm — Promptus DSL Workbench
Loading WASM…
📄 sentiment.llm
0 chars
✓ 0 problems found

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.

LLM Source
Authoring Layer
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."
OpenAI Chat Output
Provider-Native JSON
{
  "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.

01

Validate Before Runtime

Catch missing required keys, type mismatches, undefined vars, include cycles, and merge conflicts before any API call is made.

02

Compile to OpenAI Chat JSON

Emit a clean Chat Completions payload ready for CLI previews, direct HTTP calls, or SDK handoff.

03

Compile to Anthropic Messages JSON

Generate the Messages API shape directly, with the compiler handling prompt normalization before the request is sent.

04

Format and Lint .llm Files

Use canonical formatting for stable diffs and lint rules for prompt quality issues that are worth catching before execution.

05

Compose Prompts with Include and Vars

Share base instructions across files, merge structured prompt sections, and expand vars at compile time.

06

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.

parse validate transpile fmt bench run lint

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.

Rust CLI

Compiler-first local workflow

Build from source or run the binary directly for parse, validate, transpile, bench, lint, and live execution.

GitHub Releases

Download release binaries

Release automation already stages native binaries for Windows, macOS, and Linux from tagged builds.

VS Code extension

Author prompts with guardrails

Syntax support, inline diagnostics, completions, hover, go-to-definition, and formatter integration are available today through manual `.vsix` installation.

GitHub Pages

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.

Release Line
v5.x Current product direction centers on provider-native JSON and live execution.
Providers
2 native OpenAI Chat and Anthropic Messages targets are implemented as first-class outputs.
Compiler Behavior
Deterministic Exact-string conformance coverage protects parser, validator, formatter, and transpilation surfaces.
Rust Test Suite
156 tests The current repo state is verified by a broad compiler and CLI test surface.