Packages

Prayfile core library — package manager for the language placed before inference

Current section

Files

Jump to
pray_core README.md
Raw

README.md

# pray_core

Elixir library for [Prayfile](https://pray.kisko.dev): a package manager for the
language placed before inference.

`pray_core` implements the path-package and `compose` subset. It parses
Prayfiles and prayspecs without evaluating source text, resolves path packages,
writes deterministic lockfiles, renders scoped `compose` destinations, installs
them, and verifies rendered files.

This is not yet full RFC 0100 level 2 conformance. Tarball sources and
`tree`/`file` materialization remain unsupported.

**Website:** [pray.kisko.dev](https://pray.kisko.dev)

**Maintainer:** Andrei Makarov ([contact@kiskolabs.com](mailto:contact@kiskolabs.com))

**Repository:** [amkisko/pray_compat](https://github.com/amkisko/pray_compat) (`pray.ex/`)

**Specification and reference CLI:** [kiskolabs/pray](https://github.com/kiskolabs/pray)

**Packages:** [hex.pm/packages/pray_core](https://hex.pm/packages/pray_core)

**Community docs:** [CHANGELOG.md](CHANGELOG.md) · [LICENSE.md](LICENSE.md) · [SECURITY.md](SECURITY.md)

## Library usage

Add `pray_core` to your dependencies:

```elixir
{:pray, "~> 1.25", hex: :pray_core}
```

Resolve a Prayfile once, then render compose destinations or produce its
lockfile:

```elixir
manifest_path = "Prayfile"
project = Pray.Core.resolve(manifest_path)
destinations = Pray.Core.render(project)
lockfile = Pray.Core.lock(project)

Pray.Core.install(manifest_path)
Pray.Core.verify(manifest_path)
```

## Example

`examples/compose` is a complete path-package project. Run it without modifying
the example directory. The optional CLI wraps the same core library:

```sh
bin/pray install examples/compose/Prayfile
bin/pray verify examples/compose/Prayfile
```

The root `Prayfile` uses the reference Pray CLI to provision shared project
instructions, skills, and community files from `amkisko/prayers`. The local
subset implementation remains exercised by the self-contained example.

## Development

```sh
make ci
bin/pray version
```

The project uses only OTP and Elixir standard libraries. Mix's Erlang `cover`
integration enforces 100% module line coverage. Benchmarks report median parse,
resolve, and render durations. `make ci` also checks formatting, compiler
warnings, maintained mutants, dependency policy, the runnable example, and the
150-line warning/300-line source limit.

## Release

Set the version in `mix.exs`, then publish `pray_core` to Hex. From the
monorepo root:

```sh
make release-ex-dry-run
make release-ex
```

Or from this directory: `make release` / `make release DRY_RUN=1`. The release
script reads `@version` from `mix.exs` when `VERSION` is omitted. A dry-run
runs every local gate and builds the Hex package without publishing. Credentials
stay in the Hex helper or `HEX_API_KEY`.