Installation¶
c4-diagrams is available on PyPI so installation is straightforward:
pip install c4-diagrams
uv add c4-diagrams
Optional Dependencies¶
Some features of c4-diagrams require additional optional dependencies.
Converters
If you plan to use diagram conversion functionality (e.g. generating diagrams from JSON),
install the converters extra:
pip install c4-diagrams[converters]
uv add c4-diagrams[converters]
System Dependencies¶
While c4-diagrams itself is installed via PyPI, exporting diagrams may require additional
third-party tools depending on the selected renderer.
Some renderers rely on external system binaries that must be installed separately.
PlantUML¶
To export diagrams using the PlantUML renderer, you need one of the following:
- A local
plantumlbinary available in yourPATH - A local
plantuml.jar(requires Java) - Access to a remote PlantUML server
Install locally
brew install plantuml
sudo apt install plantuml
Verify installation
plantuml -version
Mermaid¶
To export diagrams using the Mermaid renderer, you need a local mmdc
binary available in your PATH.
Install locally
npm install -g @mermaid-js/mermaid-cli
Verify installation
mmdc --version