linuxdoc
Sphinx-doc extensions & tools to extract documentation from C/C++ source file comments.
What it is and what it does
LinuxDoc is a Sphinx extension library that parses C/C++ source files and extracts documentation from inline comments, converting them into structured documentation that Sphinx can process. It originated in the Linux kernel documentation project but works as a general-purpose tool in any Sphinx-based documentation setup. The package provides both Sphinx extensions for integration into doc builds and command-line utilities for standalone extraction.
The package depends on docutils, fspath, setuptools, and sphinx as runtime requirements. It targets Python 3.10 and later, supporting both CPython and PyPy implementations. The tool is designed for developers who want to maintain API documentation directly in source code comments and have it automatically rendered into polished documentation alongside other Sphinx-generated content.
Use it for:
- Generate API documentation for C/C++ libraries by parsing comments embedded in source files
- Integrate source code documentation into a Sphinx-based project without maintaining separate doc files
- Build reference manuals from large C projects that use structured comment conventions
- Automate documentation extraction in CI/CD pipelines using the command-line tools
- Maintain single-source documentation where code comments serve as the authoritative reference
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sphinx-doc extensions and command-line tools that extract documentation from C/C++ source file comments for structured doc generation.
Yes, if you maintain C/C++ code and use Sphinx for documentation. The package is actively maintained, has no known vulnerabilities, and low install friction. The AGPL-3.0-or-later license requires careful review if you plan to redistribute or modify the package, but poses no barrier to using it as a documentation tool in your own projects.
Install
linuxdoc on PyPI
pip
pip install linuxdocuv
uv add linuxdocpoetry
poetry add linuxdocInstalling linuxdoc
Before you install
Low friction install via pip with four runtime dependencies (docutils, fspath, setuptools, sphinx). Active maintenance with recent release and ongoing repository commits.
License in practice
Distributed under AGPL-3.0-or-later; users must comply with copyleft obligations if they modify or redistribute the package or derivative works.
Quickstart
python -m pip install --user -U linuxdoc
import linuxdoc
# Use as Sphinx extension or via command-line tools
Requires Python 3.10 or later; designed for use with Sphinx-based documentation projects
Verify before relying
- Whether the C/C++ comment extraction supports specific documentation formats beyond kernel-doc style
- Performance characteristics when processing large codebases
- Exact Sphinx version compatibility requirements
Package facts
| License | AGPL-3.0-or-later (agpl) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — docutils, fspath, setuptools, sphinx |
| Maintenance | actively maintained — 102 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 155,015/month — #10,834 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: linuxdoc-20260504-py3-none-any.whl
Keywords: doc, kernel-doc, linux, source code comments, sphinx extension
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
sphinx-argparseSphinx extension that automatically generates…
permissive · top 5,000 on PyPI
sphinxcontrib-devhelpA Sphinx extension that generates Devhelp…
permissive · top 1,000 on PyPI
sphinxcontrib-qthelpA Sphinx extension that converts documentation…
permissive · top 1,000 on PyPI
sphinxcontrib-shellcheckA Sphinx extension that automatically lints…
permissive · top 15,000 on PyPI
pr-commenterA CLI tool that creates, updates, and manages…
permissive · top 15,000 on PyPI
readthedocs-sphinx-extProvides Sphinx extensions that integrate…
permissive · top 15,000 on PyPI
sphinx-commentsIntegrates third-party commenting and…
permissive · top 15,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
comment-parserExtracts comments from source code files across…
permissive · top 15,000 on PyPI
antsibull-docsBuilds and generates Ansible documentation from…
copyleft · top 15,000 on PyPI