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.2.tar.gz (1.5 MB 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.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphspire-0.1.2.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for graphspire-0.1.2.tar.gz
Algorithm Hash digest
SHA256 93ff015bc89be6735dc30668592c87402f4147eb197628ee5645c7a9889d8104
MD5 480484f11e5f33ce40a9ba6db26fc80d
BLAKE2b-256 67ae1e01d3aafb9f12e1c075d745b0a0cba737bcdd0f8a63c9479b4a77fbbdfd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graphspire-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46fb972c8938dc177a0697faadf1c95b8bc6b2587b341c758883d5a2fe1a839f
MD5 c866ba766455164945715b50a36086d2
BLAKE2b-256 02d2d32a63da23004f8177f6839a40fc5cd38aa676b80b309d925f82e2ba3bef

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