{"id":27494725,"url":"https://github.com/abulgit/module-viz","last_synced_at":"2026-01-23T21:56:33.092Z","repository":{"id":285629758,"uuid":"954840260","full_name":"abulgit/module-viz","owner":"abulgit","description":"Module Viz: D Language Dependency Visualization Tool","archived":false,"fork":false,"pushed_at":"2025-04-01T20:03:04.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T21:22:34.448Z","etag":null,"topics":["dlang","dlanguage"],"latest_commit_sha":null,"homepage":"","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abulgit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2025-03-25T17:39:40.000Z","updated_at":"2025-04-01T20:03:08.000Z","dependencies_parsed_at":"2025-04-01T21:22:44.075Z","dependency_job_id":null,"html_url":"https://github.com/abulgit/module-viz","commit_stats":null,"previous_names":["abulgit/module-viz"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abulgit%2Fmodule-viz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abulgit%2Fmodule-viz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abulgit%2Fmodule-viz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abulgit%2Fmodule-viz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abulgit","download_url":"https://codeload.github.com/abulgit/module-viz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249300665,"owners_count":21247082,"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":["dlang","dlanguage"],"created_at":"2025-04-17T02:11:38.266Z","updated_at":"2026-01-23T21:56:33.038Z","avatar_url":"https://github.com/abulgit.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Module Viz - D Dependency Visualizer\n\nA simple tool that helps you understand and visualize how modules in your D projects depend on each other.\n\n![image](https://github.com/user-attachments/assets/2e6ab646-08eb-4ac3-877c-7cbfd56e8512)\n\n\n\nThis is an example of a dependency graph of that example project generated by Module Viz.\n\nI also tried this in the phobos codebase, the graph looks like this. Yes, this is huge😅 - \n\n\n![graph](https://github.com/user-attachments/assets/bcb61ef3-042b-412c-b5c3-07f63fb47af6)\n\n\n## What does it do?\n\nModule Viz scans your D project, figures out how your modules are connected through imports, and creates visual diagrams that help you understand your codebase structure.\n\nKey features:\n- ✅ Creates visual dependency graphs from your D code\n- ✅ Shows how modules connect to each other\n- ✅ Generates both graphical and text-based visualizations\n- ✅ Color-codes modules based on their role in your project\n- ✅ Works on Windows, Linux, and macOS\n\n## Getting Started\n\n### Option 1: Download the pre-built executable (recommended)\n\n1. **Download the tool**\n   - Go to the [Releases page](https://github.com/abulgit/module-viz/releases)\n   - Download the zip file for your platform (e.g., `module-viz-v1.0.0-win-x64.zip` for Windows)\n\n2. **Install it**\n   - Extract the zip file to a folder of your choice\n   - For convenience, you might want to place `viz.exe` in a dedicated folder like `C:\\Tools\\ModuleViz` or `~/tools/moduleviz`\n\n3. **Add to your PATH** (optional but recommended)\n\n   On Windows:\n   - Right-click on \"This PC\" or \"My Computer\" and select \"Properties\"\n   - Click on \"Advanced system settings\"\n   - Click on the \"Environment Variables\" button\n   - Under \"System variables\" (or \"User variables\" for just your account), find the \"Path\" variable and click \"Edit\"\n   - Click \"New\" and add the folder path where you placed viz.exe (e.g., `C:\\Tools\\ModuleViz`)\n   - Click \"OK\" on all dialog boxes\n   - Restart any open command prompts for the change to take effect\n\n   On Linux/macOS:\n   - Edit your `~/.bashrc`, `~/.zshrc`, or equivalent shell configuration file\n   - Add this line: `export PATH=\"$PATH:/path/to/folder/containing/viz\"`\n   - Save the file and run `source ~/.bashrc` (or appropriate file) or restart your terminal\n\n### Option 2: Build from source\n\nIf you prefer to build the tool yourself:\n\n1. **Prerequisites**\n   - D compiler (DMD, LDC, or GDC)\n   - DUB package manager\n\n2. **Build steps**\n   ```bash\n   # Clone the repository\n   git clone https://github.com/abulgit/module-viz.git\n   cd module-viz\n\n   # Build the project\n   dub build\n\n   # The executable will be in the bin directory\n   ```\n\n## How to Use\n\n### Basic Usage\n\n```bash\n# If added to PATH:\nviz --input=path/to/project\n\n# If not added to PATH (Windows):\nC:\\path\\to\\viz.exe --input=path/to/project\n\n# If not added to PATH (Linux/macOS):\n/path/to/viz --input=path/to/project\n```\n\n### Common Commands\n\nCreate a dependency graph of your project:\n```bash\nviz --input=path/to/project --output=graph.dot --image\n```\n\nSee a text-based graph:\n```bash\nviz --input=path/to/project --text\n```\n\nGet help:\n```bash\nviz --help\n```\n\n### All Available Options\n\n```\n--input=PATH, -i       Directory containing D source files to analyze (default: current directory)\n--output=FILE, -o      Output .dot file (default: dependency_graph.dot)\n--image, --img         Automatically generate image from the dot file\n--format=FORMAT, -f    Image format (png, svg, pdf, etc.) when using --image (default: png)\n--text, -t             Display text-based visualization of the dependency graph\n--help, -h             Show help information\n```\n\n## Understanding the Visualization\n\n### Color Meaning\n\nThe tool color-codes modules to help you understand their role:\n\n- **Light Green**: Base modules that are only imported by other modules but don't import anything\n- **Salmon**: Entry point modules that import other modules but aren't imported by anything\n- **Gold**: Hub modules that are heavily connected (both importing and being imported)\n- **Light Blue**: Regular modules with balanced dependencies\n\n### Image Generation Requirements\n\nTo generate images, you need [GraphViz](https://graphviz.org/download/) installed on your system.\n\nIf you don't have GraphViz or can't install it, you can:\n1. Use the `--text` option to see a text representation\n2. Upload the .dot file to an online GraphViz tool:\n   - [GraphvizOnline](https://dreampuf.github.io/GraphvizOnline/)\n   - [Edotor](https://edotor.net/)\n   - [Sketchviz](https://sketchviz.com/)\n\n## Examples\n\n### Analyzing a D Project\n\n```bash\n# Generate a PNG visualization of a project\nviz --input=path/to/dproject --image\n\n# Generate an SVG instead of PNG\nviz --input=path/to/dproject --image --format=svg\n\n# Show both text and graphical visualization\nviz --input=path/to/dproject --text --image\n```\n\n### Demo Project\n\nThe repository includes an example project in the `example/` directory:\n\n```bash\n# Analyze the example project\nviz --input=example --output=example.dot --image --text\n```\n\n## Troubleshooting\n\n### Common Issues\n\n- **\"Command not found\"**: Make sure viz is in your PATH or use the full path to the executable\n- **Image generation fails**: Install GraphViz from https://graphviz.org/download/\n- **No modules found**: Check that you're pointing to a directory with .d files\n\n### Need Help?\n\nIf you encounter any issues, please [open an issue](https://github.com/abulgit/module-viz/issues) on GitHub.\n\n## License\n\nProprietary\n\n## Dependencies\n\n- [libdparse](https://github.com/dlang-community/libdparse) - D language parsing library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabulgit%2Fmodule-viz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabulgit%2Fmodule-viz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabulgit%2Fmodule-viz/lists"}