{"_id":"@abdulmunimjemal/codescope","_rev":"7-f8b5c1c28e7e775a715707931b996f6e","name":"@abdulmunimjemal/codescope","dist-tags":{"latest":"0.4.2"},"versions":{"0.1.0":{"name":"@abdulmunimjemal/codescope","version":"0.1.0","keywords":["mcp","model-context-protocol","codebase","knowledge-graph","code-graph","ai-agent","claude-code","cursor","codex","tree-sitter","code-search","local-first","token-efficiency"],"author":{"name":"Abdulmunim Jemal"},"license":"MIT","_id":"@abdulmunimjemal/codescope@0.1.0","maintainers":[{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"}],"homepage":"https://github.com/abdulmunimjemal/codescope#readme","bugs":{"url":"https://github.com/abdulmunimjemal/codescope/issues"},"bin":{"codescope":"dist/cli.js"},"dist":{"shasum":"6388f9c9f4927909a4dba23beb6bfb1fab651b22","tarball":"https://registry.npmjs.org/@abdulmunimjemal/codescope/-/codescope-0.1.0.tgz","fileCount":9,"integrity":"sha512-1PWON785scOG8OyfL8bXQLPavZdFGXbQe2iO/Q1kFU0f7mHGOJsl0pOnff0l1j8UuX43W1VDBaXeO9lqMWkAUw==","signatures":[{"sig":"MEUCIQC4gpnAz2GGuY8Xx1W5yg3OQcvCDZqc1M7uVMv//g1rEAIgDtJIrIhN5FnVRnWW6lBDtz3P1u4+UaOrHfvoseonPdA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":273629},"pnpm":{"onlyBuiltDependencies":["esbuild","better-sqlite3"]},"type":"module","engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3f144f99c48154b05df50fdb0e07a9c76d537363","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","selfcheck":"node dist/cli.js --help","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"},"repository":{"url":"git+https://github.com/abdulmunimjemal/codescope.git","type":"git"},"_npmVersion":"11.12.1","description":"Local-first codebase knowledge-graph MCP server. Parses your repo into a symbol graph and serves it to AI coding agents so they stop wasting tokens re-scanning files. Watch-first: the graph stays fresh as you type.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3.25.76","ignore":"^7.0.5","chokidar":"^5.0.0","picocolors":"^1.1.1","tinyglobby":"^0.2.17","better-sqlite3":"^12.10.0","web-tree-sitter":"^0.24.7","tree-sitter-wasms":"^0.1.13","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1","gpt-tokenizer":"^3.4.0","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/codescope_0.1.0_1780291631783_0.5029704424361574","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to 'codescope-mcp' — install: npm i codescope-mcp (same tool, unscoped)"},"0.2.0":{"name":"@abdulmunimjemal/codescope","version":"0.2.0","keywords":["mcp","model-context-protocol","codebase","knowledge-graph","code-graph","ai-agent","claude-code","cursor","codex","tree-sitter","code-search","local-first","token-efficiency"],"author":{"name":"Abdulmunim Jemal"},"license":"MIT","_id":"@abdulmunimjemal/codescope@0.2.0","maintainers":[{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"}],"homepage":"https://github.com/abdulmunimjemal/codescope#readme","bugs":{"url":"https://github.com/abdulmunimjemal/codescope/issues"},"bin":{"codescope":"dist/cli.js"},"dist":{"shasum":"cc7878568526fbd088e6ed3e178587a612a23e59","tarball":"https://registry.npmjs.org/@abdulmunimjemal/codescope/-/codescope-0.2.0.tgz","fileCount":9,"integrity":"sha512-MtOPj2nZhjjQgsnNljiJdh9I7EO79GhIOYUTv2L7G4XIazDL+CMjycKZpipOBmcB1RJBSW3E/zooRXfAUHPJSA==","signatures":[{"sig":"MEYCIQCu5OhY0t+Uh6xEqwd7LAcJ20wlT3hyUbNZ3lvRKOi20wIhAOyrfgyJRcDK+PIs44EposlbtGkUgppS3c2t6mXHG7yg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":316756},"pnpm":{"onlyBuiltDependencies":["esbuild","better-sqlite3"]},"type":"module","engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"6bf2683e389c0f84cd575108b8b51e8915781210","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","selfcheck":"node dist/cli.js --help","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"},"repository":{"url":"git+https://github.com/abdulmunimjemal/codescope.git","type":"git"},"_npmVersion":"11.12.1","description":"Local-first codebase knowledge-graph MCP server. Parses your repo into a symbol graph and serves it to AI coding agents so they stop wasting tokens re-scanning files. Watch-first: the graph stays fresh as you type.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3.25.76","ignore":"^7.0.5","chokidar":"^5.0.0","picocolors":"^1.1.1","tinyglobby":"^0.2.17","better-sqlite3":"^12.10.0","web-tree-sitter":"^0.24.7","tree-sitter-wasms":"^0.1.13","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1","gpt-tokenizer":"^3.4.0","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/codescope_0.2.0_1780304495651_0.277028534803061","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to 'codescope-mcp' — install: npm i codescope-mcp (same tool, unscoped)"},"0.3.0":{"name":"@abdulmunimjemal/codescope","version":"0.3.0","keywords":["mcp","model-context-protocol","codebase","knowledge-graph","code-graph","ai-agent","claude-code","cursor","codex","tree-sitter","code-search","local-first","token-efficiency"],"author":{"name":"Abdulmunim Jemal"},"license":"MIT","_id":"@abdulmunimjemal/codescope@0.3.0","maintainers":[{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"}],"homepage":"https://github.com/abdulmunimjemal/codescope#readme","bugs":{"url":"https://github.com/abdulmunimjemal/codescope/issues"},"bin":{"codescope":"dist/cli.js"},"dist":{"shasum":"1e6631f73a528cff022100db4410e0977dc43db6","tarball":"https://registry.npmjs.org/@abdulmunimjemal/codescope/-/codescope-0.3.0.tgz","fileCount":9,"integrity":"sha512-sorMbIhZVlJOTohyWfgH/e0sJkfaMZt6YyVNZTQ2IX7P4bSODALCAgqeByCksqKRhR/EZUbUbxbNhyjhdWwATQ==","signatures":[{"sig":"MEUCIQCQnALDc8H5/WKIy8+C4YRdpdXRSlsu7qbHpgpH6LfIOgIgfGQ5V1z0P3fIZ/ofmrtrgf9+jY3vWZvk5IvUiLl0oK8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":383606},"pnpm":{"onlyBuiltDependencies":["esbuild","better-sqlite3"]},"type":"module","engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"84a1a1782b2320073cd6f88b7272cbc0f7de0a09","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","selfcheck":"node dist/cli.js --help","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"},"repository":{"url":"git+https://github.com/abdulmunimjemal/codescope.git","type":"git"},"_npmVersion":"11.12.1","description":"Local-first codebase knowledge-graph MCP server. Parses your repo into a symbol graph and serves it to AI coding agents so they stop wasting tokens re-scanning files. Watch-first: the graph stays fresh as you type.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3.25.76","ignore":"^7.0.5","chokidar":"^5.0.0","picocolors":"^1.1.1","tinyglobby":"^0.2.17","better-sqlite3":"^12.10.0","web-tree-sitter":"^0.24.7","tree-sitter-wasms":"^0.1.13","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1","gpt-tokenizer":"^3.4.0","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/codescope_0.3.0_1780307737175_0.5823399699506966","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to 'codescope-mcp' — install: npm i codescope-mcp (same tool, unscoped)"},"0.4.0":{"name":"@abdulmunimjemal/codescope","version":"0.4.0","keywords":["mcp","model-context-protocol","codebase","knowledge-graph","code-graph","ai-agent","claude-code","cursor","codex","tree-sitter","code-search","local-first","token-efficiency"],"author":{"name":"Abdulmunim Jemal"},"license":"MIT","_id":"@abdulmunimjemal/codescope@0.4.0","maintainers":[{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"}],"homepage":"https://github.com/abdulmunimjemal/codescope#readme","bugs":{"url":"https://github.com/abdulmunimjemal/codescope/issues"},"bin":{"codescope":"dist/cli.js"},"dist":{"shasum":"f35eba697a91856b26416d65e51280c312a60194","tarball":"https://registry.npmjs.org/@abdulmunimjemal/codescope/-/codescope-0.4.0.tgz","fileCount":12,"integrity":"sha512-lGglUbXXhmF5BKCzcCN5ssjniCNreWOSGOaQ8nqLa7OPBOrHm1pwti0WS96qXldQ4EpmgZ/3B+8kukaaMJfA8A==","signatures":[{"sig":"MEUCIAJ3/EwEEJX63c+UPPPmHeK3bwzNSVnqaZ22SLrugIQyAiEAwGmWZCt6/xfKyu194L9HkReLS3mn0xMuPR9bIfGpLdM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":475637},"pnpm":{"onlyBuiltDependencies":["esbuild","better-sqlite3"]},"type":"module","engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1c735621e133754e2625ea9c6a3fb7d18e8d10df","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","selfcheck":"node dist/cli.js --help","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"},"repository":{"url":"git+https://github.com/abdulmunimjemal/codescope.git","type":"git"},"_npmVersion":"11.12.1","description":"Local-first codebase knowledge-graph MCP server. Parses your repo into a symbol graph and serves it to AI coding agents so they stop wasting tokens re-scanning files. Watch-first: the graph stays fresh as you type.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3.25.76","ignore":"^7.0.5","chokidar":"^5.0.0","picocolors":"^1.1.1","tinyglobby":"^0.2.17","better-sqlite3":"^12.10.0","web-tree-sitter":"^0.24.7","tree-sitter-wasms":"^0.1.13","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1","gpt-tokenizer":"^3.4.0","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/codescope_0.4.0_1780314623622_0.5582579969648058","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to 'codescope-mcp' — install: npm i codescope-mcp (same tool, unscoped)"},"0.4.1":{"name":"@abdulmunimjemal/codescope","version":"0.4.1","keywords":["mcp","model-context-protocol","codebase","knowledge-graph","code-graph","ai-agent","claude-code","cursor","codex","tree-sitter","code-search","local-first","token-efficiency"],"author":{"name":"Abdulmunim Jemal"},"license":"MIT","_id":"@abdulmunimjemal/codescope@0.4.1","maintainers":[{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"}],"homepage":"https://github.com/abdulmunimjemal/codescope#readme","bugs":{"url":"https://github.com/abdulmunimjemal/codescope/issues"},"bin":{"codescope":"dist/cli.js"},"dist":{"shasum":"e0c1d7e94b2797281d2d814dd939c55e91306f82","tarball":"https://registry.npmjs.org/@abdulmunimjemal/codescope/-/codescope-0.4.1.tgz","fileCount":12,"integrity":"sha512-ctTA7XGXg75VSANL+uhHEp8ozB9BQFRvJRNsBr24fjfL97Mh60Re+FBhJIeRrivC2lspkp43yN3WviI4726qiw==","signatures":[{"sig":"MEYCIQDm54B3wUNSz5z1HOnL7Lv6DwJ4W0Bv9eNIATrTDJm1FwIhALe9iwN32pfkzeDcSEWIpAY36v+n4y3VJshoZNzRTPqF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":475920},"pnpm":{"onlyBuiltDependencies":["esbuild","better-sqlite3"]},"type":"module","engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"639e689101a9a8ad98daf7972532843130009f43","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","selfcheck":"node dist/cli.js --help","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"},"repository":{"url":"git+https://github.com/abdulmunimjemal/codescope.git","type":"git"},"_npmVersion":"11.12.1","description":"Local-first codebase knowledge-graph MCP server. Parses your repo into a symbol graph and serves it to AI coding agents so they stop wasting tokens re-scanning files. Watch-first: the graph stays fresh as you type.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3.25.76","ignore":"^7.0.5","chokidar":"^5.0.0","picocolors":"^1.1.1","tinyglobby":"^0.2.17","better-sqlite3":"^12.10.0","web-tree-sitter":"^0.24.7","tree-sitter-wasms":"^0.1.13","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1","gpt-tokenizer":"^3.4.0","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/codescope_0.4.1_1780320887490_0.17400005688757703","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to 'codescope-mcp' — install: npm i codescope-mcp (same tool, unscoped)"},"0.4.2":{"name":"@abdulmunimjemal/codescope","version":"0.4.2","keywords":["mcp","model-context-protocol","codebase","knowledge-graph","code-graph","ai-agent","claude-code","cursor","codex","tree-sitter","code-search","local-first","token-efficiency"],"author":{"name":"Abdulmunim Jemal"},"license":"MIT","_id":"@abdulmunimjemal/codescope@0.4.2","maintainers":[{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"}],"homepage":"https://github.com/abdulmunimjemal/codescope#readme","bugs":{"url":"https://github.com/abdulmunimjemal/codescope/issues"},"bin":{"codescope":"dist/cli.js"},"dist":{"shasum":"65a3b2c8ec103400d239eaf15ffafb3626a155c6","tarball":"https://registry.npmjs.org/@abdulmunimjemal/codescope/-/codescope-0.4.2.tgz","fileCount":12,"integrity":"sha512-p7BCYAsQEvSZaJYSb28mX2fQk4oslaZIuosdN5fS99vYF00oOYbMsqqaTgJNxAj0FKOjAPwI180S1EBXlvekEg==","signatures":[{"sig":"MEUCIGCiT3EYylVWPhfNkq9rXXtLqXa1JEC3qJGmdprUa+YjAiEA2GoTtjlv+/rionwuKXcVRbXcvgJVq5KDmRZArkY4BB0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":478133},"pnpm":{"onlyBuiltDependencies":["esbuild","better-sqlite3"]},"type":"module","engines":{"node":">=18.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"4660f6789d0e590dbe48b72415e14b272df95fc2","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","selfcheck":"node dist/cli.js --help","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"pnpm run build"},"_npmUser":{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"},"repository":{"url":"git+https://github.com/abdulmunimjemal/codescope.git","type":"git"},"_npmVersion":"11.12.1","description":"Local-first codebase knowledge-graph MCP server. Parses your repo into a symbol graph and serves it to AI coding agents so they stop wasting tokens re-scanning files. Watch-first: the graph stays fresh as you type.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3.25.76","ignore":"^7.0.5","chokidar":"^5.0.0","picocolors":"^1.1.1","tinyglobby":"^0.2.17","better-sqlite3":"^12.10.0","web-tree-sitter":"^0.24.7","tree-sitter-wasms":"^0.1.13","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1","gpt-tokenizer":"^3.4.0","@types/better-sqlite3":"^7.6.13"},"_npmOperationalInternal":{"tmp":"tmp/codescope_0.4.2_1780328423873_0.4816291058715192","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to 'codescope-mcp' — install: npm i codescope-mcp (same tool, unscoped)"}},"time":{"created":"2026-06-01T05:27:11.613Z","modified":"2026-06-02T08:18:53.261Z","0.1.0":"2026-06-01T05:27:11.927Z","0.2.0":"2026-06-01T09:01:35.825Z","0.3.0":"2026-06-01T09:55:37.323Z","0.4.0":"2026-06-01T11:50:23.778Z","0.4.1":"2026-06-01T13:34:47.688Z","0.4.2":"2026-06-01T15:40:24.037Z"},"bugs":{"url":"https://github.com/abdulmunimjemal/codescope/issues"},"author":{"name":"Abdulmunim Jemal"},"license":"MIT","homepage":"https://github.com/abdulmunimjemal/codescope#readme","keywords":["mcp","model-context-protocol","codebase","knowledge-graph","code-graph","ai-agent","claude-code","cursor","codex","tree-sitter","code-search","local-first","token-efficiency"],"repository":{"url":"git+https://github.com/abdulmunimjemal/codescope.git","type":"git"},"description":"Local-first codebase knowledge-graph MCP server. Parses your repo into a symbol graph and serves it to AI coding agents so they stop wasting tokens re-scanning files. Watch-first: the graph stays fresh as you type.","maintainers":[{"name":"abdulmunimjemal","email":"abdulmunimjemal@gmail.com"}],"readme":"# codescope\n\n[![npm](https://img.shields.io/npm/v/%40abdulmunimjemal%2Fcodescope?color=8b5cf6)](https://www.npmjs.com/package/@abdulmunimjemal/codescope)\n[![CI](https://github.com/abdulmunimjemal/codescope/actions/workflows/ci.yml/badge.svg)](https://github.com/abdulmunimjemal/codescope/actions/workflows/ci.yml)\n[![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![node](https://img.shields.io/node/v/%40abdulmunimjemal%2Fcodescope)](https://nodejs.org)\n[![docs](https://img.shields.io/badge/docs-oss.munim.io-8b5cf6)](https://oss.munim.io/codescope/)\n\n> Local-first codebase knowledge-graph MCP server. Parses your repo into a symbol\n> graph and serves it to AI coding agents so they stop wasting tokens re-scanning\n> files. **Watch-first:** the graph stays fresh as you type.\n\nCoding agents (Claude Code, Cursor, Codex, …) burn tokens and tool calls\nre-discovering your codebase — `grep` for a name, `read` the whole file, `grep`\nagain for the callers, `read` those files too. codescope indexes the repo once\ninto a local SQLite graph and answers \"where is `X`, what calls it, what's in\nthis file\" in a handful of tokens and a single tool call — then keeps the graph\ncurrent by re-indexing each file the instant you save it.\n\n100% local. No API keys, no network, no telemetry.\n\n## Why not just grep?\n\n`grep` finds *text*; codescope understands *structure*. It knows that `run` is a\nmethod on `Service`, that `loadConfig` is called from three places, and that a\nbare `parse()` call is a different thing from `obj.parse()`. It returns\n`file:line` + signatures, not raw matches — and it returns a bounded **call\nneighbourhood** (callers + callees, a few hops out) so an agent gets the relevant\nslice of the codebase for a change without opening a dozen files.\n\nSee [BENCHMARKS.md](./BENCHMARKS.md): on a 2,500-file repo, codescope answers a\nnavigation query in **~70–98% fewer tokens** than reading the file, and refreshes\na changed file in **~0.5 ms** — roughly **3,000× cheaper than a full re-index**.\n\n## How it compares to codegraph\n\n[codegraph](https://github.com/colbymchenry/codegraph) (~35k★) is the mature\nincumbent and shares codescope's architecture. In a **measured head-to-head**\n([BENCHMARKS.md](./BENCHMARKS.md), both tools run on the same repos), codescope\n**wins the efficiency axes**:\n\n- **More accurate answers.** Scored against the **TypeScript compiler** as ground truth (`bench/accuracy.mjs`), codescope's `callers` beat codegraph's F1 on every package tested (0.95 vs 0.66, 0.92 vs 0.70, 0.96 vs 0.91) — it never misses a true caller (recall 1.00) where codegraph misses 10–35%.\n- **3.5–7.6× faster indexing** (670 ms vs 2,335 ms on 262 files; 2.6 s vs 20 s on 3,500) — parsing is fanned across a worker-thread pool.\n- **3–5× smaller index** on disk (2.5 MB vs 8.2 MB; 22.8 MB vs 112.8 MB).\n- **Fewer tokens per answer** — on *both* definition and callers queries, every repo tested.\n- **Feature parity:** `callers`, `callees`, `impact`, `context`, **`affected`** (test-impact), and **`install`** (agent auto-wiring) — across **21 languages**.\n\ncodegraph still leads on **maturity & adoption** (35k★, a real user base) and a\nfew extra node kinds (constants, properties, routes). Pick codescope when\naccuracy, footprint, index speed, and token cost matter; pick codegraph for the\nmost battle-tested option. Full numbers in [BENCHMARKS.md](./BENCHMARKS.md).\n\n## Install\n\n```bash\nnpx @abdulmunimjemal/codescope mcp .          # zero-install, or:\nnpm i -g @abdulmunimjemal/codescope           # then the `codescope` command is on your PATH\n```\n\nRequires Node ≥ 18. (The npm package is scoped because the bare name `codescope`\ncollides with an existing package; the installed command is still `codescope`.)\n\n## Quick start\n\nThe one-liner — wire codescope into your agents automatically, from your repo:\n\n```bash\nnpx @abdulmunimjemal/codescope install     # adds codescope to Claude Code + Cursor\n```\n\nThat writes the MCP server config (non-destructively) so your agent launches\ncodescope on the repo. Restart the agent and you're done. `--agent claude|cursor`\ntargets one; `--global` writes to your home dir instead of the project.\n\nPrefer to wire it by hand? The server command is:\n\n```bash\ncodescope mcp /path/to/your/repo            # index, watch, and serve over stdio\n```\n\n**Claude Code** (`.mcp.json` or `claude mcp add`):\n\n```json\n{\n  \"mcpServers\": {\n    \"codescope\": { \"command\": \"npx\", \"args\": [\"-y\", \"@abdulmunimjemal/codescope\", \"mcp\", \".\"] }\n  }\n}\n```\n\n**Cursor / Codex / any MCP client:** use the same command —\n`npx -y @abdulmunimjemal/codescope mcp .` over stdio.\n\nYou can also drive it straight from the terminal:\n\n```bash\ncodescope index .                       # build the graph, print stats\ncodescope search useState               # fuzzy symbol search\ncodescope get GraphStore                # jump to a definition\ncodescope callers parseSource           # who calls this\ncodescope callees indexAll              # what it calls\ncodescope impact GraphStore             # blast radius before a change\ncodescope context \"auth flow\"           # ranked relevance map for a task\ncodescope affected src/store.ts         # which tests are affected by a change\ncodescope neighborhood handleRequest --depth 3\ncodescope watch .                       # keep the graph fresh, log updates\n```\n\n## MCP tools\n\n| tool | what it answers |\n|------|-----------------|\n| `search_symbols(query, kind?, limit?)` | fuzzy substring search over definitions — use instead of grep/glob |\n| `get_symbol(name, limit?)` | jump to a definition by exact name (kind, `file:line`, signature) |\n| `find_callers(name, limit?)` | who calls this function/method (distinct callers) |\n| `find_callees(name, limit?)` | what this symbol calls — its outgoing dependencies |\n| `impact(name, depth?, limit?)` | transitive callers (blast radius) before you change something |\n| `context(query, maxSymbols?)` | a ranked relevance map for a task — matches + neighbours, the fastest way to orient |\n| `find_references(name, kind?, limit?)` | all calls + imports of a name |\n| `file_outline(path)` | every symbol in a file, in order — a compact alternative to reading it |\n| `neighborhood(name, depth?, limit?)` | the call neighbourhood (callers + callees) around a symbol, as a subgraph |\n| `stats()` | counts for the indexed graph |\n\nTool descriptions are written *for the agent* — they nudge it to query the graph\ninstead of scanning files.\n\n## How it works\n\n1. **Parse.** Every supported file is parsed with [tree-sitter](https://tree-sitter.github.io)\n   (WASM grammars, no native build) into definitions (functions, methods,\n   classes, interfaces, types, enums) and references (calls, imports).\n2. **Store.** Symbols and references go into a local SQLite database with a\n   trigram FTS5 index for fast substring search. References are stored **by name**\n   and resolved to definitions lazily at query time — so changing one file never\n   invalidates another's data.\n3. **Resolve.** Calls are resolved **kind-aware**: a bare `foo()` resolves to a\n   *function* named `foo`, while `x.foo()` resolves to a *method* named `foo`.\n   This avoids the classic name-collision explosion (e.g. a project that happens\n   to define a function called `push`). Ambiguous, library-ish names are left\n   unresolved rather than blowing up the graph.\n4. **Watch.** A file watcher re-indexes each file on save in sub-millisecond\n   time. Because updates are per-file and content-hash gated, the graph is always\n   current and a re-scan skips everything that hasn't changed.\n\nThe index lives in `.codescope/graph.db` (add `.codescope/` to your\n`.gitignore`). codescope respects your repo's `.gitignore` when indexing.\n\n## Languages\n\n21 languages: TypeScript, JavaScript, TSX/JSX, Python, Go, Rust, Java, Ruby, C,\nC++, C#, PHP, Scala, Solidity, Zig, Kotlin, Objective-C, Lua, Bash, OCaml, and\nReScript. Definition extraction (functions, classes, methods, …) works for all;\ncall and import edges are available for the languages whose grammars expose them.\n\n## Programmatic API\n\nEverything is importable:\n\n```ts\nimport { GraphStore, Indexer, watch, parseSource } from \"codescope\";\n\nconst store = new GraphStore(\"graph.db\");      // or \":memory:\"\nconst indexer = new Indexer(store, \"/repo\");\nawait indexer.indexAll();\n\nstore.searchSymbols(\"config\");\nstore.neighborhood(\"handleRequest\", { depth: 2 });\n\nwatch(indexer, { onChange: (file, action) => console.log(action, file) });\n```\n\n## Limitations\n\n- References resolve by **name + call shape**, not full type/scope analysis. It is\n  a fast heuristic graph, not a compiler. Cross-file import resolution is not yet\n  modelled.\n- Rust `impl` methods are currently labelled `function` (impl blocks aren't tracked\n  as containers).\n- Symbol extraction targets top-level and class-member definitions; deeply nested\n  local helpers are captured, anonymous expressions are not.\n\n## Roadmap\n\n- **Cross-file resolution** — resolve an imported callee to its specific\n  definition file (and, eventually, type-aware method resolution) to push\n  precision toward 1.0.\n- **More languages** — the language system is config-driven; new grammars are a\n  table entry plus a test. [Open a request or send a PR.](./CONTRIBUTING.md#adding-a-language-a-great-first-contribution)\n- **Richer nodes** — optionally index constants, properties, and routes.\n\n## Contributing\n\nContributions are very welcome — codescope is small, fully tested, and designed\nto be easy to extend. Adding a language is often a single config object plus a\ntest. See **[CONTRIBUTING.md](./CONTRIBUTING.md)** for setup, the project layout,\nand a step-by-step \"add a language\" guide, and please follow the\n[Code of Conduct](./CODE_OF_CONDUCT.md).\n\n```bash\npnpm install && pnpm test && pnpm typecheck && pnpm build\n```\n\nChangelog: [CHANGELOG.md](./CHANGELOG.md) · Security: [SECURITY.md](./SECURITY.md)\n\n## License\n\nMIT © Abdulmunim Jemal\n\n","readmeFilename":"README.md"}