mrkeyoor.comAsk

ctresb/leis

leis review

Use ctresb/leis as an import candidate if you are a developer or legal reviewer maintaining checks for document identity, completeness and legal status against the sources.

Not run yet

Dataevaluationupdated 15 Nov 2026
+64stars / 7d

ctresb/leis collects Brazilian legislation in Markdown, with structured headers and links to official sources. The README describes automatic conversion and OCR, and tells readers to consult the source before citing. Its documents and sampled contribution discussions are in Portuguese.

Verdict

Use ctresb/leis as an import candidate if you are a developer or legal reviewer maintaining checks for document identity, completeness and legal status against the sources. Its reported downstream uses provide concrete implementation ideas. Do not use it as the sole authority for an application that promises complete, current legal text directly from the collection.

Infographic on how leis works, its uses, what we have not run yet, common pitfalls and who should use it
We have not run leis yet; the middle band lists what our review has not tested.

We ran it

Screenshot of leis (github.com/ctresb/leis)
github.com/ctresb/leis

Answers from our run

Did you run leis yourself?

No. The repository would not clone into our container, so nothing could be installed or tested. This review is written from the project's own documentation.

Who should not use leis?

Applications that treat a matching law number as proof of complete text.

What are the alternatives to leis?

Planalto compiled legislation, TST jurisprudence search, Legisla Goiás JSON API. Use ctresb/leis as an import candidate if you are a developer or legal reviewer maintaining checks for document identity, completeness and legal status against the sources.

SetupN/AThe sandbox clone failed before installation, and the supplied log gives no diagnostic cause.
Docs2/5The 16,568-character README has no install instructions.Editor’s note: The README documents formats and reproduction requirements; its instructions were not reproduced in the sandbox.
Community3/5Last push on 2026-11-02, 2,840 stars and maintainers answered or closed 0 of the 10 most-discussed issues we sampled.Editor’s note: Sampled issues show contributions and downstream uses, without a measured basis for rating support responsiveness.
Maturity1/5No tagged GitHub release and repository created 2026-10-15.Editor’s note: Reported data defects and a failed clone provide no reproducible basis for a numerical maturity rating.

How we score

Who it’s for

Developers importing Brazilian legislation who can check document identity, completeness and status against its sources.
Researchers who need converted legislation with provenance attached.
Portuguese-speaking legal reviewers who can compare passages with official texts and report discrepancies.

Who it’s NOT for

Applications that treat a matching law number as proof of complete text.
Tools that accept cancellation and revocation fields without checking their source.
Teams that promise municipal coverage from an index entry alone.
Windows contributors requiring a checkout free of the filename restrictions reported in issue #10.

Setup reality

Our 2026-11-15 sandbox attempt failed at git clone. The recorded configuration was 3 CPUs and 8 GB RAM. Installation, build and tests were not run.

The README specifies macOS, Python 3 and Poppler's pdftotext for reproduction, plus pypdf for geometric reconstruction of municipal gazettes. It documents Apple Vision for OCR and a Tesseract 5 path for JPEG, TIFF and PNG conversion. Reading converted Markdown and running these collectors are separate tasks.

ctresb/leis is a Brazilian legislation collection with reported use in personal legal-reference checking, consultation tools and a downstream MCP server. It suits developers and legal reviewers who can compare imported material with its sources. The adoption decision turns on three questions: is this the right law, is its text complete, and is its legal status correct? The supplied issue reports give concrete examples of failures in each category.

What people use leis for

GitHub users report using ctresb/leis for legal-reference checking, consultation tools and a downstream MCP server. The README describes legislation converted from official sources into Markdown, with structured headers and links to the original texts. Developers can import those files and carry the source information into search results. The uses below come from contributors and downstream users, with their reported outcomes kept separate from our sandbox results. Project README.

