Skip to content

Repository files navigation

pio-env-graph

⚠️ Early development — this project is in beta. The core functionality works but the API and CLI flags may change between releases. Feedback and bug reports are welcome.

Visualize extends dependencies between sections in platformio.ini as a Graphviz DOT graph.

Install

From PyPI (once published):

pip install pio-env-graph

From GitHub:

pip install git+https://github.com/eagafonov/pio-env-graph.git

From source:

pip install -e .

Usage

pio-env-graph                                          # auto-discovers ./platformio.ini
pio-env-graph /path/to/platformio.ini                  # explicit path
pio-env-graph -o graph.dot                             # write to file
pio-env-graph | dot -Tpng -o graph.png                 # render to PNG
pio-env-graph -d LR                                    # left-to-right (default: RL)
pio-env-graph --refs                                   # include ${section.key} references
pio-env-graph | dot -Tpng | display -                  # render and display immediately

Directions: RL (right-to-left, default), LR, TB, BT.

Examples

Default (RL)

default

Top to bottom

pio-env-graph -d TB

top-to-bottom

With ${section.key} references

pio-env-graph --refs

refs

Real-world: Meshtastic firmware

The Meshtastic firmware project has 254 sections and 255 edges — view the full graph (large image, DOT source).

Development

The Makefile handles venv setup automatically on first run:

make test               # run tests
make lint               # check formatting + lint
make format             # auto-format code

Or set up manually:

python3 -m venv .venv
source .venv/bin/activate
pip install -e .
pip install -r requirements-dev.txt

About

Visualize dependencies between PlatformIO environments as a Graphviz DOT graph

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages