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.2.tar.gz (67.3 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.2-py3-none-any.whl (93.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prompiler-0.1.2.tar.gz
  • Upload date:
  • Size: 67.3 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.2.tar.gz
Algorithm Hash digest
SHA256 d51f97dd09c673d4ef950645263b4f99b910352a2228eb66315e23d5b232eeb1
MD5 477a4427da90f170f747764f6606c0e9
BLAKE2b-256 94face26a218cb1fca9885c91465a78e828b84907480e13edab20994dc48d728

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompiler-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: prompiler-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 93.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ef15e917e39741a00eb5e1d05c5804a3877935676352ac76f3513a38158fd8f
MD5 85139e4b352394279af0df16ff9a49d0
BLAKE2b-256 56a0674ee8b6ed8959acd39b221160398ba712bf952d23536bd9a49254ce3cf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompiler-0.1.2-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