The world's legislation, version-controlled like code
Every country's law as a git history where each commit is one law taking effect — so you can blame a statute like a line of code.
What it does
lexifina/global-law collects the law of many jurisdictions into per-country git repositories, then stitches them together here as submodules. Each commit represents one law coming into force, and the tools read the In-force date of every commit, so you can ask for the law of any country on any date. It covers national, state, and even city level (e.g. brazil/bahia/salvador/acts/).
The interesting bit
Because every word of a provision has a commit behind it, git blame semantics apply to legislation: tools/law.py words tells you which law wrote each word. That turns “what did this statute say in 2022, and who changed it” from a research chore into a diff query. There’s also an MCP server with 18 read-only tools, so an AI assistant can check a case or brief against the law in force on a given date.
Key highlights
- Time-travel queries: show, diff, and blame any provision between any two dates.
- MCP server (
tools/mcp_server.py) runs locally, needs only Python 3.9+ and git, makes no network calls. manifest.jsonandjurisdiction.jsondescribe every corpus: path, repository, coverage, and dates.- Tools repo is CC0 — fork it, ship it in a product, no credit needed (law text sits in each country repo under its own terms).
- Built from scratch as one commit per law in force order; the frozen history and
REPRODUCE.mddocument how.
Caveats
- Every country is several GB, and you can’t shallow-clone — dates are read from the whole history.
- First read of a corpus builds a one-time index (cached in
.git/global-law-cache), so expect a slow start. - Coverage per jurisdiction isn’t spelled out in the README beyond examples; check
manifest.jsonbefore assuming your country is there.
Verdict
Worth a look for legal-tech builders, anyone doing cross-jurisdiction compliance work, or developers who want an AI assistant that cites the actual law in force. If you just need today’s statute text, a plain government website is lighter — the value here is history and provenance.
Frequently asked
- What is lexifina/global-law?
- Every country's law as a git history where each commit is one law taking effect — so you can blame a statute like a line of code.
- Is global-law open source?
- Yes — lexifina/global-law is an open-source project tracked on heatdrop.
- What language is global-law written in?
- lexifina/global-law is primarily written in HTML.
- How popular is global-law?
- lexifina/global-law has 1.9k stars on GitHub.
- Where can I find global-law?
- lexifina/global-law is on GitHub at https://github.com/lexifina/global-law.