{"id":15296127,"url":"https://github.com/shreyasbharath/cpp-dependency-graph","last_synced_at":"2026-04-27T01:31:33.908Z","repository":{"id":62556333,"uuid":"125456763","full_name":"shreyasbharath/cpp-dependency-graph","owner":"shreyasbharath","description":"A Ruby gem that generates useful visualisations (dot, d3.js) to study the architecture of C/C++ projects","archived":false,"fork":false,"pushed_at":"2023-06-12T11:34:14.000Z","size":666,"stargazers_count":45,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-13T03:33:41.901Z","etag":null,"topics":["architecture","c","cplusplus","d3-visualization","d3js","dependency-graph","dependency-tree","dotfiles","rubygem","visualization"],"latest_commit_sha":null,"homepage":"https://shreyasbharath.github.io/cpp_dependency_graph/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shreyasbharath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-03-16T03:10:47.000Z","updated_at":"2025-05-14T18:16:13.000Z","dependencies_parsed_at":"2023-07-15T18:33:32.084Z","dependency_job_id":null,"html_url":"https://github.com/shreyasbharath/cpp-dependency-graph","commit_stats":null,"previous_names":["shreyasbharath/cpp-dependency-graph","shreyasbharath/cpp_dependency_graph"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/shreyasbharath/cpp-dependency-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasbharath%2Fcpp-dependency-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasbharath%2Fcpp-dependency-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasbharath%2Fcpp-dependency-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasbharath%2Fcpp-dependency-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shreyasbharath","download_url":"https://codeload.github.com/shreyasbharath/cpp-dependency-graph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreyasbharath%2Fcpp-dependency-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32319559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","c","cplusplus","d3-visualization","d3js","dependency-graph","dependency-tree","dotfiles","rubygem","visualization"],"created_at":"2024-09-30T18:09:29.552Z","updated_at":"2026-04-27T01:31:33.873Z","avatar_url":"https://github.com/shreyasbharath.png","language":"Ruby","readme":"# Cpp Dependency Graph\n\n[![Join the chat at https://gitter.im/cpp_dependency_graph/Lobby](https://badges.gitter.im/cpp_dependency_graph/Lobby.svg)](https://gitter.im/cpp_dependency_graph/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://travis-ci.org/shreyasbharath/cpp_dependency_graph.svg?branch=master)](https://travis-ci.org/shreyasbharath/cpp_dependency_graph)\n[![Maintainability](https://api.codeclimate.com/v1/badges/2a07b587ca6fc8b1b3db/maintainability)](https://codeclimate.com/github/shreyasbharath/cpp_dependency_graph/maintainability)\n[![Codacy](https://api.codacy.com/project/badge/Grade/9439dbb7fde44b5380401acba5325e62)](https://www.codacy.com/app/shreyasbharath/cpp_dependency_graph?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=shreyasbharath/cpp_dependency_graph\u0026amp;utm_campaign=Badge_Grade)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/2a07b587ca6fc8b1b3db/test_coverage)](https://codeclimate.com/github/shreyasbharath/cpp_dependency_graph/test_coverage)\n[![Gem Version](https://badge.fury.io/rb/cpp_dependency_graph.svg)](https://badge.fury.io/rb/cpp_dependency_graph)\n\nGenerates useful component dependency visualisations (`dot` or `d3.js`) to study the architecture of C/C++ projects.\n\nWhy do all the other languages have awesome tools to analyse codebases but C/C++ does not?\n\nIt's time to change that.\n\nThis tool aims to -\n\n- provide multiple views into the architecture of a codebase\n- generate views at multiple levels of the architecture\n- make the resulting views genuinely useful, rich, dynamic and interactive (static views are boring)\n\n## Inspiration\n\nThis tool is inspired by a number of projects [rubrowser](http://www.emadelsaid.com/rubrowser/), [cpp-dependencies](https://github.com/tomtom-international/cpp-dependencies) and [objc-dependency-visualizer](https://github.com/PaulTaykalo/objc-dependency-visualizer).\n\nThe pretty `d3` visualisations are directly copied from `objc-dependency-visualiser`.\n\nA huge shout out to the people behind these projects.\n\n## Comparison With Other Tools\n\n### cpp-dependencies\n\n### cinclude2dot\n\n### dep-matrix\n\n## Usage\n\n### Installation\n\n`gem install cpp_dependency_graph`\n\n### Help\n\n`cpp_dependency_graph -h`\n\n### Overall component dependency graph\n\nTo generate the overall component dependency graph for a project, use it like so -\n\n`cpp_dependency_graph visualise_project -r spec\\test\\example_project\\ -o deps.svg -f svg`\n\nBelow is the overall `dot` and `d3` component dependency visualisations for [leveldb](https://github.com/google/leveldb)\n\n![Dot](docs/examples/leveldb_overall.svg)\n\n![d3.js visualisation of leveldb](docs/examples/leveldb_overall_d3.svg)\n\n![d3.js visualisation of rocksdb](docs/examples/rocksdb_overall_d3.svg)\n\n**NOTE** - If your project has a large number of components (\u003e 100 and lots of connections between them), then generation (and subsequent rendering) may take some time.\n\n### Individual component dependency graph\n\nThis will highlight the dependencies coming in and going out of a specific component. This allows you to filter out extraneous detail and study individual components in more detail.\n\n`cpp_dependency_graph visualise_component -r spec\\test\\example_project\\ --component Engine -o deps.dot -f dot`\n\nHere's a component dependency visualisation generated for the `queue` component in [rethinkdb](https://github.com/rethinkdb/rethinkdb)\n\n![Queue component dot visualisation](docs/examples/rethinkdb_queue_component.svg)\n\n![Queue component d3 visualisation](docs/examples/rethinkdb_queue_component_d3.svg)\n\n### Component include dependency graph\n\nThis will highlight dependencies of includes within a specific component\n\n`cpp_dependency_graph visualise_component_includes -r spec\\test\\example_project\\ --component Engine`\n\nHere's a component include dependency visualisation generated for the `queue` component in [rethinkdb](https://github.com/rethinkdb/rethinkdb)\n\n![Queue include graph dot](docs/examples/rethinkdb_queue_include.svg)\n\n![Queue include graph d3](docs/examples/rethinkdb_queue_include_d3.svg)\n\n### Header file include dependency graph\n\nThis will highlight include dependencies of header files globally within the project\n\n`cpp_dependency_graph visualise_header_includes -r spec\\test\\example_project\\ --header Engine.h`\n\nHere's a component include dependency visualisation generated for the `errors.hpp` header file in [rethinkdb](https://github.com/rethinkdb/rethinkdb)\n\n![Errors.hpp include graph dot](docs/examples/rethinkdb_errors_header_include.svg)\n\n### Cyclic dependencies only graph\n\nThis will highlight cyclic dependencies between components within a project. This is especially useful for targeted refactoring activities to reduce coupling between components.\n\n`cpp_dependency_graph visualise_cyclic_deps -r spec\\test\\example_project\\`\n\nHere's the cyclic dependencies only visualisation generated for [rethinkdb](https://github.com/rethinkdb/rethinkdb) and [leveldb](https://github.com/google/leveldb)\n\n![rethinkdb](docs/examples/rethinkdb_cyclic_deps.svg)\n\n![leveldb](docs/examples/leveldb_cyclic_deps.svg)\n\n## Development\n\n`bundle exec cpp_dependency_graph \u003ccmd\u003e -r \u003cdir\u003e ...`\n\n### Running all unit tests\n\n`rake spec`\n\n### Running a single test\n\n`rake spec SPEC=\u003cpath_to_spec_file\u003e`\n\n## License\n\ncpp_dependency_graph is available under the MIT license.\n\n## Warranty\n\nThis software is provided \"as is\" and without any express or implied\nwarranties, including, without limitation, the implied warranties of\nmerchantability and fitness for a particular purpose.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyasbharath%2Fcpp-dependency-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshreyasbharath%2Fcpp-dependency-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreyasbharath%2Fcpp-dependency-graph/lists"}