Who used it What they did Reported outcome
The reporter of issue #3 Used the federal collection as a reference source Found files containing later corrections or promulgated vetoed passages instead of the full law. Federal-text report
petronio2nd Used the collection in a personal legal-reference checker, starting with Goiás Identified a public JSON API behind the state website and offered a technical contribution. Goiás contribution discussion
The reporting team in #28 Used the repository as the basis of a consultation tool Reported applying official TST statuses over the repository data after finding outdated cancellation information. TST status report
thiagocsfoz, discussing Kivohub Used the base as the starting point for a free MCP server Said the server checks each provision against Planalto. Downstream MCP account
viniciusdsandrade Processed Campinas legislation and prepared contribution batches Reported that 3,555 files regenerated identically with the final code proposed in PR #6. Campinas contribution discussion

The reporting team says it applies official statuses over the repository data. That is a useful design example for an importer: keep the collected passage and its provenance, then store a separately sourced status correction. A later import can then be reviewed against that correction rather than silently replacing it. This recommendation follows the team's reported workaround; it is an application design choice, not a feature attributed to leis. Reported status overlay.

What happened when we ran it

Our run on 2026-11-15 failed at git clone: we could not clone ctresb/leis. The recorded sandbox configuration allocated 3 CPUs and 8 GB RAM. The clone record says "hands-on step clone: FAILED", and the cleanup record says "teardown: ok". The table records the stage reached and the subsequent steps, keeping acquisition and cleanup separate from installation or execution of the collection scripts.

Stage Recorded result What it supports
Clone FAILED Our attempt stopped before obtaining a checkout.
Installation, build and tests Not run after the failed clone The attempt produced no installation, build or test result.
Teardown ok The cleanup step was recorded as successful.

Where people get stuck: the right filename can hold the wrong text

Issues #14 and #33 report federal files containing promulgated vetoed passages instead of the complete laws identified by their filenames. The examples are Lei 14.133/2021 and LC 214/2025. Issue #14 describes a file of about 3 KB; #33 describes about 1.9 KB for a law with more than 500 articles. Both report the text version as republication/correction. Lei 14.133 report and LC 214 report.

A law-number search can therefore return the intended identifier while omitting most of the law. Compare the document's body and text version with the question your application promises to answer. Issue #14 also reports Decreto 11.462/2023 stored as an original version without subsequent amendments. A full original publication and a current compiled text answer different retrieval questions, even when both concern the same legal instrument. Federal version examples.

Reported problem Action the reporter proposes or uses Record of the action
Correction or veto promulgation stored as the law Collect the main law, preferably compiled, and retain the correction as a note Issue #3 proposes a collection change. Federal completeness proposal
Outdated TST cancellation statuses Overlay official statuses; use TST jurisprudence search for status and item notes The #28 team reports its downstream workaround. TST workaround
Espírito Santo header and body identify different laws Mark the file inconsistent pending the correct text Issue #19 proposes retaining the discrepancy for review. Identity mismatch report
Campinas extraction leaves page counters and splits sentences Apply cleanup changes proposed in contribution batches #4 describes changes in proposed PRs #6 and #17. Extraction discussion
Windows checkout blocked by quoted filenames Contributor plans a separate compatibility issue #10 reports seven affected filenames in ES/SE. Windows checkout report

Issue #19 describes a file headed Lei Delegada 4/1967 whose body belongs to Lei 4/1947. The report says the official register itself links to the wrong text, illustrating why an official URL and correct document identity are separate checks. The issue also names a truncated Lei 2.261/2026 in Taquaritinga with another law's identifier, and lost strikethroughs in Duas Barras. These reports concern identity, missing text and formatting that distinguishes replaced wording. Material-error report.

Municipal coverage depends on the publishing platform

Issue #4 reports Campinas in the IBGE municipality index but absent from the municipal collection, and another commenter reports Nova Friburgo missing. An index entry and a directory of collected laws answer different questions. For a city-specific application, inspect the actual documents and their dates before describing coverage. Begin with the jurisdiction your tool needs, then check which instruments and periods the collected files represent. Municipal coverage discussion.

Issue #13 says the existing municipal collector covers diariomunicipal.com.br, while Santa Catarina municipalities publish on the separate DOM/SC platform. Its author proposes starting with Criciúma and using CIGA's open-data dumps. The issue describes Canoinhas and São Lourenço do Oeste as the existing Santa Catarina entries, with organic laws through SAPL. This ties the reported coverage gap to a particular publishing platform and a proposed acquisition route. DOM/SC proposal.

