codelaw
A linter and formatter whose rules are Markdown files — for JavaScript, TypeScript, Python, JSON, YAML, TOML, Markdown, CSS and HTML, alone or mixed.
One engine, two registries, identical output. The same native binary ships
as codelaw on npm and on PyPI; neither needs the other.
Install
| your repo | engine | rules for its languages |
|---|---|---|
| Node | npm i -D codelaw |
npx codelaw init adds the @codelaw/rules-* packs |
| Python | uv add --dev codelaw or pip install codelaw |
codelaw init adds the codelaw-rules-* packs |
codelaw installed alone lints nothing until a rule pack is installed — it
says so (codelaw/no-rules).
Agent files — skills, steering, instructions, hooks and MCP registration for
Claude Code, Cowork, Copilot, Codex and Kiro — are a package of their own, at
codelaw's exact version: npm i -D @codelaw/skills or pip install codelaw-skills.
codelaw init --agents installs it; codelaw sync-agents needs it.
Rule packs — each registry carries the packs its users install:
| registry | named | packs |
|---|---|---|
| npm | @codelaw/rules-<name> |
js · ts · react · node · stencil · html · css · scss · css-modules · data · tanstack-query · redux-toolkit · security-js · security-ts · security-html · spell |
| PyPI | codelaw-rules-<name> |
js · react · html · css · scss · python · data · security-js · security-html · security-python · spell |
Use
codelaw check # lint the project
codelaw fix # apply the safe fixes
codelaw check --format json
Programmatic API — runs the bundled binary and returns its JSON report:
import { check, fix, format, rulesFor } from "codelaw";
const report = check(["src"]);
const rules = rulesFor("src/app.ts");
import codelaw
report = codelaw.check(["src"])
rules = codelaw.rules_for("app/main.py")
| npm | Python | what it returns |
|---|---|---|
check(paths, options) |
check(paths, …) |
codelaw check --format json |
fix(paths, options) |
fix(paths, …) |
codelaw fix --format json; unsafe, dryRun / dry_run |
format(paths, options) |
format(paths, …) |
codelaw format --format json; check writes nothing |
rulesFor(path) |
rules_for(path) |
the rules that apply to one file, as codelaw rules --for lists them |
binaryPath(), platformKey() |
binary_path() |
the bundled binary, and the platform key it was chosen by |
Platforms
macOS arm64 and x64 · Linux x64 and arm64, glibc and musl · Windows x64 and arm64. Any other platform fails with an error naming these — codelaw never compiles from source at install time.
Licence
Metadata
Release files for codelaw 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 98.5 MB
Release files / codelaw-0.3.0-py3-none-win_arm64.whl
| Download URL | codelaw-0.3.0-py3-none-win_arm64.whl |
|---|---|
| Size | 12.1 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
05aea10d18a771a2901d2a7036e98adc28c417b842c561e0462704d48162bac9
|
|
BLAKE2b-256 checksum How to use checksums |
8f3cb41667554ec3408f5ab93b602417cb596f2f05df22bbf6eea9ec65de5f8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logRelease files / codelaw-0.3.0-py3-none-win_amd64.whl
| Download URL | codelaw-0.3.0-py3-none-win_amd64.whl |
|---|---|
| Size | 13.1 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
026dd338631e6a1370db861b6f3e46bf585bbffe7212d6a06a8fa1aac8c85eac
|
|
BLAKE2b-256 checksum How to use checksums |
36be4766ddfc6ba19c18a4765cba9609b8dcefdadab686b21af9453daa6e6c7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logRelease files / codelaw-0.3.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | codelaw-0.3.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 12.6 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
8035201280574cbd50f3ec54f2a01fcfeb58e27366bcb3e668d0609fcada3ad2
|
|
BLAKE2b-256 checksum How to use checksums |
e1d8643cb7f18593c29b802ee9e8aec918c4775f0670bf5875658c55b24d2444
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logRelease files / codelaw-0.3.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | codelaw-0.3.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
b508c2b56ca2a544750f42d8ff00613f4c5444899b1c25fbedcf658d392da25c
|
|
BLAKE2b-256 checksum How to use checksums |
dfa83104cdda10c4a43e8a9643c92516d42475937085fe992592b577bcbcc959
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logRelease files / codelaw-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | codelaw-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 12.7 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
bc0342261505a3c29c362859bf02a2b067bfe3ceee734e84f0568d24b48cdb95
|
|
BLAKE2b-256 checksum How to use checksums |
2223857d26e54e59f97722f9db6d3ffc174b545cfa6859757c970c2998e6de76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logRelease files / codelaw-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | codelaw-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 11.9 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
a15cb07dbd3581ed4e8ce92ea229337f24695b2471a2292690e4ac3bde07b69f
|
|
BLAKE2b-256 checksum How to use checksums |
4a4b7eff37c1ebe6cd88edcd8ac918298caf4132f48a0fd58de61d4479cbae94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logRelease files / codelaw-0.3.0-py3-none-macosx_11_0_arm64.whl
| Download URL | codelaw-0.3.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b880b11cdfe9e2c1d633e7bdd1f62ff0b47011ab1a134c41ad45b41368db3087
|
|
BLAKE2b-256 checksum How to use checksums |
ba46ef2e749757cb61073d65209c1426e4c14cb717b418b075272aef28bdc544
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logRelease files / codelaw-0.3.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | codelaw-0.3.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 12.5 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
da681f092eccf6a6470c5443658b16d3bfe3fd4f47ef0c3692a1da5c5396fec1
|
|
BLAKE2b-256 checksum How to use checksums |
be74f6990a20c74b70488fb1ac649d0dba58c4896449e0ca2d788ab4cdaef8dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 28, 2026.
Transparency logSecurity for codelaw 0.3.0
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.
Full provenance
All 8 files in this release have been uploaded with provenance metadata.
Attestation for codelaw-0.3.0-py3-none-win_arm64.whl
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 Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.