8000
Skip to content

legalize-dev/legalize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Legalize

Legislation as code. Every law as a Markdown file. Every reform as a Git commit.

Legalize turns official legislation into version-controlled, machine-readable data. Browse, search, diff, and build on structured legal data from multiple countries.

legalize.dev — Browse laws, see diffs, search across legislation.

Countries

Country Repo Laws Source Status
🇦🇹 Austria legalize-at 21,830 RIS ✅ Live
🇱🇻 Latvia legalize-lv 15,006 likumi.lv ✅ Live
🇪🇸 Spain legalize-es 12,235 BOE ✅ Live
🇸🇪 Sweden legalize-se 9,701 Riksdagen ✅ Live
🇩🇪 Germany legalize-de 5,729 GII ✅ Live
🇰🇷 South Korea legalize-kr 5,575 law.go.kr ✅ Community
🇫🇷 France legalize-fr 83 codes Légifrance ✅ Live
🇵🇹 Portugal DRE 🚧 Pipeline ready
🇱🇹 Lithuania TAR 🚧 Pipeline ready
🇨🇱 Chile BCN 🚧 Pipeline ready
🇺🇾 Uruguay IMPO 🚧 Pipeline ready
🇫🇮 Finland Finlex 🔜 Help wanted
🇳🇱 Netherlands Overheid.nl 🔜 Help wanted
🇧🇷 Brazil LeXML 🔜 Help wanted
🇺🇸 USA 🔜 Help wanted

Want to add your country? See the step-by-step guide.

How it works

Each law is a Markdown file with YAML frontmatter. When a reform is published, the file is updated and committed with the official publication date.

Standard Git tools become legal research tools:

# Clone Spanish legislation
git clone https://github.com/legalize-dev/legalize-es.git

# What does Article 135 of the Constitution say today?
grep -A 10 "Artículo 135" spain/BOE-A-1978-31229.md

# When did it change?
git log --oneline -- spain/BOE-A-1978-31229.md

# Show the exact diff of the 2011 fiscal stability reform
git diff 6660bcf^..6660bcf -- spain/BOE-A-1978-31229.md

Repos

Repo What
legalize This repo. Index, docs, overview.
legalize-pipeline The engine. Fetches, parses, and commits legislation for 10 countries.
legalize-at Austrian laws (21,830 norms).
legalize-lv Latvian laws (15,006 consolidated norms).
legalize-es Spanish laws (12,235 norms + 17 autonomous communities).
legalize-se Swedish statutes (9,701 laws).
legalize-de German laws (5,729 laws).
legalize-fr French codes (83 codes).
legalize-kr South Korean laws (5,575 laws). Community contribution by @9bow.

Why

Legal texts are amended constantly, but tracking changes is hard. Official sources publish consolidated versions with no way to compare. Commercial providers charge hundreds per month for version history.

Legalize is open legal infrastructure:

  • For developers — structured, versioned legal data with a REST API
  • For researchers and journalists — explore the evolution of legislation with git
  • For citizens — see how the laws that affect you have changed

Contributing

The main contribution is adding a new country. Read the format spec for the minimal contract, then follow the step-by-step guide.

You can use the shared legalize-pipeline or build your own pipeline — as long as the output follows the spec. South Korea was built with an independent pipeline and it works great.

Found an error in a law text? Open an issue in the relevant country repo with the law name, article, and the official source showing the correct version.

Support

Legalize is open source and free. If you want to help fund hosting and development:

License

Legislative content: public domain (sourced from official government publications). Repository structure, metadata, and tooling: MIT.


Created by Enrique Lopez · legalize.dev

About

Legislation as code. Every law as a Markdown file. Every reform as a Git commit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

0