The Campinas contributor describes work beyond downloading PDFs: scanning whole document-type indexes, removing library stamps and page counters, repairing sentences split at citations, and recognizing "Artigo único". One update reports restoring 75 split sentences and regenerating 3,555 files identically. Another describes retaining records where PDFs omit the beginning of an article or registration dates conflict. An importer should distinguish successful extraction from acceptance of the resulting legal text. Campinas extraction updates.

Portuguese documents and macOS collection tools shape the audience

The README specifies macOS, Python 3 and Poppler's pdftotext for reproducing the collection. It also lists pypdf for geometric reconstruction of municipal gazettes and Apple Vision for OCR. For JPEG, TIFF and PNG conversion, it documents Tesseract 5 with a Portuguese model. The README and sampled issues are in Portuguese, so contributors encounter Portuguese legal terminology alongside the acquisition and conversion scripts. Documented reproduction requirements.

Reading existing Markdown and regenerating scanned documents are different tasks. The first starts with converted files; the second follows the documented collection pipeline. The header format includes document number, date, text version, source and download date, with additional fields when supplied by the source. The README also describes exceptions, including the root Constitution file and documents represented by absence notices. An importer should account for those representations when reading the collection. Documented file format.

Issue #10 offers an RTX 3060 with 12 GB memory and proposes comparing smaller OCR engines with Vision output. The discussion names Tesseract 5, PaddleOCR, docTR and a small OCR vision model. A commenter recommends LightOnOCR 0.8B from similar work. The proposed comparison uses 120 PDFs, 431 pages and seven states; the contributor estimates that Unlimited-OCR would not fit usefully in 12 GB at the resolution discussed. OCR contribution discussion.

Data integrity needs its own acceptance checks

Issue #28 reports 24 cancelled TST summaries presented as current, omitted item-level cancellation notes and inconsistent revocation flags. The reporting team describes applying official statuses over the repository data. Its account separates the text retrieved from the status presented to a reader, a distinction that matters when an application answers whether a summary or one of its items is still applicable. TST cancellation findings.

For a downstream tool, use separate acceptance checks for identity, completeness and status. Compare the header's number and date with the body. Distinguish original, compiled and correction-only text. Store a status correction with its source and retrieval date. These recommendations follow the reported failure types: the Espírito Santo example concerns identity, the federal examples concern completeness or text version, and the TST example concerns cancellation information.

The README describes retaining official attachments identified by origin, capture and SHA-256 when needed for review. It also explains that a representation may include facsimiles or a complete official PDF when transcription would lose visual content. Those materials let a reviewer compare a converted passage with its captured source. Include formatting that changes interpretation, such as deleted wording and cancellation notes, when deciding whether the representation suits the application's question. Attachment and provenance conventions.

leis vs Planalto, TST search and source-specific collection

Issue #3 recommends Planalto compiled texts for its incomplete federal-law examples, while #28 recommends TST jurisprudence search for status information. These are task-specific comparisons: obtaining complete federal provisions, checking cancellation information or collecting a particular jurisdiction. The table keeps each recommendation attached to the contributor who supplies it, so a developer can choose a source for a concrete job rather than treating every option as a replacement for the whole collection.

Option Why choose it Basis for the comparison
ctresb/leis Start from converted files with shared metadata conventions Reported text and status defects motivate acceptance checks. Federal-text report and TST report
Planalto compiled texts Check complete federal laws in the cases described by #3 The reporter says the compiled texts for those examples are complete. Planalto comparison
TST jurisprudence search Check summary status and item-level cancellation notes The reporter recommends it and describes difficulty with automated access. TST source comparison
Legisla Goiás JSON API Investigate structured collection for a Goiás-specific tool petronio2nd identifies the API as a technical contribution opportunity. Goiás API account
CIGA DOM/SC dumps Investigate collection from the Santa Catarina gazette platform #13 proposes this route instead of scraping the municipal gazette website. CIGA collection proposal

