{"id":51118933,"url":"https://github.com/sulthonzh/depgraph-viz","last_synced_at":"2026-06-25T00:30:33.646Z","repository":{"id":366272224,"uuid":"1267448173","full_name":"sulthonzh/depgraph-viz","owner":"sulthonzh","description":"Visualize npm dependency trees as ASCII or SVG from lockfiles. Zero deps.","archived":false,"fork":false,"pushed_at":"2026-06-21T03:02:19.000Z","size":19,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T05:04:53.566Z","etag":null,"topics":["ascii","dependency","graph","npm","svg","tree","visualize"],"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/sulthonzh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-12T14:49:21.000Z","updated_at":"2026-06-21T03:02:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sulthonzh/depgraph-viz","commit_stats":null,"previous_names":["sulthonzh/depgraph-viz"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sulthonzh/depgraph-viz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdepgraph-viz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdepgraph-viz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdepgraph-viz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdepgraph-viz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sulthonzh","download_url":"https://codeload.github.com/sulthonzh/depgraph-viz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fdepgraph-viz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34755061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ascii","dependency","graph","npm","svg","tree","visualize"],"created_at":"2026-06-25T00:30:33.455Z","updated_at":"2026-06-25T00:30:33.622Z","avatar_url":"https://github.com/sulthonzh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# depgraph-viz\n\nVisualize your npm dependency tree — as ASCII in your terminal or as an SVG file. Zero dependencies.\n\n## Why?\n\n`npm ls` is fine, but it's noisy and there's no easy way to get a visual overview. This tool gives you a clean ASCII tree for quick scans and SVG output for documentation or slides.\n\n## Install\n\n```bash\nnpm install -g depgraph-viz\n```\n\nOr use without installing:\n\n```bash\nnpx depgraph-viz .\n```\n\n## Usage\n\n### ASCII tree (default)\n\n```bash\ndepgraph-viz                    # current directory\ndepgraph-viz ~/projects/my-app  # specific project\ndepgraph-viz . --no-dev         # hide devDependencies\n```\n\nOutput:\n```\nmy-app@2.1.0\n├── express@4.18.2\n│   ├── accepts@~1.3.8\n│   ├── body-parser@1.20.1\n│   └── cookie@0.5.0\n├── lodash@4.17.21\n└── jest@29.7.0 (dev)\n```\n\n### SVG output\n\n```bash\ndepgraph-viz --svg                # writes depgraph.svg\ndepgraph-viz --svg graph.svg      # custom filename\n```\n\n### Statistics\n\n```bash\ndepgraph-viz --stats\n```\n\nShows dep counts, totals, and detects duplicate packages across the tree.\n\n### Options\n\n| Flag | Description |\n|------|-------------|\n| `--svg [file]` | Generate SVG (default: `depgraph.svg`) |\n| `--stats` | Print dependency statistics |\n| `--no-dev` | Exclude devDependencies |\n| `--depth \u003cn\u003e` | Max tree depth (default: 4) |\n\n## Features\n\n- **Lockfile-aware** — reads `package-lock.json` for resolved versions and nested dependencies\n- **No lockfile? No problem** — falls back to `package.json` ranges\n- **Duplicate detection** — `--stats` flags packages appearing with multiple versions\n- **Zero dependencies** — this tool doesn't add to your dep tree\n\n## API\n\n```js\nconst { parsePackage, toAscii, toSvg, getStats } = require('depgraph-viz');\n\nconst { tree } = parsePackage('/path/to/project');\n\n// ASCII string\nconsole.log(toAscii(tree, { showDev: true, maxDepth: 4 }));\n\n// SVG string\nconst svg = toSvg(tree, { showDev: true, width: 900 });\n\n// Stats object\nconst stats = getStats(tree);\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulthonzh%2Fdepgraph-viz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsulthonzh%2Fdepgraph-viz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulthonzh%2Fdepgraph-viz/lists"}