A tool to analyze and visualize C++ project dependencies
Project description
GraphSpire
A tool to analyze and visualize C++ project dependencies. It generates beautiful dependency graphs from your C++ project's include statements.
Features
- Analyzes C++ project structure and include dependencies
- Generates multiple visualization formats:
- JSON structure for programmatic use
- Mermaid graph for documentation
- Graphviz DOT for high-quality visualizations
- Respects
.gitignorepatterns - Customizable ignore patterns
- Beautiful Catppuccin-themed visualizations
Installation
# Install from PyPI
pip install graphspire
# Or install from source
git clone https://github.com/yourusername/graphspire.git
cd graphspire
pip install -e .
Usage
Basic usage:
graphspire --dir /path/to/cpp/project
Advanced usage:
graphspire \
--dir /path/to/cpp/project \
--ignore "build/" "external/" \
--output-json deps.json \
--output-mermaid deps.mmd \
--output-dot deps.dot \
--verbose
Command Line Options
--dir: Target directory to analyze (default: current directory)--output-json: Output JSON file (default: project_structure.json)--output-mermaid: Output Mermaid file (default: dependencies.mmd)--output-dot: Output DOT file (default: dependencies.dot)--ignore-gitignore: Ignore .gitignore file--ignore: Explicit folders or files to ignore (supports patterns)--verbose: Enable verbose output
Rendering the DOT File
To render the DOT file into a PNG:
dot -Tpng -Gdpi=300 -Gsize=10,10 dependencies.dot -o graph.png
Development
- Clone the repository
- Create a virtual environment:
python -m venv .venv source .venv/bin/activate # or `.venv\Scripts\activate` on Windows
- Install development dependencies:
pip install -e ".[dev]"
- Run tests:
pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
graphspire-0.1.0.tar.gz
(422.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphspire-0.1.0.tar.gz.
File metadata
- Download URL: graphspire-0.1.0.tar.gz
- Upload date:
- Size: 422.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c5bfd0001b99fbb8e9a2fd1bd8fcc953ccfd13bdcfac5db2b378fba0916a9b4
|
|
| MD5 |
587c220d7e758de58ec257187d60650f
|
|
| BLAKE2b-256 |
97ab29a36a12604292f06739c2016279609280c161e0a7b9d63c2d4675293d62
|
File details
Details for the file graphspire-0.1.0-py3-none-any.whl.
File metadata
- Download URL: graphspire-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ccf10069309304bf5128c836c1ee29c6e36826c0fdffd9d5cfb14c6e5cd8c61
|
|
| MD5 |
b757a76af3c18fc1e055809987f76fa3
|
|
| BLAKE2b-256 |
b9320c3f80f282d8c908c8b4a63da872742a01d0a6f5b4216702d2a3c29fccbd
|