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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fp_enforcer-0.3.2.tar.gz.
File metadata
- Download URL: fp_enforcer-0.3.2.tar.gz
- Upload date:
- Size: 42.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
299c0a8fb404912d7f046ff2a934c8a8b038bf672e0a96595ca9ee6eee9dff38
|
|
| MD5 |
0ddadd11eaace042df044188ce033c55
|
|
| BLAKE2b-256 |
83dd2533669b75132472e368e3338d17ac4e0ce643240908095f68d01abe10c1
|
Provenance
The following attestation bundles were made for fp_enforcer-0.3.2.tar.gz:
Publisher:
release.yml on theocarranza/fp-enforcer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fp_enforcer-0.3.2.tar.gz -
Subject digest:
299c0a8fb404912d7f046ff2a934c8a8b038bf672e0a96595ca9ee6eee9dff38 - Sigstore transparency entry: 2395293783
- Sigstore integration time:
-
Permalink:
theocarranza/fp-enforcer@26bc1b7c93df0b65318cadae98f42dce2385f53e -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/theocarranza
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@26bc1b7c93df0b65318cadae98f42dce2385f53e -
Trigger Event:
push
-
Statement type:
File details
Details for the file fp_enforcer-0.3.2-py3-none-any.whl.
File metadata
- Download URL: fp_enforcer-0.3.2-py3-none-any.whl
- Upload date:
- Size: 41.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
102dab8f5349d67538ac37a860d92b7759ad72b180f66df8fb761b062e42852a
|
|
| MD5 |
9a8fe087b0341f896dc7f8bea2766565
|
|
| BLAKE2b-256 |
9772e858a8eb85cc85778e9d92a7919075413f834e4baa5fcb721dfbe0b6461e
|
Provenance
The following attestation bundles were made for fp_enforcer-0.3.2-py3-none-any.whl:
Publisher:
release.yml on theocarranza/fp-enforcer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fp_enforcer-0.3.2-py3-none-any.whl -
Subject digest:
102dab8f5349d67538ac37a860d92b7759ad72b180f66df8fb761b062e42852a - Sigstore transparency entry: 2395294466
- Sigstore integration time:
-
Permalink:
theocarranza/fp-enforcer@26bc1b7c93df0b65318cadae98f42dce2385f53e -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/theocarranza
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@26bc1b7c93df0b65318cadae98f42dce2385f53e -
Trigger Event:
push
-
Statement type: