Metadata-Version: 2.4
Name: prompiler
Version: 0.1.2
Summary: Spec-to-artefact prompt compiler with multi-vendor adapters and MCP server.
Project-URL: Homepage, https://github.com/iVersatile/Prompiler
Project-URL: Repository, https://github.com/iVersatile/Prompiler
Project-URL: Issues, https://github.com/iVersatile/Prompiler/issues
Author: prompiler contributors
License: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: anthropic,compiler,gemini,llm,mcp,ollama,openai,prompt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.12,>=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: jinja2>=3.1
Requires-Dist: jsonschema>=4.23
Requires-Dist: mcp<2,>=1.2
Requires-Dist: pydantic>=2.9
Requires-Dist: pyyaml>=6.0
Requires-Dist: typer>=0.12
Provides-Extra: adc
Requires-Dist: google-auth>=2.0; extra == 'adc'
Provides-Extra: telemetry
Requires-Dist: opentelemetry-api>=1.27; extra == 'telemetry'
Requires-Dist: opentelemetry-sdk>=1.27; extra == 'telemetry'
Description-Content-Type: text/markdown

# 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`](docs/PLAN.md) for the roadmap and [`docs/PRD.md`](docs/PRD.md) for the product spec.

New here? Start with the [Tutorial](docs/TUTORIAL.md) for a cold-install-to-extraction walkthrough, then the [Python API reference](docs/API.md).

## Requirements

- Python `>=3.11,<3.12`
- [uv](https://docs.astral.sh/uv/) for environment and dependency management

## Quickstart

```bash
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](https://pre-commit.com/). `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`:

```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`](docs/RULES.md). The pre-commit gate (ruff, mypy, pytest -m unit with coverage) runs on `git commit`. See [`docs/MANUAL_TESTING.md`](docs/MANUAL_TESTING.md) for the test tiers and [`CLAUDE.md`](CLAUDE.md) for the agent-facing entry point.

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

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

## License

Apache-2.0. See [`LICENSE`](LICENSE).
