{"_id":"@desago/desago-graphs","_rev":"4-c0b57401caa509c3d7a5f77ef7aa1ec1","name":"@desago/desago-graphs","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"@desago/desago-graphs","version":"1.0.0","author":{"name":"Devakrishnan Gopal"},"license":"MIT","_id":"@desago/desago-graphs@1.0.0","maintainers":[{"name":"desago","email":"desago.connect@gmail.com"}],"bin":{"desago":"bin/desago.js"},"dist":{"shasum":"85877879b5cbe0664235eb3fd88791a1682c750d","tarball":"https://registry.npmjs.org/@desago/desago-graphs/-/desago-graphs-1.0.0.tgz","fileCount":29,"integrity":"sha512-BCmq8lgXwlYEz3h9YDj2KB0+JBqKQHadld0oclYKIfxTL9Sd90/yUt7BUjIKWMqA4XJpmgKBjVEaydlAi7ToJA==","signatures":[{"sig":"MEUCICxwrSufQqlgAa718Tm1wnw7fD2qc3p/62YiIL7BItlHAiEA2EdQ9TE4xXma6R2TfeoT2/io8m3BWgDSEQky8C7plr8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":100396},"main":"index.js","type":"commonjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node index.js","analyze":"node index.js"},"_npmUser":{"name":"desago","email":"desago.connect@gmail.com"},"_npmVersion":"11.13.0","description":"Tree-sitter codebase graph analyzer with a Claude Code MCP integration","directories":{},"_nodeVersion":"24.16.0","dependencies":{"ora":"^9.4.1","zod":"^4.4.3","chalk":"^6.0.0","fs-extra":"^11.4.0","fast-glob":"^3.3.3","tree-sitter":"^0.21.1","cli-progress":"^3.12.0","tree-sitter-javascript":"^0.21.4","tree-sitter-typescript":"^0.21.2","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/desago-graphs_1.0.0_1785265366078_0.04352380177682136","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@desago/desago-graphs","version":"1.1.0","author":{"name":"Devakrishnan Gopal"},"license":"MIT","_id":"@desago/desago-graphs@1.1.0","maintainers":[{"name":"desago","email":"desago.connect@gmail.com"}],"bin":{"desago":"bin/desago.js"},"dist":{"shasum":"cfa58a4d7ca695e0d75c9b2ae01954901d042ae4","tarball":"https://registry.npmjs.org/@desago/desago-graphs/-/desago-graphs-1.1.0.tgz","fileCount":37,"integrity":"sha512-QpO+Gk4QazyUBSD4beynYcc7TQiPMsUR1mwtKkb7D6AsXXqTbL7xGhyrMA/qEgS4sCmMN1vz1Ug2pSGq7ydwOg==","signatures":[{"sig":"MEUCIQD9vG2pQh5wAYFT6QS6Q9xzc5oa5E4tNFFEzWQjo4D8ugIgK99r6c8S57cZNlRLOOZ3S0lJ0Cu3tlud+szi4p0XU1w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":150897},"main":"index.js","type":"commonjs","gitHead":"fdb616cab096897b379d7bbcf60cd3a678af0791","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node index.js","analyze":"node index.js"},"_npmUser":{"name":"desago","email":"desago.connect@gmail.com"},"_npmVersion":"11.13.0","description":"Codebase graph analyzer with a Claude Code MCP integration","directories":{},"_nodeVersion":"24.16.0","dependencies":{"ora":"^9.4.1","zod":"^4.4.3","chalk":"^6.0.0","fs-extra":"^11.4.0","fast-glob":"^3.3.3","tree-sitter":"^0.21.1","cli-progress":"^3.12.0","tree-sitter-php":"^0.23.12","tree-sitter-java":"^0.23.5","tree-sitter-python":"^0.21.0","tree-sitter-javascript":"^0.21.4","tree-sitter-typescript":"^0.21.2","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/desago-graphs_1.1.0_1785562834285_0.9961054618028478","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@desago/desago-graphs","version":"1.1.1","author":{"name":"Devakrishnan Gopal"},"license":"MIT","_id":"@desago/desago-graphs@1.1.1","maintainers":[{"name":"desago","email":"desago.connect@gmail.com"}],"bin":{"desago":"bin/desago.js"},"dist":{"shasum":"d25f992857e2554c5e5940fdb167bad5ee5d83e7","tarball":"https://registry.npmjs.org/@desago/desago-graphs/-/desago-graphs-1.1.1.tgz","fileCount":40,"integrity":"sha512-EWdDyOXoTWmn6REVnDtAk+hgkgWkGhqAw8pttXYBLgUvJRHLtIjOCSyFXRmWe9ONLiBUWmc7SxOTZQIUrTYPfA==","signatures":[{"sig":"MEUCIDUZrXGcoJUaH/R+gXhlp/yXdRII8M8fuz8KblZzjI3aAiEAkpsuIGHQvcFG+q39JVoBAcRfjOAOQ669lnabeBF+cqI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":182631},"main":"index.js","type":"commonjs","gitHead":"a29603dba17188128fadd7d678ba3ecf784c8fe1","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node index.js","analyze":"node index.js"},"_npmUser":{"name":"desago","email":"desago.connect@gmail.com"},"_npmVersion":"11.13.0","description":"Codebase graph analyzer with a Claude Code MCP integration","directories":{},"_nodeVersion":"24.16.0","dependencies":{"ora":"^9.4.1","zod":"^4.4.3","chalk":"^6.0.0","fs-extra":"^11.4.0","fast-glob":"^3.3.3","tree-sitter":"^0.21.1","cli-progress":"^3.12.0","tree-sitter-php":"^0.23.12","tree-sitter-java":"^0.23.5","tree-sitter-python":"^0.21.0","tree-sitter-javascript":"^0.21.4","tree-sitter-typescript":"^0.21.2","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/desago-graphs_1.1.1_1785564627100_0.5309835161331262","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@desago/desago-graphs","version":"1.2.1","description":"Codebase graph analyzer with a Claude Code MCP integration","license":"MIT","author":{"name":"Devakrishnan Gopal"},"type":"commonjs","main":"index.js","bin":{"desago":"bin/desago.js"},"scripts":{"start":"node index.js","analyze":"node index.js","test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","chalk":"^6.0.0","cli-progress":"^3.12.0","fast-glob":"^3.3.3","fs-extra":"^11.4.0","ora":"^9.4.1","tree-sitter":"^0.21.1","tree-sitter-java":"^0.23.5","tree-sitter-javascript":"^0.21.4","tree-sitter-php":"^0.23.12","tree-sitter-python":"^0.21.0","tree-sitter-typescript":"^0.21.2","zod":"^4.4.3"},"gitHead":"1d2eec9e86152ca32990e19810658aae87ffa063","_id":"@desago/desago-graphs@1.2.1","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-O/g0zfgP7U+Kae4uJ09By2nkgWe21ehNdPDQatWDVP+0brfgW7xO3Wo6vVnXFbmk5Hj+Mb5wAUD9PWRXfi/a6Q==","shasum":"f9c68457a51d2600ff047ddbb4b87ceed9b8c7fa","tarball":"https://registry.npmjs.org/@desago/desago-graphs/-/desago-graphs-1.2.1.tgz","fileCount":41,"unpackedSize":252799,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCFjex7TGTWCvPGz69jlDPjmElQNE8VRyu/ycMpKxIZPAIhAIKJz5Ab0U5uNj/b/XMkvjTAxxZWXBlNZTyy2wfcfyEl"}]},"_npmUser":{"name":"desago","email":"desago.connect@gmail.com"},"directories":{},"maintainers":[{"name":"desago","email":"desago.connect@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/desago-graphs_1.2.1_1785650247726_0.7203321832214151"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-28T19:02:45.942Z","modified":"2026-08-02T05:57:28.025Z","1.0.0":"2026-07-28T19:02:46.265Z","1.1.0":"2026-08-01T05:40:34.402Z","1.1.1":"2026-08-01T06:10:27.264Z","1.2.1":"2026-08-02T05:57:27.866Z"},"author":{"name":"Devakrishnan Gopal"},"license":"MIT","description":"Codebase graph analyzer with a Claude Code MCP integration","maintainers":[{"name":"desago","email":"desago.connect@gmail.com"}],"readme":"# desago\n\nCodebase graph analyzer with a Claude Code MCP integration.\n\n`desago` scans a project's source code, builds a graph of files, functions,\nclasses, and their relationships (imports, calls, extends, implements), and\nexposes that graph to Claude Code via MCP so it can navigate a codebase\nwithout grepping or reading whole files. It also ships two browser-based\ngraph viewers so you (not just Claude) can explore the same graph.\n\n**Supported languages:** JavaScript/TypeScript, Java (with Spring Boot\nannotation awareness — `@RestController`/`@Service`/`@Autowired`/HTTP mapping\nannotations), PHP, Python.\n\n## Install\n\n```bash\nnpm install -g desago\n```\n\n## Getting started (step by step)\n\n1. **Go to your project and analyze it once.** This scans the codebase and writes `.desago-graph/graph.json` + `.desago-graph/graph.html`.\n   ```bash\n   cd your-project\n   desago analyze\n   ```\n2. **Look at the graph.** Pick whichever fits your codebase's size:\n   - Small/medium project → just open the file that was written: `.desago-graph/graph.html`\n   - Large project (thousands of files) → run the live viewer instead, which loads progressively so it stays fast:\n     ```bash\n     desago run\n     ```\n     then open the URL it prints (defaults to `http://localhost:7826`)\n3. **Connect it to Claude Code**, in two terminals:\n   ```bash\n   # Terminal 1 — leave this running\n   desago serve\n\n   # Terminal 2 — registers the graph with Claude Code and launches it\n   desago claude\n   ```\n   From then on, Claude Code can query the graph (`search_nodes`, `get_node`, etc.) instead of grepping or reading whole files, and a `Stop` hook keeps the graph refreshed after every response automatically.\n4. **Keep working as normal.** Re-run `desago analyze` (or just keep `desago serve` running) whenever you want the graph re-synced with the latest code — step 3's hook already does this for you after every Claude Code response.\n\nThat's the whole workflow: `analyze` (or `run`) to see it, `serve` + `claude` to give Claude Code access to it.\n\n## Command reference\n\n```bash\ndesago analyze [rootDir] [options]   # Scan a project, write graph.json + graph.html\ndesago run [rootDir] [options]       # Serve a live, progressively-loading graph viewer in the browser\ndesago serve [rootDir] [options]     # Serve the graph over MCP (HTTP). Run this first, in its own terminal.\ndesago claude                        # Connect Claude Code to an already-running \"desago serve\", then launch it\ndesago --version, -v                 # Print the installed desago version\n```\n\nRun `desago analyze --help` for analyze-specific options.\n\n### MCP tools\n\nOnce connected, Claude Code has access to:\n\n- `graph_stats` — summary counts of the analyzed graph\n- `search_nodes` — find functions/classes/variables by name\n- `get_node` — full detail for a node, including its edges\n- `get_neighbors` — one-hop traversal (calls, imports, extends, implements, contains)\n- `get_file_symbols` — symbols defined in a given file\n- `refresh_graph` — re-analyze after edits so the graph reflects the latest code\n\n## Viewing the graph: `graph.html` vs. `desago run`\n\nBoth viewers share the same interface and controls (see below) — the only difference is where the data comes from:\n\n- **`graph.html`** (written by `desago analyze`) has the entire graph embedded in one self-contained file. No server, no dependencies — just open it in a browser, even offline. Nothing beyond the current layer is ever laid out or rendered, so it stays fast regardless of project size. To pick up code changes, just re-run `desago analyze`.\n- **`desago run`** starts a live local server and fetches each layer from it on demand. To pick up code changes without restarting the server or reloading the browser tab, press `r` *in the terminal* running `desago run` — see [Terminal shortcuts](#terminal-shortcuts) below. (The browser's own `r` shortcut just re-arranges the current layout — it doesn't touch the underlying data.)\n\nBoth read the same `.desago-graph/config.json` for node colors.\n\n### Navigating the graph\n\nThe graph is a drill-down tree, not one giant hairball: it opens showing only your project's top-level folders, and clicking into something replaces the view with what's directly inside it — nothing beyond that is ever loaded.\n\n- **Click a node once** to see its details (type, file, lines, incoming/outgoing edges) in the right-hand panel.\n- **Double-click** a folder, file, class, interface, enum, or trait to open it.\n- **Home / Back / Forward** (top-left) retrace your drill-down history like a browser.\n- **Search** (top bar) looks across the *entire* project, not just the current layer — results are ranked modules first, then files, then everything else. Click a result to jump straight to it, drilling through whatever layers stand in between.\n- **View Code** — select a node (or, while browsing inside a file/class, use the top-bar button) to open its source in a popup, with one-click copy for both the file path and the code.\n- **Files / Details panels** — drag their edge to resize, or click the top-bar buttons to hide/show them.\n- **Minimap** (bottom-right of the canvas) shows where you are in the current layer; click it to jump around.\n- **+ / − buttons** (top-right of the canvas) or the scroll wheel to zoom; drag the background to pan.\n- **⟳ button** (top-left of the canvas) re-arranges the current layer's layout if it looks cramped.\n- **? button** (top-right of the header) opens an in-app About/Shortcuts guide.\n\n### Keyboard shortcuts (in the browser)\n\n| Key | Action |\n| --- | --- |\n| `←` / `→` | Back / Forward |\n| `h` | Home |\n| `d` | Toggle details panel |\n| `t` | Toggle files panel |\n| `r` | Refresh (re-arrange) layout |\n| `+` / `-` | Zoom in / out |\n| `Ctrl`/`Cmd` + `Space` | Focus search |\n| `?` | Show the help popup |\n| `Esc` | Close whatever popup is open |\n\n### Terminal shortcuts\n\nWhile `desago run` or `desago serve` is running, the terminal itself accepts single-key shortcuts (only in an interactive terminal, not when piped/backgrounded):\n\n| Key | `desago run` | `desago serve` |\n| --- | --- | --- |\n| `q` | Quit | Quit |\n| `c` | Clear the terminal | Clear the terminal |\n| `r` | Re-analyze and reload (same port, no restart needed) | Force an immediate re-analysis |\n| `o` | Open the viewer in your browser | — |\n| `h` | Show shortcuts | — |\n| `u` | Print the URL | — |\n\n### Styling\n\n`.desago-graph/config.json` is created with default node colors on first\n`analyze` (or `run`) and never overwritten afterward — edit it to taste.\nBoth viewers read from it.\n\n### Claude Code guidance\n\n`desago claude` writes the MCP usage guidance to `.desago-graph/CLAUDE.md`\n(gitignored, fully regenerated each run) and ensures your project's own root\n`CLAUDE.md` has a one-line `@.desago-graph/CLAUDE.md` import so Claude Code\nstill picks it up automatically — your root CLAUDE.md is never otherwise\nmodified.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}