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 · deps
PyPI codelaw-rules-<name> js · react · html · css · scss · python · data · security-js · security-html · security-python · spell · deps

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

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.2
File Actions
codelaw-0.4.2-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for codelaw-0.4.2-py3-none-win_arm64.whl
codelaw-0.4.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for codelaw-0.4.2-py3-none-win_amd64.whl
codelaw-0.4.2-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for codelaw-0.4.2-py3-none-musllinux_1_2_x86_64.whl
codelaw-0.4.2-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for codelaw-0.4.2-py3-none-musllinux_1_2_aarch64.whl
codelaw-0.4.2-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.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
codelaw-0.4.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for codelaw-0.4.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
codelaw-0.4.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for codelaw-0.4.2-py3-none-macosx_11_0_arm64.whl
codelaw-0.4.2-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for codelaw-0.4.2-py3-none-macosx_10_12_x86_64.whl

Total release size: 104.2 MB

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

Download URL codelaw-0.4.2-py3-none-win_arm64.whl
Size 12.8 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
4b8ca107156590481e9aa16cd494ff20dc5b44b00fe17a2827a70a0982fafc62
BLAKE2b-256 checksum
How to use checksums
7f05a2a60f7ff39f3672a32fa9c9f4cd433a921cf4ba0cf8bc100a6da27bf792
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 30, 2026.

Transparency log

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

Download URL codelaw-0.4.2-py3-none-win_amd64.whl
Size 13.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
1e2e6a9ff46b1598d571cdd19567d9ded3cf53f1c5cda6d18099ff7aecf97bc7
BLAKE2b-256 checksum
How to use checksums
246078a4488ede1204f6ac1990f4c1f5856c6921d96675011b15999db95b708c
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 30, 2026.

Transparency log

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

Download URL codelaw-0.4.2-py3-none-musllinux_1_2_x86_64.whl
Size 13.4 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
ad5845cd614d15e753e231a6493fc5c522bd23b98ef8d064b6fa79cc433c0754
BLAKE2b-256 checksum
How to use checksums
edaa7ef6115ef381b2c4f5e1a4edcefa3e02e44b113c9a377dd97d2c72bc7050
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 30, 2026.

Transparency log

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

Download URL codelaw-0.4.2-py3-none-musllinux_1_2_aarch64.whl
Size 12.5 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
aab00e703da04df08e54b2b941e5cffddd80ceaa2a382213e23d20a58ce2d605
BLAKE2b-256 checksum
How to use checksums
e769ad7cab54eee1d55d88ac1c657be1a4da102b640a304a9c0596117aa17956
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 30, 2026.

Transparency log

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

Download URL codelaw-0.4.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 13.4 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b5843cf3711a71df51aefa7cda671663317c1a048b5bd4a23d65cce585e50abf
BLAKE2b-256 checksum
How to use checksums
fc39543b37f979b5331a9b2d0d0e6ffbd473a6f4b2d15da03d28c99dc5ee1bb6
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 30, 2026.

Transparency log

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

Download URL codelaw-0.4.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 12.5 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
51f6384ae78b4749a1e2f5ab069194ae9b4b26688ebc1cd2247a29486b4c7a36
BLAKE2b-256 checksum
How to use checksums
598682729fe299d7f1c61edcb9b5d30543925fc8dcd02fa4f95098ff27f5c36a
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 30, 2026.

Transparency log

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

Download URL codelaw-0.4.2-py3-none-macosx_11_0_arm64.whl
Size 12.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7f90631a93151e94ea0301744217e2d4423b377dd5120a5c1504866816aada6e
BLAKE2b-256 checksum
How to use checksums
68b91e771d76856da06c294d240cdeeed7fa2b6684088dfa0aac45f91ce0e5dc
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 30, 2026.

Transparency log

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

Download URL codelaw-0.4.2-py3-none-macosx_10_12_x86_64.whl
Size 13.2 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2d45e0145b355b23f9c0596c7198f95212bedaaef77052b62521cacd56ecab5a
BLAKE2b-256 checksum
How to use checksums
ac9d3ca9f8122f17d7176f46c0eb7db69c539d416995b7ac5baaeb59d3b5971f
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 30, 2026.

Transparency log

Security for codelaw 0.4.2

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.2-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 30, 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