lexifina/global-law
lexifina/global-law has 1,936 GitHub stars and 183 forks. GitHot measured +19 stars in 24 hours and +161 in 7 days. Last checked 2026-11-11 16:49 UTC. Last push 2026-11-02.
Git for Global Law: the law of every country as one git history, each country's record a submodule, every commit one law taking effect
Measured star growth
- in 24h
- +19
- in 7 days
- +161
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalGit for Global Law
The world's law in one git history. Every word traced to the law that wrote it for any country and any date.
An expansion of the same for the US Code, #1 on Hacker News (28/10/26). Semantic, searchable law on a global scale.
https://github.com/user-attachments/assets/f24f3411-24d9-416a-8c45-9cebc817c64e
Free to use: CC0. Fork it, build on it, ship it in a product: no permission or credit needed. The law text sits in each country's repository, under that repository's own terms.
Each jurisdiction's law is its own repository, lexifina/<country>-law, where every commit is one law taking effect,
written by that law. This repository holds them all as submodules, arranged by jurisdiction, and moves each one forward
to its latest commit. The tools read the In-force date of every commit, so they give the law of any country on any
date.
global-law/
├── manifest.json every corpus: path, repository, coverage and dates
├── jurisdiction.json the world, and the jurisdictions in it
├── germany/bund/acts/ a country's law (submodule)
├── brazil/bahia/acts/ a state's
├── brazil/bahia/salvador/acts/ a city's
└── …
Start
git clone --depth 1 https://github.com/lexifina/global-law && cd global-law
python3 tools/countries.py add united-states/federal/usc # one corpus; every country is several GB
python3 tools/law.py show 2022-05-01 united-states/federal/usc/title-11/1182.md
On Windows, type py or python where these say python3.
--depth 1 downloads the index without its whole history, a fraction of the size. The tools never read that
history, so they work the same. To have it without its file contents, clone with --filter=blob:none instead. For
every country, add --recurse-submodules. Don't clone a country's repository with --depth: its dates are read from
its whole history, and countries.py add fetches all of it.
From an AI model (MCP)
tools/mcp_server.py is a Model Context Protocol server with 18 read-only tools: find a provision, read it on a date,
who wrote each word, compare dates, a provision's history, search the text and the changes, and check a case or a
brief against the law in force. It needs only Python 3.9+ and git, runs on your machine and makes no network calls.
The clone carries the setup for Claude Code, Cursor, VS Code and Codex, so the server starts when you open the folder. For another client:
{ "mcpServers": { "global-law": { "command": "git", "args": ["-C", "/path/to/global-law", "-c", "alias.global-law-mcp=!sh tools/mcp.sh", "global-law-mcp"] } } }
Then ask, for example, "What did 11 U.S.C. §1182(1) say on 1 May 2022, and which law last changed it?" MCP.md has every tool and the details.
Command line
python tools/law.py world 2022-05-01 every corpus on that day
python tools/law.py show 2022-05-01 <path> a provision on a date
python tools/law.py blame 2022-07-01 <path> the law behind each line
python tools/law.py words 2022-07-01 <path> the law behind each word
python tools/law.py diff 2022-05-01 2022-07-01 <path> what changed between two dates
python tools/law.py laws 1990-01-01 1990-12-31 germany the laws that took effect
Dates are YYYY-MM-DD. The first read of a corpus indexes its history once and keeps the index in
.git/global-law-cache.
- A corpus moved to a new folder still answers under its old path (
data/moved-paths.tsv). After a pull that moves corpora, rungit submodule syncandgit submodule update --init. manifest.jsonand thejurisdiction.jsonfiles are written bytools/describe.py.
How it is made
The repository's history only grows: each commit adds corpora, moves their pins forward, or changes the tools and
documentation. tools/verify.py checks it. Up to 29 October 2026 it was built from scratch as one commit per law in
the order the changes took force; that history is kept, frozen, and REPRODUCE.md records how it was
made.
More
- FAQ.md: questions and answers · CONTRIBUTING.md: proposing changes · MCP.md: the MCP server · REPRODUCE.md: how it was built · CHANGELOG.md
- FRESHNESS.md: how current each corpus is · MONITORING.md: whether updates are running
- performance/: how fast the tools are, measured
- visualisations/: charts and bridges across the world's law
- Tests:
python -m unittest discover -s tests
Videos
https://github.com/user-attachments/assets/6020acb1-53f3-4b65-94a4-fe132b867358
https://github.com/user-attachments/assets/3e3076d7-cfb4-4e0a-8552-2926a630fc8e
License
This repository is CC0. The law text is in each country's repository, under that repository's own terms.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
562,095 starspublic-apis/public-apis
A collective list of free APIs
498,490 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
454,809 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,406 stars