Skip to main content

Spec-to-artefact prompt compiler with multi-vendor adapters and MCP server.

Project description

prompiler

Spec-to-artefact prompt compiler with multi-vendor adapters and MCP server.

prompiler compiles a declarative specification into deterministic prompt artefacts for Anthropic, OpenAI, Gemini, and Ollama backends, and exposes the compiler over a Model Context Protocol (MCP) server.

Status

0.1.0 — first public release (Phase P8: hardening, docs, release). See docs/PLAN.md for the roadmap and docs/PRD.md for the product spec.

New here? Start with the Tutorial for a cold-install-to-extraction walkthrough, then the Python API reference.

Requirements

  • Python >=3.11,<3.12
  • uv for environment and dependency management

Quickstart

uv sync
uv run prompiler --help

Pre-commit hook (downstream projects)

If your project keeps prompt specs under version control, validate them on every commit with pre-commit. prompiler validate loads and lints each spec, exiting 0 when all specs are valid, 1 on a lint error, and 2 when the path does not exist.

Add a local hook to your .pre-commit-config.yaml:

repos:
  - repo: local
    hooks:
      - id: prompiler-validate
        name: validate prompt specs
        entry: prompiler validate
        language: system
        files: ^specs/.*\.ya?ml$
        pass_filenames: false
        args: ["specs/"]

prompiler must be importable in the hook environment — either install it into the same virtualenv pre-commit runs in, or pin it via a managed environment (language: python with additional_dependencies: ["prompiler"]).

Development

Project rules live in docs/RULES.md. The pre-commit gate (ruff, mypy, pytest -m unit with coverage) runs on git commit. See docs/MANUAL_TESTING.md for the test tiers and CLAUDE.md for the agent-facing entry point.

The CLI reference at docs/CLI.md is generated from the Typer app — do not edit it by hand. Regenerate it after changing any command surface:

uv run typer src/prompiler/cli.py utils docs --name prompiler --output docs/CLI.md

License

Apache-2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prompiler-0.1.1.tar.gz (66.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prompiler-0.1.1-py3-none-any.whl (92.1 kB view details)

Uploaded Python 3

File details

Details for the file prompiler-0.1.1.tar.gz.

File metadata

  • Download URL: prompiler-0.1.1.tar.gz
  • Upload date:
  • Size: 66.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prompiler-0.1.1.tar.gz
Algorithm Hash digest
SHA256 58e0dca5716ace5636794ef5ab74fa580c06f3dfd0fd21c70ae63a70ed4984de
MD5 32bbf6037a9ae0211fd7758e492318f4
BLAKE2b-256 50a5b01b78f3e5fcaaf2156cf1a893050f8b90f024ec94226a79896bab62526d

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompiler-0.1.1.tar.gz:

Publisher: release.yml on iVersatile/Prompiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompiler-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: prompiler-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 92.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prompiler-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa3c1466d27da852347b50ac20e5852fb471d588db8adfe7aa9fbfd1e6a8f911
MD5 9bdb97734ebd3c712a9580638e6a8209
BLAKE2b-256 44a9fb08a6886dc263f6e593e8f919bcc3aba3aff5ae034bdd465f4f5c07adc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompiler-0.1.1-py3-none-any.whl:

Publisher: release.yml on iVersatile/Prompiler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page