Exhale
Automatic C++ library API documentation generator using Doxygen, Sphinx, and Breathe with class hierarchies.
cpp
About this Extension
Builds on top of Breathe to automatically generate comprehensive C++ API documentation with hierarchical organization. Creates the full structure that Doxygen and Breathe provide individually, but as integrated Sphinx pages.
What Exhale adds to Breathe
While Breathe lets you manually include specific classes and functions, Exhale automatically generates:
- Complete API hierarchy pages
- Class inheritance trees
- File and directory structure documentation
- Full namespace organization
- Cross-linked navigation between all components
Generated structure
api/
├── classes.rst # All classes listed
├── namespaces.rst # Namespace hierarchy
├── files.rst # Source file documentation
├── class_MyClass.rst # Individual class pages
├── namespace_ns.rst # Individual namespace pages
└── file_header.h.rst # Individual file pages
Configuration
# conf.py
extensions = ['breathe', 'exhale']
# Breathe configuration
breathe_projects = {"myproject": "doxygen_xml/"}
breathe_default_project = "myproject"
# Exhale configuration
exhale_args = {
"containmentFolder": "./api",
"rootFileName": "library_root.rst",
"doxygenStripFromPath": "../src",
"rootFileTitle": "Library API",
"createTreeView": True,
}
Workflow
- Doxygen generates XML from your C++ source
- Exhale reads the XML and generates all the RST files
- Breathe handles the actual Doxygen directive processing
- Sphinx builds everything into your documentation
When to use Exhale vs just Breathe
Use Exhale when:
- You want comprehensive API coverage with minimal manual work
- You have a large C++ codebase
- You want automatically generated navigation and hierarchy
Use Breathe alone when:
- You prefer manual control over what’s documented
- You have a smaller API surface
- You want to integrate only specific classes/functions
Exhale is particularly valuable for libraries with extensive APIs where manually creating all the RST files would be time-consuming.