colbymchenry/codegraph
Pre-indexed code knowledge graph, auto syncs on code changes, for Claude Code, Codex, Gemini, Cursor, OpenCode, AntiGravity, Kiro, CoPilot, and Hermes Agent — fewer tokens, fewer tool calls, 100% local
The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
Most complex files
- src/resolution/name-matcher.ts4309 cx
- __tests__/extraction.test.ts2740 cx
- src/extraction/tree-sitter.ts2107 cx
- src/mcp/tools.ts1816 cx
- src/resolution/callback-synthesizer.ts1402 cx
- __tests__/resolution.test.ts1084 cx
- src/graph/branch-guards.ts838 cx
- src/resolution/import-resolver.ts743 cx
- src/resolution/index.ts689 cx
- src/ui-server/api/steps.ts682 cx
Dead code 0.32% unused · 39 findings
- src/extraction/store-worker.tsunused-file
- src/extraction/parse-worker.tsunused-file
- src/resolution/resolver-worker.tsunused-file
- src/ui/shimmer-worker.tsunused-file
- src/mcp/query-worker.tsunused-file
- src/context/formatter.ts:formatNodeTreeunused-symbol
- src/mcp/proxy.ts:pipeUntilCloseunused-symbol
- src/mcp/index-freshness-worker.tsunused-file
- src/ui-server/highlight/tokenize-worker.tsunused-file
- src/mcp/proxy.ts:startPpidWatchdogunused-symbol
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 15 generated files: __tests__/fixtures/payroll-go/internal/gen/fkit/employee/contract.go, __tests__/fixtures/payroll-go/internal/gen/fkit/employee/employee.go, __tests__/fixtures/payroll-go/internal/gen/fkit/payroll/calculate.go, __tests__/fixtures/payroll-go/internal/gen/fkit/payroll/dto.go, __tests__/fixtures/payroll-go/internal/gen/fkit/payroll/payroll_cycle.go, __tests__/fixtures/payroll-go/internal/gen/fkit/payroll/payslip.go, __tests__/fixtures/payroll-go/internal/gen/fkit/payroll/store.go, __tests__/fixtures/payroll-go/internal/gen/fkit/timesheet/timesheet.go, __tests__/fixtures/payroll-go/internal/gen/payrollpb/payroll_grpc.pb.go, __tests__/fixtures/payroll-go/internal/gen/payrollpb/payroll.pb.go, __tests__/fixtures/tail-render-ts/types/worker-configuration.d.ts, __tests__/generated-flag-index.test.ts, codegraph-kernel/grammars/dart/parser.c, codegraph-kernel/grammars/lua/parser.c, codegraph-kernel/grammars/scala/parser.c.
Largest clones in the code
- 286 lines in 3 placesc-header1,252 tokenscodegraph-kernel/grammars/dart/tree_sitter/parser.h:1–286codegraph-kernel/grammars/lua/tree_sitter/parser.h:1–286codegraph-kernel/grammars/scala/tree_sitter/parser.h:1–286
1#ifndef TREE_SITTER_PARSER_H_ 2#define TREE_SITTER_PARSER_H_ 3 4#ifdef __cplusplus 5extern "C" { 6#endif 7 8#include <stdbool.h> 9#include <stdint.h> 10#include <stdlib.h>First 10 of 286 lines.
- 291 lines in 2 placesc-header1,775 tokenscodegraph-kernel/grammars/dart/tree_sitter/array.h:1–291codegraph-kernel/grammars/lua/tree_sitter/array.h:1–291
1#ifndef TREE_SITTER_ARRAY_H_ 2#define TREE_SITTER_ARRAY_H_ 3 4#ifdef __cplusplus 5extern "C" { 6#endif 7 8#include "./alloc.h" 9 10#include <assert.h>First 10 of 291 lines.
- 265 lines in 2 placesc-header1,684 tokenscodegraph-kernel/grammars/dart/tree_sitter/array.h:18–282codegraph-kernel/grammars/kotlin/tree_sitter/array.h:17–281
18#pragma warning(disable : 4101) 19#elif defined(__GNUC__) || defined(__clang__) 20#pragma GCC diagnostic push 21#pragma GCC diagnostic ignored "-Wunused-variable" 22#endif 23 24#define Array(T) \ 25 struct { \ 26 T *contents; \ 27 uint32_t size; \First 10 of 265 lines.
7 more
- 34 lines in 5 placesrust248 tokens
- 14 lines in 7 placesrust150 tokens
- 24 lines in 6 placesrust176 tokens
- 18 lines in 8 placesrust121 tokens
- 16 lines in 7 placesrust138 tokens
- 26 lines in 5 placesrust199 tokens
- 15 lines in 8 placesrust106 tokens
Largest clones over all files, tests and data included
- 13 lines in 61 placestypescripttests117 tokens__tests__/astro-component-markup-only.test.ts:35–47__tests__/cfml-tag-calls.test.ts:48–60__tests__/commonjs-require-calls.test.ts:69–81__tests__/commonjs-require-imports.test.ts:59–71__tests__/cpp-overload-choice.test.ts:68–80and 56 more
35`, 36 }; 37 for (const [rel, content] of Object.entries(files)) { 38 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); 39 fs.writeFileSync(path.join(root, rel), content); 40 } 41 cg = await CodeGraph.init(root, { index: true }); 42}); 43 44afterAll(() => {First 10 of 13 lines.
- 11 lines in 88 placestypescripttests76 tokens__tests__/astro-component-markup-only.test.ts:8–18__tests__/c-calls-never-methods.test.ts:6–16__tests__/cfml-call-scope.test.ts:13–23__tests__/cfml-tag-calls.test.ts:9–19__tests__/commonjs-require-calls.test.ts:12–22and 83 more
8import { describe, it, expect, afterAll, beforeAll } from 'vitest'; 9import * as fs from 'fs'; 10import * as os from 'os'; 11import * as path from 'path'; 12import { CodeGraph } from '../src'; 13 14let root = ''; 15let cg: CodeGraph; 16 17beforeAll(async () => {First 10 of 11 lines.
- 15 lines in 35 placestypescripttests119 tokens__tests__/astro-component-markup-only.test.ts:35–49__tests__/c-calls-never-methods.test.ts:28–42__tests__/cfml-call-scope.test.ts:58–72__tests__/cpp-macro-namespace.test.ts:62–76__tests__/csharp-bare-member-scope.test.ts:67–81and 30 more
35`, 36 }; 37 for (const [rel, content] of Object.entries(files)) { 38 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); 39 fs.writeFileSync(path.join(root, rel), content); 40 } 41 cg = await CodeGraph.init(root, { index: true }); 42}); 43 44afterAll(() => {First 10 of 15 lines.
- 6 lines in 40 placestypescripttests87 tokens__tests__/fixtures/oversize-member-ts/src/report/monthly.ts:17–22__tests__/fixtures/oversize-member-ts/src/report/monthly.ts:29–34__tests__/fixtures/oversize-member-ts/src/report/monthly.ts:41–46__tests__/fixtures/oversize-member-ts/src/report/monthly.ts:53–58__tests__/fixtures/oversize-member-ts/src/report/monthly.ts:65–70and 35 more
- 286 lines in 3 placesc-header1,252 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| rust | 26 | 26,122 | 680 | 10,404 | 39.83% |
| typescript | 348 | 150,089 | 487 | 6,686 | 4.45% |
| css | 58 | 4,586 | 49 | 759 | 16.55% |
| html | 57 | 4,030 | 34 | 360 | 8.93% |
| javascript | 46 | 8,157 | 23 | 214 | 2.62% |
| c-header | 12 | 2,541 | 20 | 1,687 | 66.39% |
| bash | 46 | 4,170 | 9 | 64 | 1.53% |
| svelte | 55 | 13,292 | 0 | 0 | 0% |
| c | 4 | 2,766 | 0 | 0 | 0% |
| astro | 4 | 635 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 874 | 280,562 | 1,604 | 18,958 | 6.76% |
| rust | 27 | 26,420 | 680 | 10,404 | 39.38% |
| c | 7 | 15,685 | 249 | 5,874 | 37.45% |
| css | 63 | 5,761 | 55 | 786 | 13.64% |
| html | 57 | 4,030 | 34 | 360 | 8.93% |
| javascript | 50 | 8,297 | 23 | 214 | 2.58% |
| c-header | 12 | 2,541 | 20 | 1,687 | 66.39% |
| markdown | 96 | 30,054 | 18 | 215 | 0.72% |
| bash | 71 | 4,794 | 16 | 125 | 2.61% |
| diff | 3 | 1,826 | 7 | 46 | 2.52% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 3, 2026 | #5 | 73,016 (+98) | 1,463 | 402,709 | 2,708 | 9.61% | 9.27% | D 52.7 | dbb3d63 |
| Oct 1, 2026 | #8 | 72,654 (+118) | 1,432 | 395,171 | 2,672 | 9.71% | 9.43% | D 52.4 | 34ede4d |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.