For a federal reference checker, consider leis as an import source and compare important provisions with their official texts. For TST summaries, the consultation team's reported overlay gives an example of separate status handling. The MCP use is downstream: thiagocsfoz describes a server built from the collection that checks provisions against Planalto. These accounts support an import-and-check workflow rather than an assumption that the collection alone answers every legal-status question. Downstream application account.

Questions people ask

The reporters of issues #14 and #33 say the Lei 14.133/2021 and LC 214/2025 files contain later promulgated passages rather than complete laws. A matching filename therefore does not answer their completeness question. The questions below come from the supplied issue discussions and cover the checks and contribution decisions a first-time importer or reviewer encounters. They retain the distinction between a reported practice, a proposed change and a maintainer decision. Lei 14.133 question and LC 214 question.

Does leis contain the complete Lei 14.133/2021 and LC 214/2025, or only later promulgated vetoed passages?

The reporters describe files containing later promulgated passages rather than the complete laws, and request full text, preferably compiled. For an application answering questions about either law, compare the body and text-version field with the official document before accepting the file as its full source. The reported problem concerns the contents of the file even though its identifier names the intended law. Lei 14.133 details and LC 214 details.

How can incomplete republication or correction files be detected?

Issue #3 proposes flagging a law whose body lacks "Art. 1º" and describes that count as approximate. Its discussion also identifies noise in older decree-laws, whose numbering can differ. Use the flag to select documents for review, then inspect their body and text version against the source. That makes the heuristic a way to organize a review queue around a reported failure pattern. Completeness-check proposal.

Are the repository's TST summaries and cancellation flags current?

The author of #28 reports 24 cancelled summaries shown as current, missing item-level cancellation notes and inconsistent flags. The reporting team describes applying official statuses over the collection. For an application using these summaries, that account supports treating status as a separate sourced field rather than deriving it only from retrieved text. The reporter recommends TST jurisprudence search for status and item notes. TST status question and workaround.

How can lawyers contribute to validation without writing code?

Issue #1 invites lawyers to compare samples of laws with Planalto and report discrepancies. A useful report identifies the law, the passage and the difference from the source so another contributor can inspect it. This gives a legal reviewer a contribution route based on reading and comparison, and directly addresses the identity and completeness problems described in the supplied discussions. Legal-validation discussion.

Where can a contributor upload an existing collection of laws and PDF documents?

Issue #12 contains Lucas Fick Machado's request for an email address or upload link for a collection of laws and PDFs. It is a request to have documents considered for inclusion in the project. A contributor following that route can describe the collection, its jurisdictions and its sources in the discussion before preparing a transfer. The supplied question identifies the intake task rather than an established upload service. Document-submission request.

Does the project prefer municipal contributions grouped by series and decade or in larger batches?

The Campinas contributor proposes grouping by series and decade and asks whether larger batches would be preferable. The same discussion includes extraction cleanup and regeneration updates. For a similar contribution, describe the batch's instruments, period and retained records requiring review. That connects the organization question to the actual material being submitted and gives the proposed grouping a concrete scope for discussion. Municipal batch discussion.

Will the project accept an external DOM/SC collector, and should the PR include data as well as the script?

Issue #13 proposes an external DOM/SC collector starting with Criciúma and asks whether a PR should contain the script alone or a data batch too. Its proposed design follows repository conventions for rate limits, resumable collection, originals, canonical headers and failure records. A contribution description can therefore distinguish the collector's behavior from the jurisdiction and document types in its accompanying batch. External collector proposal.

What folder naming and source suffix conventions should municipal contributions use?

The README places municipal legislation under a hierarchy of state and municipality. The DOM/SC proposal asks how to identify the source in filenames, using the existing SAPL suffix as context, and proposes a Criciúma directory within Santa Catarina legislation. Keep the directory hierarchy and the source identifier as separate parts of a contribution proposal so reviewers can assess both choices. Naming question and repository structure.

Which audits and acceptance gates must a municipal batch pass before a PR?

