Skip to main content

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

MIT — https://github.com/arpitarya/codelaw

Metadata

Release files for codelaw 0.4.0

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

Built distributions (wheels)

Table of built distributions (wheels) for codelaw 0.4.0
File Actions
codelaw-0.4.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for codelaw-0.4.0-py3-none-win_arm64.whl
codelaw-0.4.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for codelaw-0.4.0-py3-none-win_amd64.whl
codelaw-0.4.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for codelaw-0.4.0-py3-none-musllinux_1_2_x86_64.whl
codelaw-0.4.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for codelaw-0.4.0-py3-none-musllinux_1_2_aarch64.whl
codelaw-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for codelaw-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
codelaw-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for codelaw-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
codelaw-0.4.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for codelaw-0.4.0-py3-none-macosx_11_0_arm64.whl
codelaw-0.4.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for codelaw-0.4.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 98.5 MB

Release files / codelaw-0.4.0-py3-none-win_arm64.whl

Download URL codelaw-0.4.0-py3-none-win_arm64.whl
Size 12.1 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
6652d9f99bccaab92a311233bbec1af96e81ecd16588577e53752057aa8843be
BLAKE2b-256 checksum
How to use checksums
f1eb49d1323ed117736c20b3744e1ba611845287501aceaf22b3b23b9b5ae1be
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 29, 2026.

Transparency log

Release files / codelaw-0.4.0-py3-none-win_amd64.whl

Download URL codelaw-0.4.0-py3-none-win_amd64.whl
Size 13.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
133c52eab30988bd9d890cb40f1786b34f230c6bfddd8ed7670d2896ad1a2540
BLAKE2b-256 checksum
How to use checksums
8a30d3fe73e54bd53ba599001875bf05278b18f3fba11013b1de200b4a10ce52
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 29, 2026.

Transparency log

Release files / codelaw-0.4.0-py3-none-musllinux_1_2_x86_64.whl

Download URL codelaw-0.4.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
701f43043a168335c80eb38924bb133966b42fb1bbdad4831adb3efaa40369f9
BLAKE2b-256 checksum
How to use checksums
feda93fe7d803356ab53977d24cafa87b8d899472fea2dff6abb9ea600ffc9b4
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 29, 2026.

Transparency log

Release files / codelaw-0.4.0-py3-none-musllinux_1_2_aarch64.whl

Download URL codelaw-0.4.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
8736b55aaacbe46f856bf0200f17a3d3e6cb36d37af5228462dd35fec4c7218a
BLAKE2b-256 checksum
How to use checksums
c5ef5209ea482c748ca90965419077a40bae0dfe768ddaf6c14a4d2b30d1ed06
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 29, 2026.

Transparency log

Release files / codelaw-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL codelaw-0.4.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
4d5f29513bb5672123b0871b88ba57c89926c0bd2d5b0bf304a145ed483f8ad3
BLAKE2b-256 checksum
How to use checksums
41895e1790566ac14547004bbbb616059c06d12586cb0c4783dc3ab6b20ed99e
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 29, 2026.

Transparency log

Release files / codelaw-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL codelaw-0.4.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
95848d54514df8be85e79d3befb6791a91d149727b40a5dd215ea7b7817e51cd
BLAKE2b-256 checksum
How to use checksums
786d098d166743c6a1b152c793e3fb26bd35e652b85a3128e3427f1ba637bfb3
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 29, 2026.

Transparency log

Release files / codelaw-0.4.0-py3-none-macosx_11_0_arm64.whl

Download URL codelaw-0.4.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
8491086ffdbd0133fe213f20a0a1c5a5463e1350b6679b9d97e8e40f8734a6d4
BLAKE2b-256 checksum
How to use checksums
82173a7179c5e6c21562f269862e6120db2af91a039fcc0946f81389f3e5b36c
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 29, 2026.

Transparency log

Release files / codelaw-0.4.0-py3-none-macosx_10_12_x86_64.whl

Download URL codelaw-0.4.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
0ed7f333c7fe7ebaa976992599bed6939c4b3682885db68c79246a0d965b4b0d
BLAKE2b-256 checksum
How to use checksums
3a30101b001dfb9fceff2598e756b5552bf784e13e7f6aa795d7ff0390e6a688
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 29, 2026.

Transparency log

Security for codelaw 0.4.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.

Select from 8 files

Attestation for codelaw-0.4.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 29, 2026.

Transparency log

A 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.

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