United States Code (federal laws) in Git

The entire United States Code is now available as a Git repository in Markdown format, allowing users to track legal changes using standard developer tools like git diff and git log.
The entire United States Code — every title, chapter, and section — stored as Markdown in a Git repository. Each commit represents a point-in-time snapshot of federal law, with git diff revealing exactly what changed between enactments.
Laws change. Understanding what changed and when has historically required navigating dense legal databases or reading legislative summaries written by someone else. Git solves this naturally:
git log— see the history of federal law from 2013 to presentgit diff— see exactly what text changed between any two points in timegit blame— trace when a specific provision was added- Tags — jump to a specific Congress or year
uscode/
├── title-01-general-provisions/
│ ├── _title.md # Title metadata
│ ├── chapter-001-rules-of-construction.md
│ ├── chapter-002-acts-and-resolutions-...md
│ └── ...
├── title-02-the-congress/
├── title-03-the-president/
├── ...
└── title-54-national-park-service-and-related-programs/
53 titles of the United States Code, ~2,950 chapter-level Markdown files, ~60,400 sections with full statutory text, 13 commits spanning 2013–2025 (one per OLRC release point).
Each Markdown file includes YAML frontmatter with metadata (title number, chapter, heading, section count, source URL) and the full statutory text with cross-references, statutory notes, and amendment histories.
Every commit corresponds to an Office of the Law Revision Counsel (OLRC) release point — an official snapshot of the US Code as amended through a specific Public Law.
| Tag | Public Law | Year | Description |
|---|---|---|---|
| annual/2013 | 113-21 | 2013 | Earliest available OLRC snapshot |
| congress/113 | 113-296 | 2014 | End of 113th Congress |
| annual/2015 | 114-38 | 2015 | |
| congress/114 | 114-329 | 2017 | End of 114th Congress |
| annual/2017 | 115-51 | 2017 | |
| congress/115 | 115-442 | 2019 | End of 115th Congress |
| annual/2019 | 116-91 | 2019 | |
| congress/116 | 116-344 | 2021 | End of 116th Congress |
| annual/2021 | 117-81 | 2021 | |
| annual/2022 | 117-262 | 2022 | |
| congress/117 | 117-262 | 2022 | End of 117th Congress |
| annual/2024 | 118-158 | 2024 | |
| congress/118 | 118-158 | 2024 | End of 118th Congress |
| annual/2025 | 119-73 | 2025 | Current (latest) |
# What changed in federal law between the 115th and 116th Congress?
git diff congress/115..congress/116 --stat
# Full text diff of Title 18 (Crimes) between 2019 and 2025
git diff annual/2019..annual/2025 -- uscode/title-18-crimes-and-criminal-procedure/
# When was a specific section last modified?
git log --oneline -- "uscode/title-18-crimes-and-criminal-procedure/chapter-044-firearms.md"
# How many files changed across the entire 12-year history?
git diff annual/2013..annual/2025 --stat | tail -1
All content is derived from the OLRC's official USLM XML release points. The XML is parsed and transformed to Markdown using us-code-tools. Cross-reference links point to the official OLRC website for the preliminary (prelim) edition.
Limitations: Coverage starts in 2013. Only codified law is included. Not all titles are positive law. Appendix titles are not yet included.
Roadmap: Web interface with cross-reference graph, bills as pull requests, roll call vote records, and full-text search.
The United States Code is a work of the US Government and is in the public domain (17 USC § 105). The tooling used to generate this repository is available under the MIT License.
Source: Hacker News












