{"id":13505649,"url":"https://github.com/pistazie/cdk-dia","last_synced_at":"2026-01-27T21:28:05.835Z","repository":{"id":37678764,"uuid":"336620403","full_name":"pistazie/cdk-dia","owner":"pistazie","description":"Automated diagrams of CDK provisioned infrastructure","archived":false,"fork":false,"pushed_at":"2025-03-05T07:15:04.000Z","size":13876,"stargazers_count":921,"open_issues_count":25,"forks_count":42,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-26T22:43:28.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/pistazie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"pistazie"}},"created_at":"2021-02-06T19:36:16.000Z","updated_at":"2025-03-20T15:25:01.000Z","dependencies_parsed_at":"2024-01-06T10:13:52.927Z","dependency_job_id":"db1a0921-e3b3-4d7c-a8f6-628169779ae2","html_url":"https://github.com/pistazie/cdk-dia","commit_stats":{"total_commits":70,"total_committers":11,"mean_commits":6.363636363636363,"dds":0.3857142857142857,"last_synced_commit":"b3e9db77beacdd310640a2852aea2a1a3e30cf25"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pistazie%2Fcdk-dia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pistazie%2Fcdk-dia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pistazie%2Fcdk-dia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pistazie%2Fcdk-dia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pistazie","download_url":"https://codeload.github.com/pistazie/cdk-dia/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246262490,"owners_count":20749170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T00:01:11.091Z","updated_at":"2026-01-24T13:47:31.880Z","avatar_url":"https://github.com/pistazie.png","language":"JavaScript","funding_links":["https://ko-fi.com/pistazie"],"categories":["JavaScript","Diagrams as code","Tools"],"sub_categories":["Build systems","Multi-accounts setup"],"readme":"[![Mentioned in Awesome CDK](https://awesome.re/mentioned-badge.svg)](https://github.com/kolomied/awesome-cdk)\n![Test](https://github.com/pistazie/cdk-dia/workflows/Test/badge.svg)\n[![npm version](https://badge.fury.io/js/cdk-dia.svg)](https://badge.fury.io/js/cdk-dia)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)\n\n# 🎡 CDK-Dia - Automated diagrams for CDK infrastructure\n\n_Cdk-dia diagrams your CDK provisioned infrastructure using the Graphviz dot language._\n\n## Example\n\nThis Diagram was automatically generated from an AWS CDK stack\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/diagram.png\" /\u003e\n\u003c/p\u003e\n\n## Getting started - Typescript / Javascript\nAdd cdk-dia to your CDK project\n```sh\nnpm install cdk-dia\n```\n\nInstall Graphviz\n```sh\nbrew install graphviz\n```\n* If you don't use brew: Graphviz installation in many environments is [well documented](https://graphviz.org/download/).\n* make sure Graphviz's dot binary is available in your PATH.\n  \nSynthesize your CDK application\n```sh\ncdk synth\n```\n\nGenerate a CDK-DIA diagram PNG\n```sh\nnpx cdk-dia\n```\n\nGenerate a CDK-DIA diagram as an interactive HTML (experimental)\n```sh\nnpx cdk-dia --rendering cytoscape-html\n```\n\u003cbr/\u003e\n\n## Getting started - any other CDK language\nGlobally install cdk-dia\n```sh\nnpm install cdk-dia -g\n```\n\nInstall Graphviz\n```sh\nbrew install graphviz\n```\n* If you don't use brew: Graphviz installation in many environments is [well documented](https://graphviz.org/download/).\n* make sure Graphviz's dot binary is available in your PATH.\n\nSynthesize your CDK application\n```sh\ncdk synth\n```\n\nGenerate a CDK-DIA diagram\n```sh\ncdk-dia\n```\n\u003cbr/\u003e\n\n## Customize diagrams\n\nIn some cases it is useful to be able to tweak a diagram. For this purpose CDK-DIA includes customizers/decorators\nyou can use with your CDK constructs in order to tweak the diagram.\n\n### Limitations:\n\n* Customization and decorators are currently only support for Typescript/Javascript CDK projects.\n* In order to customize you have to add cdk-dia as a npm project dependency (globally installing it using `npm i -g` won't allow you to use the `CdkDiaDecorator` class)\n\n### Example:\nConsider the following diagram of a 3-Tier CDK Stack:\n\u003cimg src=\"docs/decorator_example_collapsed.png\" /\u003e\n\nIn this diagram CDK-DIA collapsed the DBTier (done automatically to any CDK Level 2 (L2) construct) in order to\ncreate a diagram which contains the most important details.\n\nOne can use a decorator in order to customize the diagram and prevent CDK-DIA from collapsing the Construct.\n\nThis is done by implementing CDK's IInpectable's interface and using CDK-DIA's decorator. example:\n\n\u003cimg src=\"docs/decoration_example_diff.png\" /\u003e\n\nThis results in a Diagram where the DB-Tier was not collapsed providing more details:\n\u003cimg src=\"docs/decorator_example_non-collapsed.png\" /\u003e\n\n* a full example or the above can be found at [examples/decoration-example](examples/decoration-example)\n\n## CLI arguments\n* ```npx cdk-dia --help``` - Get possible arguments\n* ```npx cdk-dia --include stackOne stackFour``` - only diagram chosen aws-cdk stacks\n* ```npx cdk-dia --include pipelinestack/prod/database``` - choose stacks by path (nested stacks, pipeline stacks)\n* ```npx cdk-dia --exclude stackOne``` - exclude chosen aws-cdk stacks from the diagram\n\n## 🙏🏽 Contributing\nContribution is covered in the [CONTRIBUTING.md](./CONTRIBUTING.md) markdown.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpistazie%2Fcdk-dia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpistazie%2Fcdk-dia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpistazie%2Fcdk-dia/lists"}