head to head · open source
garak vs lean-ctx
garak has 9,622 GitHub stars, 1,388 forks, 429 open issues and last shipped 4 days ago. lean-ctx has 3,890 stars, 353 forks, 9 open issues and last shipped yesterday. garak leads on adoption by 147% (9,622 vs 3,890 stars). garak is written in Python under Apache-2.0; lean-ctx is written in Rust under Apache-2.0. garak has attracted 14% as many forks as stars, lean-ctx 9%. lean-ctx was the more recently maintained of the two, and both are self-hostable with no licence fee. The two share 1 topic tag (ai), so they are genuine substitutes rather than adjacent tools.
Two open source projects, one decision. Both are free and self-hostable — the differences are community size, license terms, language stack and release pace.
← all 20902 open source comparisons
Side by side
| garak | lean-ctx | |
|---|---|---|
| GitHub stars | ★ 9.6K | ★ 3.9K |
| License | Apache-2.0 | Apache-2.0 |
| Written in | Python | Rust |
| Last push | 2026-10-16 | 2026-10-19 |
| Forks | ⑂ 1.4K | ⑂ 353 |
| Self-hosting | Yes | Yes |
| Data ownership | Your server | Your server |
pick garak if
- You weight community size — 9.6K stars and counting
- You want the Apache-2.0 license terms
- Your stack matches Python
- You value the larger contributor base for long-term maintenance
pick lean-ctx if
- You want the lean-ctx feature set and don't need the biggest community
- You prefer the Apache-2.0 license terms
- Your stack matches Rust
- You evaluated both and lean-ctx fits your workflow better
About garak
garak, LLM vulnerability scanner Generative AI Red teaming & Assessment Kit garak checks if an LLM can be made to fail in a way we don't want. garak probes for hallucination, data leakage, prompt injection, misinformation, toxicity generation, jailbreaks, and many other weaknesses. If you know nmap or msf / Metasploit Framework, garak does somewhat similar things to them, but for LLMs. garak focuses on ways of making an LLM or dialog system fail. It combines static, dynamic, and adaptive probes to explore this. garak 's a free tool. We love developing it and are always interested in adding functionality to…
read the full garak overview →
About lean-ctx
██╗ ███████╗ █████╗ ███╗ ██╗ ██████╗████████╗██╗ ██╗ ██║ ██╔════╝██╔══██╗████╗ ██║ ██╔════╝╚══██╔══╝╚██╗██╔╝ ██║ █████╗ ███████║██╔██╗ ██║ ██║ ██║ ╚███╔╝ ██║ ██╔══╝ ██╔══██║██║╚██╗██║ ██║ ██║ ██╔██╗ ███████╗███████╗██║ ██║██║ ╚████║ ╚██████╗ ██║ ██╔╝ ██╗ ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ LeanCTX Context Gateway for AI Systems. Control what your AI can see. LeanCTX sits between AI tools and the information they read. It selects task relevant context, applies supported access and content controls before delivery, and records the context operations and delivery evidence it can observe. Your…
read the full lean-ctx overview →
More in AI & Machine Learning
Related comparisons
More AI Security & Privacy projects
Compare either of these against the rest of the AI Security & Privacy field.
Frequently asked questions
Is garak or lean-ctx more popular?
garak has 9,622 GitHub stars and lean-ctx has 3,890. garak has the larger community by that measure.
Are garak and lean-ctx free?
Both are open source. garak is licensed under Apache-2.0 and lean-ctx under Apache-2.0. Neither carries a licence fee.
What is the difference between garak and lean-ctx?
garak is written in Python and lean-ctx in Rust. The practical differences are community size, licence terms, language stack and release cadence — all compared in the table above.
Which should I choose, garak or lean-ctx?
Choose garak if you want the larger community (9,622 stars) or its Apache-2.0 licence terms. Choose lean-ctx if its feature set, stack or Apache-2.0 licence fits better. Both are self-hostable.