Skip to main content

reci

Compile declarative CI recipes into fully-wired GitHub Actions workflows with typed data-flow validation.

To install: pip install reci

Why reci

Writing GitHub Actions workflows by hand means wading through hundreds of lines of boilerplate: forwarding step outputs to job outputs, threading needs.X.outputs.Y expressions across jobs, and copy-pasting config values that belong in one place. When something changes you touch a dozen lines across three jobs — and one typo silently breaks your pipeline.

reci lets you write a short recipe that says what your CI does (which actions, in what order, with what config), and the compiler handles how — auto-wiring cross-job outputs, injecting config from pyproject.toml, and validating data-flow before you push.

Agent skills (recommended)

reci ships with CLI and Python APIs (see below), but the best way to use it is through AI agent skills — structured instructions that let coding assistants operate reci on your behalf. Instead of memorizing CLI flags and YAML syntax, just say what you want:

  • "Set up CI for this project"
  • "Migrate my existing workflow to reci"
  • "What CI actions make sense here?"

Available skills

Skill What it does
ci-setup Examines your project, proposes a CI plan, writes a recipe, compiles to a workflow
ci-migrate Converts an existing GitHub Actions workflow into a reci recipe
ci-advisor Interactive discussion about what CI pipeline makes sense for your project
reci-dev Guide for contributors — architecture, adding rules, adding adapters

Using the skills

Claude Code — symlink or copy the skills into your project or your personal skills directory:

# Make available to all your projects
ln -s /path/to/reci/.claude/skills/ci-setup ~/.claude/skills/ci-setup
ln -s /path/to/reci/.claude/skills/ci-migrate ~/.claude/skills/ci-migrate
ln -s /path/to/reci/.claude/skills/ci-advisor ~/.claude/skills/ci-advisor

# Or just for one project
ln -s /path/to/reci/.claude/skills/ci-setup my-project/.claude/skills/ci-setup

Then invoke with /ci-setup, /ci-migrate, or /ci-advisor in Claude Code. See the Claude Code skills docs for details.

Other agents — the skills are plain Markdown files following the open Agent Skills standard. For Cursor, Copilot, Windsurf, and other tools, see the standard's integration guide.

Quick start

from reci import (
    parse_recipe_string,
    compile_recipe,
    dump_workflow,
    ActionSpec,
    InputSpec,
    OutputSpec,
)

recipe = parse_recipe_string("""
name: CI
on: [push, pull_request]

jobs:
  test:
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '${{ config.python_version }}'
      - id: run_tests
        run: pytest
""")

# Action specs can be fetched from GitHub or provided manually
specs = {
    "actions/checkout@v4": ActionSpec(ref="actions/checkout@v4"),
    "actions/setup-python@v5": ActionSpec(
        ref="actions/setup-python@v5",
        inputs={"python_version": InputSpec(name="python_version", default="3.x")},
    ),
}

config = {"python_version": "3.12"}
workflow = compile_recipe(recipe, specs, config=config)
print(dump_workflow(workflow))

The compiler:

  • Injects a setup job that exports config values as job outputs
  • Rewrites ${{ config.* }} to ${{ needs.setup.outputs.* }}
  • Auto-wires needs: edges from data-flow dependencies
  • Generates the cross-job output forwarding ceremony (step output -> job output -> needs consumption)

CLI

# Inspect an action's input/output contract
reci inspect actions/setup-python@v5

# Compile a recipe to workflow YAML
reci compile recipe.yml --output .github/workflows/ci.yml

# Validate a recipe + config
reci validate --recipe recipe.yml --format cli

# Scaffold a config skeleton from a recipe
reci scaffold recipe.yml

Five-level input resolution

For each action input, the compiler resolves its value using this precedence:

  1. Explicit with: in the recipe — used verbatim
  2. Upstream output match${{ steps.<id>.outputs.<name> }}
  3. Config value (scoped action__key, then shared key) — ${{ needs.setup.outputs.<key> }}
  4. Default from action.yml — omitted (GitHub uses the default)
  5. Required + no source — validation error

Validation

ESLint-style severity (error/warning/info) with ruff-style rule prefixes:

Rule Category What it catches
DAG001 Structure Cycle detected
DAG002 Structure Duplicate output name in a job
FLOW001 Data flow Required input has no source
FLOW002 Data flow Ambiguous wiring (multiple upstream matches)
FLOW006 Data flow Matrix job output consumed downstream (non-deterministic)
CONF001 Config Required config key missing
PURE001 Purity run: step breaks typed contract
ACT002 Action Referenced action not found

Config adapters

Read CI config from your project file of choice:

Adapter Section Library
pyproject [tool.ci] tomlkit (round-trip)
wads [tool.wads.ci] tomlkit
package-json "ci" key json
yaml .ci.yml ruamel.yaml

The recipe format

A recipe looks like a GitHub Actions workflow with reci extensions:

  • ${{ config.* }} — references to config values (resolved from pyproject.toml etc.)
  • bind: — input renaming (bind: {tag_name: version} wires upstream output version to input tag_name)
  • outputs: on run: steps — manual output annotation for untyped steps
name: Python CI
on: [push, pull_request]

jobs:
  test:
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '${{ config.python_version }}'
      - run: pytest

  publish:
    needs: [test]
    steps:
      - uses: actions/checkout@v4
      - id: bump
        uses: i2mint/isee/actions/bump-version-number@master
      - uses: i2mint/wads/actions/git-tag@master
        bind:
          tag_name: version  # wire bump's "version" output to git-tag's "tag_name" input

Download files

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

Source Distribution

reci-0.0.6.tar.gz (67.8 kB view details)

Uploaded Source

Built Distribution

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

reci-0.0.6-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file reci-0.0.6.tar.gz.

File metadata

  • Download URL: reci-0.0.6.tar.gz
  • Upload date:
  • Size: 67.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for reci-0.0.6.tar.gz
Algorithm Hash digest
SHA256 ab764e61b64f2c4bd26d6ecf49d359ee76168a4581a5776a6a6d5e557a74d830
MD5 45e9c9178ecbdfa2e7cb146e5ec02979
BLAKE2b-256 8df3974f224f562d8ca23e08af73eb6f871fb048b0b13807e1ef36610be18601

See more details on using hashes here.

File details

Details for the file reci-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: reci-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for reci-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e15dfd3d04f2a9abc745ea584684d17e67a9b46f80230b80164f06013992bf05
MD5 6b46cbe29f1f8b0a58dd3627e1824d79
BLAKE2b-256 4f3ba3b247f6af517165ae69e775639a59c783b8dcdcfab2483d0e5db2fd963f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page