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.3.tar.gz (69.0 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.3-py3-none-any.whl (95.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prompiler-0.1.3.tar.gz
  • Upload date:
  • Size: 69.0 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.3.tar.gz
Algorithm Hash digest
SHA256 fed96c094213bdfad230888e7bae0956cb7939a390d767c219a3163eed028b58
MD5 42be68a2c12c6a337db260a28bb4e02f
BLAKE2b-256 127f642a91be3e16829a31036f1dbfd576d5ac9e45b0fc621f004c19ca8d3cb5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: prompiler-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 95.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6ba9d310af9964ed0b7c3fec37bc19e142c8e9a95540994f55d46bad5295cda
MD5 f014ee9f499886c05b9f5426c7b27521
BLAKE2b-256 0b5dad2517df7fe23ce270f6062d7ebbae4500b24772f5b0f372c053986976e3

See more details on using hashes here.

Provenance

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