Cgen
C/C++ source generation from an AST
Install / Use
/learn @inducer/CgenREADME
cgen: An Abstract Syntax Tree for C, in Python
.. image:: https://gitlab.tiker.net/inducer/cgen/badges/main/pipeline.svg :alt: Gitlab Build Status :target: https://gitlab.tiker.net/inducer/cgen/commits/main .. image:: https://github.com/inducer/cgen/actions/workflows/ci.yml/badge.svg :alt: Github Build Status :target: https://github.com/inducer/cgen/actions/workflows/ci.yml .. image:: https://badge.fury.io/py/cgen.svg :alt: Python Package Index Release Page :target: https://pypi.org/project/cgen/
cgen offers a simple abstract syntax tree for C and related languages
(C++/CUDA/OpenCL) to allow structured code generation from Python.
To represent mathematical expressions, cgen can be used with pymbolic <https://github.com/inducer/pymbolic>__.
Places on the web related to cgen:
Python package index <https://pypi.org/project/cgen>__ (download releases)Documentation <https://documen.tician.de/cgen>__ (read how things work)Github <https://github.com/inducer/cgen>__ (get latest source code, file bugs)
cgen is licensed under the liberal MIT license <https://en.wikipedia.org/wiki/MIT_License>__ and free for commercial, academic,
and private use. All of cgen's dependencies can be automatically installed from
the package index after using::
pip install cgen
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
109.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
109.4kCreate 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.
model-usage
349.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
