Litgen
Automatic Python bindings for C++: readable, discoverable, IDE-friendly.
Install / Use
/learn @pthom/LitgenREADME
litgen - Literate Generator
Automatic Python bindings for C++: readable, discoverable, IDE-friendly.
Battle-tested on 20+ libraries and 100,000 lines of code. Because your users deserve bindings they can actually read.
litgen generates Python bindings for C++ libraries using pybind11 or nanobind. It produces clean, documented, IDE-friendly code with accurate function signatures and auto-completion.
For a full guide on how to use litgen, see the documentation.
Key Features
- Automatically generates Python bindings for C++ libraries.
- Generates fully documented and discoverable Python code, ensuring smooth interaction for end users.
- Provides IDE-friendly bindings with accurate function signatures and auto-completion.
- Works as a C++ transformation and refactoring tool, useful for various workflows.
Documentation
To dive deeper into how litgen works, check out the full documentation.
Battle-Tested
Though relatively new (released in 2022), litgen has been extensively tested on over 20 different libraries, totaling more than 100,000 lines of code. It is the main engine behind the Python bindings for the popular Dear ImGui Bundle.
Keep in Touch
We’d love to hear about how you're using litgen! If you are using it, please consider sharing your experience and insights.
Help the Project
If litgen has made a difference for you—especially in a commercial or research setting—please consider making a donation. Your support helps keep the project alive and growing. Every contribution, no matter the size, is greatly appreciated!
Contributions
Contributions are welcome! If you'd like to report a bug, suggest a feature, or submit a pull request, please visit our GitHub issues page. See the developer documentation inside Build.md
Notable contributors:
- Many thanks to @davidlatwe for his contributions to the nanobind support in litgen!
License
litgen is published under the GNU General Public License, version 3. Code generated by litgen is not subject to GPL, allowing you to freely use it in your projects.
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
