Skip to main content

CI Status Documentation Status Test coverage percentage

uv ruff pypeline pre-commit

PyPI Version Supported Python versions License

C language utils and tools based on the clang and binutils modules.

Installation

Install clanguru using pipx for isolated installation:

pipx install clanguru

Usage

Clanguru provides four main commands for C/C++ code analysis and utility operations:

  • Documentation: Generate (minimal) documentation for C/C++ sources functions and classes. It supports multiple output formats including Myst Markdown, standard Markdown, and RestructuredText.
  • Testing: Create mock objects for unit testing C functions
  • Analysis: Understand object file dependencies and symbol usage. It can generate HTML and Excel reports.

Check the help message for more details:

clanguru --help


 Usage: clanguru [OPTIONS] COMMAND [ARGS]...

 C language utils and tools based on the libclang module.

╭─ Options ────────────────────────────────────────────────────────────╮
│ --version  -v        Show version and exit.                          │
│ --help               Show this message and exit.                     │
╰──────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────╮
│ docs      Generate documentation for C/C++ source code.              │
│ mock      Generate mocks for C functions and variables.              │
│ parse     Parse C source code and print the translation unit.        │
│ analyze   Analyze object files dependencies.                         │
╰──────────────────────────────────────────────────────────────────────╯

For detailed help on each command, use the --help option with the command name.

clanguru analyze --help

Object File Analysis

Clanguru can analyze object files to understand their dependencies and symbol usage. For this, you need to build your project and provide the compilation database (compile_commands.json). Also, ensure that the nm command-line tool is available in your system PATH.

To generate an html dynamic dependency report, run the following command:

clanguru analyze --compilation-database compile_commands.json --output-file dependencies.html --use-parent-deps

If the output file ends with .xlsx, an Excel report will be generated instead of an HTML one.

Contributing

The project uses UV for dependencies management and packaging and the pypeline for streamlining the development workflow. Use pipx (or your favorite package manager) to install the pypeline in an isolated environment:

pipx install pypeline-runner

To bootstrap the project and run all the steps configured in the pypeline.yaml file, execute the following command:

pypeline run

For those using VS Code there are tasks defined for the most common commands:

  • run tests
  • run pre-commit checks (linters, formatters, etc.)
  • generate documentation

See the .vscode/tasks.json for more details.

Metadata

Release files for clanguru 0.21.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clanguru 0.21.2
File Size Uploaded
clanguru-0.21.2.tar.gz 42.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clanguru 0.21.2
File Interpreter ABI Platform
clanguru-0.21.2-py3-none-any.whl Python 3 none any Details

Total release size: 87.2 kB

Release files / clanguru-0.21.2.tar.gz

Download URL clanguru-0.21.2.tar.gz
Size 42.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7955ca2c8818c6de1563fa067b73f6c96ed84d319b0c2809d31ff67048b53108
BLAKE2b-256 checksum
How to use checksums
c265f381f22a2367a69c24f03eb935c2b32ac4c8cf3ca480a2ffdc6c0b65da00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / clanguru-0.21.2-py3-none-any.whl

Download URL clanguru-0.21.2-py3-none-any.whl
Size 44.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a80b6dfdf6edcf70cfa0642f6c2763f09b3e5bf160b80e50c411e44a29f0f714
BLAKE2b-256 checksum
How to use checksums
0109ec29b18c420287022f31d5e5c3c85f42b36c6e2f083f26aa60bcc1dedd82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page