The README documents staged auditing of files as they would enter the next commit. The DOM/SC proposal also names canonical headers, preserved originals and failure records when asking about acceptance requirements. Those elements provide a concrete preparation list for discussion: identify the source, retain captured material and expose failed acquisitions alongside the proposed Markdown batch. Audit documentation and municipal acceptance question.

Which source takes precedence when both DOM/SC and a municipal chamber publish the same law?

Issue #13 asks which source should take precedence when DOM/SC and a chamber both publish a law. Preserve both source identities while discussing that choice, including which edition each document represents. This recommendation follows the README's emphasis on retaining provenance and captured editions: a reviewer needs to know which document supplied the text before deciding whether another publication should replace it. Source-precedence question.

Which OCR engines does the maintainer prefer or rule out?

Issue #10 asks for an engine preference while proposing alternatives to Vision. Its options include Tesseract 5, PaddleOCR, docTR and a small OCR vision model; another commenter suggests LightOnOCR 0.8B based on similar activities. The discussion frames these as candidates for comparison, with attention to omissions, reading order and unwanted generated text when considering a replacement or an additional collection path. OCR engine discussion.

Should OCR acceptance use the existing 120-PDF sample or another benchmark?

The contributor in #10 proposes the existing sample of 120 PDFs, 431 pages and seven states, then asks whether it should be the acceptance criterion. That supplies a specific starting set for discussing a comparison. Agree on the cases and reporting criteria before selecting a replacement engine or planning reprocessing around the offered 12 GB GPU. OCR sample question.

What we have not tested yet

The failed acquisition leaves installation, collection-script execution, OCR, indexing and downstream legal-answer quality untested in our sandbox. The commit is unknown, the image is unavailable, and the clone log supplies no diagnostic cause. The recorded CPU and RAM allocation is not a measured resource requirement. A separate hands-on record describes a Docker Compose deployment with every port bound to 127.0.0.1, without results reconciling that account with the failed-clone harness.

The source checking for this review covered the supplied evidence, rather than independent examination of the reported laws, repetition of the contributor's regeneration result, a security audit or evaluation of the downstream MCP server. The issue examples supply neither a collection-wide accuracy rate nor a production-deployment count. Proposed PR changes and collectors are not confirmed merged fixes. The detailed #19 extract stops during the Espírito Santo discussion; its title and supplied research quotations support naming the Taquaritinga and Duas Barras findings without reconstructing their missing detail.

Several contributor decisions remain unanswered in the supplied record: an upload destination in #12; batch-size preference in #4; acceptance, script-versus-data scope, naming, audit requirements and source precedence in #13; and maintainer OCR preference and benchmark selection in #10. The evidence supplies no completed Windows filename remedy or comparative OCR winner. The README's macOS collection requirement also does not establish the platform requirements of an application that only reads Markdown.

Release status is unknown because the supplied null lookup is inconclusive. Repository metadata was observed on 2026-11-15, but attention figures and timestamps do not measure legal accuracy or support responsiveness. Rendered layout, automatic related links, recommendation modules and template content were outside this text review. Before adoption, obtain a checkout at a recorded commit and compare a full law, an amended text, a correction-only document and an item with a cancellation note against their sources.

Alternatives

ProjectWhat it isPick it when
Planalto compiled legislationThe reporter of issue #3 recommends the complete compiled federal texts for the incomplete-law examples.Choose it to compare the full federal provisions in those reported cases with a repository copy.
TST jurisprudence searchIssue #28 recommends this source for summary status and item-level cancellation notes.Choose it for the status-checking task described in #28, accounting for the reporter's warning about automated access.
Legisla Goiás JSON APIA contributor in issue #1 identifies a public JSON API used by the Goiás legislation website.Investigate this source-specific route when collecting Goiás legislation; the thread presents it as a contribution opportunity.

Sources

  1. ctresb/leis README
  2. Federal correction-only text report
  3. TST status report and downstream applications
  4. Document identity, truncation and strikethrough report
  5. Campinas coverage and contribution discussion
  6. DOM/SC collector proposal
  7. OCR contribution and Windows checkout discussion

More data reviews