skillfed

linuxdoc

Sphinx-doc extensions & tools to extract documentation from C/C++ source file comments.

linuxdoc v20260504 155.0K downloads/30d#10,834 on PyPI28
AGPL license AGPL-3.0-or-later Active released

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 linuxdoc

uv

uv add linuxdoc

poetry

poetry add linuxdoc

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Other AudienceLicense :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: DocumentationTopic :: Software Development :: LibrariesTopic :: Text ProcessingTopic :: Utilities

Tags

sphinx extension c++ documentationextract docs from source commentskernel-doc sphinx integrationc code comment documentationsource code comment parsersphinx documentation extractionlinux kernel doc tools
sphinx-extensionc-documentationkernel-doc

More Libraries packages