Skip to main content

FP Enforcer

Functional programming enforcement for AI coding harnesses: portable Agent Skills, curated pattern packs, a stdlib-only Python CLI, and per-project hooks for Cursor, Claude Code, Codex, and Antigravity.

Vendor-neutral Open Plugins root + Agent Skills. Host adapters build installable marketplaces; the Python package on PyPI remains the runtime used by fp-enforcer wire.

Install (plugins)

One curl one-liner per host. Plain install upgrades in place (replaces any prior managed install). Uninstall is a separate script — there is no --uninstall on install.

Replace REF with master (or a tag) as needed.

Claude Code

Install:

curl -fsSL https://raw.githubusercontent.com/theocarranza/fp-enforcer/master/adapters/claude/install.sh \
  | bash -s -- --repo theocarranza/fp-enforcer --ref master

Then:

/plugin install fp-enforcer@fp-enforcer-local

Uninstall:

curl -fsSL https://raw.githubusercontent.com/theocarranza/fp-enforcer/master/adapters/claude/uninstall.sh \
  | bash -s -- --repo theocarranza/fp-enforcer --ref master

Cursor

Install (curl → ~/.cursor/plugins/local):

curl -fsSL https://raw.githubusercontent.com/theocarranza/fp-enforcer/master/adapters/cursor/install.sh \
  | bash -s -- --repo theocarranza/fp-enforcer --ref master

Uninstall:

curl -fsSL https://raw.githubusercontent.com/theocarranza/fp-enforcer/master/adapters/cursor/uninstall.sh \
  | bash -s -- --repo theocarranza/fp-enforcer --ref master

Codex

Install:

curl -fsSL https://raw.githubusercontent.com/theocarranza/fp-enforcer/master/adapters/codex/install.sh \
  | bash -s -- --repo theocarranza/fp-enforcer --ref master

Codex marketplace manifests use .agents/plugins/marketplace.json (and mirrored accepted paths).

Uninstall:

curl -fsSL https://raw.githubusercontent.com/theocarranza/fp-enforcer/master/adapters/codex/uninstall.sh \
  | bash -s -- --repo theocarranza/fp-enforcer --ref master

From a clone: ./adapters/<host>/install.sh or ./adapters/<host>/uninstall.sh. Dry-run: add --dry-run.

Runtime (PyPI)

Per-project wiring still uses the CLI:

pipx install fp-enforcer
# or: uv tool install fp-enforcer

fp-enforcer wire --dest /path/to/project --clients cursor,claude,codex,antigravity

Skills:

Skill Purpose
fp-validate Scan paths/diffs for FP violations
fp-repair Fix violations from a report
fp-learn Detect FP libraries; write knowledge profiles
fp-assimilate Activate curated pattern packs
fp-wire Install runtime + wire per-project hooks/rules

Authoring / build

./scripts/validate.sh
./scripts/build_all.sh

Version lockstep is enforced across VERSION, .plugin/plugin.json, host manifests, adapter templates, and pyproject.toml. Do not hand-edit dist/.

Canonical skills live under skills/<name>/SKILL.md (portable frontmatter only: name, description, license). The same files are mirrored under fp_enforcer/skills/ for wheel package data. Host overlays live in adapters/<host>/skill-overlay.md.

Layout

.plugin/plugin.json          Open Plugins manifest
skills/                      Portable Agent Skills
fp_enforcer/                 Python package (CLI, rules, adapters, mirrored skills)
adapters/{cursor,claude,codex}/
scripts/validate.sh
scripts/build_all.sh
hooks/hooks.json             Valid no-op plugin hook descriptor

License

MIT

Release files for fp-enforcer 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fp-enforcer 0.3.2
File Size Uploaded
fp_enforcer-0.3.2.tar.gz 42.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fp-enforcer 0.3.2
File Interpreter ABI Platform
fp_enforcer-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 83.9 kB

Release files / fp_enforcer-0.3.2.tar.gz

Download URL fp_enforcer-0.3.2.tar.gz
Size 42.7 kB
Tags Source
SHA-256 checksum
How to use checksums
299c0a8fb404912d7f046ff2a934c8a8b038bf672e0a96595ca9ee6eee9dff38
BLAKE2b-256 checksum
How to use checksums
83dd2533669b75132472e368e3338d17ac4e0ce643240908095f68d01abe10c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Release files / fp_enforcer-0.3.2-py3-none-any.whl

Download URL fp_enforcer-0.3.2-py3-none-any.whl
Size 41.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
102dab8f5349d67538ac37a860d92b7759ad72b180f66df8fb761b062e42852a
BLAKE2b-256 checksum
How to use checksums
9772e858a8eb85cc85778e9d92a7919075413f834e4baa5fcb721dfbe0b6461e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release 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