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

Download files

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

Source Distribution

fp_enforcer-0.3.2.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

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

fp_enforcer-0.3.2-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

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

Hashes for fp_enforcer-0.3.2.tar.gz
Algorithm Hash digest
SHA256 299c0a8fb404912d7f046ff2a934c8a8b038bf672e0a96595ca9ee6eee9dff38
MD5 0ddadd11eaace042df044188ce033c55
BLAKE2b-256 83dd2533669b75132472e368e3338d17ac4e0ce643240908095f68d01abe10c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for fp_enforcer-0.3.2.tar.gz:

Publisher: release.yml on theocarranza/fp-enforcer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for fp_enforcer-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 102dab8f5349d67538ac37a860d92b7759ad72b180f66df8fb761b062e42852a
MD5 9a8fe087b0341f896dc7f8bea2766565
BLAKE2b-256 9772e858a8eb85cc85778e9d92a7919075413f834e4baa5fcb721dfbe0b6461e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fp_enforcer-0.3.2-py3-none-any.whl:

Publisher: release.yml on theocarranza/fp-enforcer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page