lexifina/brazil-law
About
Brazil: law history, one commit per law taking effect (sources so far) · Part of global law
Developer ToolsMeasured star growth
- in 24h
- +1
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
OriginalBrazil: law history in git
Português · English
The law of Brazil as a git history: one file per article, one commit per version on the day it took effect, and the act that made each change as the commit's author. git blame names the act behind every paragraph; git log lists every change to an article; picking a date gives the text in force that day.
Part of lexifina/global-law, one git history for every country's law: this is Brazil's federal law, which global-law reads at brazil/national/acts/.
What is in it now: the Constitution and 323 federal codes and laws with their history, from 1851 on; 15,400 federal statutes in all with their text in force (federal/); the text as published in the Diário Oficial of 32,072 federal norms (federal/textos-originais/); 29,928 normative acts and rulings of the CMN, the Banco Central, the CVM, the Receita Federal and ANATEL (reguladores/); 28,949 state acts of 18 states (estados/); and 4.8 million court decisions of the STF, STJ, TST, TJDFT, TRF2, TRF4, TRF6, TJPR, TJSP and, from the RepoJus mirror, TJES and TJMT (tribunais/). Of the 29,407 numbered federal statutes in the Senado's catalogue, 25,738 (88%) are held with their text. Collection paused on 25 November 2026. Each act's folder has a README.md listing its provisions, how often each changed and when. GitHub's file history stops at the move of 24 November 2026: use the full history in each act's README.md or git log --follow.
Held back when collection paused on 25 November 2026:
- 3,669 numbered federal statutes not held, about 3,450 of them because normas.leg.br has no readable original text; earlier versions of the acts held as current text only; the 165,359 numbered decrees;
- court decisions naming a person's CPF, held unpublished (about 248,000 in the RepoJus mirror); about 251,000 STF rulings whose text sits behind a challenge page; the STJ's Diário days 5 November 2019 to 31 December 2020, in neither of its open datasets;
- state-law lanes for Bahia, Goiás, Tocantins and Rio Grande do Norte, and the TJSC's decisions, built but not checked, so not published; Rio de Janeiro, Santa Catarina, Rio Grande do Sul, Espírito Santo, Amapá, Maranhão, Roraima and Mato Grosso, whose sites refused or blocked us;
- the Diário Oficial da União, ANEEL and Saúde Legis (ANVISA), which answered with errors or block pages.
Each act is a folder named after it under federal/<kind>/, one file per article (federal/codigos-e-estatutos/clt/art-134.md is art. 134 of the Consolidação das Leis do Trabalho, the labour code, Decreto-Lei 5.452/1943; federal/leis/2001/lei-10334-de-2001/ is Lei 10.334/2001; data/paths.json lists where each act was before the move of 24 November 2026); the Constitution is constituicao/, with the articles of the ADCT as adct-art-<n>.md.
The text is in Portuguese, as Planalto prints it. An English translation is not part of this record.
Questions as git commands
| Question | Command |
|---|---|
| Every change to art. 134 of the CLT (annual leave) | git log --follow -p --word-diff -- federal/codigos-e-estatutos/clt/art-134.md |
| Which act wrote each paragraph of art. 134? | git blame federal/codigos-e-estatutos/clt/art-134.md |
| Every version of the CLT, with the day each took effect | git log --format="%h %(trailers:key=In-force,valueonly,separator=) %an" -- federal/codigos-e-estatutos/clt clt ':(exclude)*/README.md' |
| Art. 134 as in force on 1 January 2015 | python tools/vigente_em.py 2015-01-01 clt 134 |
Outside git, we also host this record publicly, for free:
- Ask Claude about Brazilian law: opens Claude with a first question ready.
- Ask ChatGPT: the same question in ChatGPT.
- Search Brazilian law on our site: a search for "férias" (annual leave), with each provision's text and its versions, no account needed.
- Developer REST API: the same search as JSON, with no key. See the documentation here.
Both assistants read the record through the free Global law connector (MCP, https://global-law.lexifina.com/mcp); the first time, the chat gives you the link that adds it. Ask in Portuguese or in English.
Host it yourself easily. All it takes is git and Python, and the tools run on your machine:
git clone --depth 1 https://github.com/lexifina/global-law && cd global-law
python3 tools/countries.py add brazil/national/acts
python3 tools/law.py show 2026-01-01 brazil/national/acts/federal/codigos-e-estatutos/clt/art-134.md
Opened in Claude Code, Cursor, VS Code or Codex, the clone also starts a local MCP server with the same tools (MCP.md).
Dates
Each commit is dated at noon, America/Sao_Paulo, on the day the version took effect, and carries it in its In-force: trailer, beside Enacted: and Published::
- the day the amending act's own vigência clause gives (on publication, on promulgation, on a fixed day, or provision by provision), or the later day it fixes for a provision to produce effects; with no clause, LINDB art. 1: 45 days after official publication, counted under LC 95/1998 art. 8 § 1;
- a Medida Provisória from its publication; one that lapsed or was rejected is followed by a commit that restores the earlier wording, dated by the Congress record;
- for the 5,000 acts with their current text only, the in-force day of the latest change that text shows;
- git cannot store dates before 1970, so the 235 earlier commits are dated from 1970-01-01, one second apart, with the real day in
In-force:. Ask for a date withtools/vigente_em.py, notgit log --before.
Each change is credited to the act Planalto's note beside it names ("Redação dada pela Lei nº 13.467, de 2017"), at an address that cannot exist ([email protected]); rulings of the Supremo Tribunal Federal that Planalto shows as struck words are commits of kind court. The one version of each current-text act is credited to Planalto as the oldest version available. The futuro branch also holds what is enacted but not yet in force, such as EC 141/2026's art. 7 XV (16 December 2026) and EC 132/2023's tax-reform stages of 2027 and 2033.
How it is checked
tools/check_repo.pyreads every one of the 9,366 versions back from git on the day it took effect and on the day before, and compares it with the corpus: 0 mismatches. The results are inREPRODUCE.md.- The text in force today of the Constitution and the codes is compared with Planalto's consolidated page, unit by unit. For the Constitution, 392 of 414 units were identical on 28 October 2026, and the other 22 differ only where Planalto's two pages are typeset differently; every difference is listed in
REPRODUCE.md. - No merge commits on
main, no commit dates that go backwards, nothing dated after the build, and every commit's trailers parse. - History is append-only: new acts and versions are added on top (
tools/append.py), and no published commit is rewritten. - vulnerabilities/: possible drafting mistakes in Brazilian law, found by global-law's detectors and checked by hand.
What it does not show
- Earlier wordings of 5,000 acts. They have their current text only; their history is to be added later as labelled corrections.
- Other federal acts. No decretos (beyond those among the original texts), and Medidas Provisórias only as the changes they made and as original texts. 3,669 numbered federal statutes in the Senado's catalogue are not held (most of them Decretos-Leis of 1937-1946 and budget laws). Case law: the STF, STJ, TST, TJDFT, TRF2, TRF4, TRF6, TJPR and TJSP, and other courts only where the RepoJus mirror has them; nothing from the TSE or the STM. Collection paused on 25 November 2026.
- Wording the source does not date. In the CLT, 60 struck lines with no note are left out of every version; in Lei 8.112/1990, the periods of Medidas Provisórias 301/2006, 341/2006 and 359/2007, whose wording Planalto does not print, are missing.
- Effects that change no words: the STF's interpretations ("Vide ADI"), and effects that are only financial, retroactive or left to a later act.
- Signatures, Planalto's notes (used only to date and credit changes) and a few annexes, such as the fee table of the Estatuto do Desarmamento.
Sources
| Source | Kind | Past versions | Notes |
|---|---|---|---|
| Planalto (Legislação) (Presidência da República, Casa Civil) | Official legislation | partly: superseded wording kept, struck through, with a note naming the amending act | Each act's page (annotated, and consolidated where Planalto has one) and the page of every act its notes cite, read through dated Internet Archive copies; the authoritative text is the one published in the Diário Oficial da União |
| Supremo Tribunal Federal | Court | n/a | Case pages of the rulings that struck words, for the decision and the day it was published |
| LexML Brasil (Senado Federal) | Legislative records | no | Each cited law's "Publicação Original" day in the Diário Oficial |
| Câmara dos Deputados, Legislação Informatizada | Parliament | no | Publication facts only (retificações, an Ato Declaratório) |
| normas.leg.br (Congresso Nacional) | Legislative records, CC BY 4.0 | yes: each provision's versions | Since November 2026: LC 214/2025's versions, and the text of each federal norm as published in the Diário Oficial da União (federal/textos-originais/) |
| Banco Central do Brasil, Busca de normas | Regulator | no (the text in force) | Since November 2026: resolutions of the Conselho Monetário Nacional and the BCB's resolutions, circulars and instructions (reguladores/) |
| Senado Federal, Dados Abertos (SIGEN) | Legislative records | no | The catalogue of federal norms (the count of statutes above) and their changes |
| Superior Tribunal de Justiça, Dados Abertos | Court, CC BY | n/a | Acórdãos and decisões terminativas (tribunais/stj/) |
| Supremo Tribunal Federal, jurisprudência | Court | n/a | Acórdãos and decisions (tribunais/stf/) |
| Tribunal Superior do Trabalho, jurisprudência | Court | n/a | Acórdãos, from the court's own PDFs (tribunais/tst/) |
| TJDFT, JurisDF | Court | n/a | Acórdãos (tribunais/tjdft/) |
| RepoJus (André Badini) | Dataset, CC BY 4.0 | n/a | A credited mirror, only for courts without an official source here |
| TRF2, TRF4, TRF6 (eproc jurisprudence search) | Courts | n/a | Acórdãos (tribunais/trf2/, trf4/, trf6/) |
| TJPR, TJSP (eproc) | Courts | n/a | Acórdãos (tribunais/tjpr/, tribunais/tjsp/) |
| CVM, Receita Federal, SIJUT2, ANATEL | Regulators | no (the text in force) | Normative acts; the Receita's Soluções de Consulta as documents (reguladores/) |
| State legislatures and Casas Civis (SAPL of AC, AL, AM, PB, PI, RO; ALEPE; ALMG; Legisla-e; earlier Lexifina state repositories) | State legislation | as each source gives | estados/<state>/ |
Licence
See LICENSE. The texts are official acts of Brazil as the Presidency of the Republic (Casa Civil) publishes them on planalto.gov.br, and official acts are not protected by copyright in Brazil (Lei 9.610/1998, art. 8º, IV); the arrangement of the history, the commit messages, the tables and the tools are CC0 1.0.
No AI model wrote, translated or changed legal text, and none runs when the history is built; the scripts, and the tables of in-force days in them, were written by an AI model from the official pages (see REPRODUCE.md).
Visualisations
- visualisations/: charts drawn from this repository. Not drawn yet.
More
From lexifina/global-law:
- FEATURES.md: every feature, and what every corpus must support (
git blame,law.py, the MCP tools) - 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: whether updates are running · WATCHING.md: how each official source is watched for changes
- performance/: how fast the tools are, measured
- visualisations/: charts and bridges across the world's law
- Vulnerabilities: mistakes in legislation as published
Explore related projects
Loading…