Skip to main content

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 .gitignore patterns
  • Customizable ignore patterns
  • Beautiful Catppuccin-themed visualizations

Installation

# Install from PyPI
pip install graphspire

# Or install from source
git clone https://github.com/kshitijaucharmal/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

  1. Clone the repository
  2. Create a virtual environment:
    python -m venv .venv
    source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows
    
  3. Install development dependencies:
    pip install -e ".[dev]"
    
  4. 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.1.tar.gz (422.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphspire-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file graphspire-0.1.1.tar.gz.

File metadata

  • Download URL: graphspire-0.1.1.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

Hashes for graphspire-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0283e16e430292c465d43244f6338b8e496f22b1c594c50a8226afd33e136239
MD5 94d1d60cc11f7d1aae69316364fa34d7
BLAKE2b-256 08c561ae4c4b2ce34f60a44b6269bb1eaaaf3b2b25f07d19013aca046c9c152f

See more details on using hashes here.

File details

Details for the file graphspire-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: graphspire-0.1.1-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

Hashes for graphspire-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 627ceef7556996ab34fc25080ce0474f1e9537bee1de131e25f5f94ee86d2ce2
MD5 f4b069e0696ed8fd4e807c91dcae71de
BLAKE2b-256 13d35a15b0e63ded229a3e5c50b970abf341edab52cdc649b5f98148725d10de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page