Graphify-Labs/graphify
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.
Python★ 130,530+802 that day#3 on trending
C60.7/100
Duplication73
4% in python, typescript, php, pascal, sql, csharp, rust, swift, groovy, cpp, fortran, lisp, apex, powershell, go, objectivec, java, kotlin, c, zig, julia, robotframework, ruby, elixir, scala, docker, tsx, javascriptDead code75
3.1%Complexity41
64.3% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
3.48%duplicated code · 3,163 of 91,005 lines
264clones in code
105code files of 1,332 scanned
27.22%duplicated over all files · 1,884 clones
Most complex files
- graphify/extractors/engine.py2989 cx
- graphify/extractors/resolution.py1176 cx
- graphify/cli.py991 cx
- graphify/llm.py739 cx
- graphify/serve.py701 cx
- tests/test_extract.py573 cx
- tests/test_detect.py486 cx
- graphify/callflow_html.py474 cx
- tests/test_watch.py461 cx
- graphify/watch.py437 cx
Dead code 3.15% unused · 161 findings
- worked/mixed-corpus/raw/analyze.pyunused-file
- graphify/scip_ingest.pyunused-file
- graphify/multigraph_compat.pyunused-file
- worked/httpx/raw/client.pyunused-file
- worked/httpx/raw/transport.pyunused-file
- worked/httpx/raw/models.pyunused-file
- worked/httpx/raw/auth.pyunused-file
- worked/mixed-corpus/raw/cluster.pyunused-file
- graphify/__main__.py:_agents_platform_installunused-import
- graphify/__main__.py:_agents_platform_uninstallunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 12 lines in 9 placespython84 tokensgraphify/extractors/bash.py:114–125graphify/extractors/dm.py:25–36graphify/extractors/elixir.py:25–36graphify/extractors/julia.py:18–29graphify/extractors/ocaml.py:28–39and 4 more
114 language = Language(tsbash.language()) 115 parser = Parser(language) 116 source = _read_source_bytes(path) 117 tree = parser.parse(source) 118 root = tree.root_node 119except Exception as e: 120 return {"nodes": [], "edges": [], "error": str(e)} 121 122stem = _file_stem(path) 123str_path = str(path)First 10 of 12 lines.
- 40 lines in 2 placespython344 tokens
515betweenness = nx.betweenness_centrality(G, k=k, seed=42) 516# Top bridge nodes that are NOT file-level hubs 517bridges = sorted( 518 [(n, s) for n, s in betweenness.items() 519 if not _is_file_node(G, n) and not _is_concept_node(G, n) and s > 0], 520 key=lambda x: x[1], 521 reverse=True, 522)[:3] 523for node_id, score in bridges: 524 label = G.nodes[node_id].get("label", node_id)First 10 of 40 lines.
- 8 lines in 6 placespython68 tokensgraphify/extractors/dm.py:31–38graphify/extractors/elixir.py:31–38graphify/extractors/julia.py:24–31graphify/extractors/powershell.py:26–33graphify/extractors/rust.py:249–256and 1 more
31 return {"nodes": [], "edges": [], "error": str(e)} 32 33stem = _file_stem(path) 34str_path = str(path) 35nodes: list[dict] = [] 36edges: list[dict] = [] 37seen_ids: set[str] = set() 38function_bodies: list[tuple[str, Any, "str | None"]] = []31 return {"nodes": [], "edges": [], "error": str(e)} 32 33stem = _file_stem(path) 34str_path = str(path) 35nodes: list[dict] = [] 36edges: list[dict] = [] 37seen_ids: set[str] = set() 38function_bodies: list[tuple[str, Any]] = []
7 more
- 56 lines in 2 placespython330 tokens
- 43 lines in 2 placespython309 tokens
- 7 lines in 6 placespython59 tokens
- 39 lines in 2 placespython273 tokens
- 26 lines in 3 placespython135 tokens
- 25 lines in 2 placespython254 tokens
- 39 lines in 2 placespython251 tokens
Largest clones over all files, tests and data included
- 698 lines in 20 placesbashdocs and examples3,352 tokensgraphify/skill-agents.md:68–765graphify/skill-amp.md:68–765graphify/skill-claw.md:68–768graphify/skill-copilot.md:68–768graphify/skill-droid.md:68–765and 15 more
68# Detect the correct Python interpreter (handles uv tool, pipx, venv, system installs) 69PYTHON="" 70GRAPHIFY_BIN=$(which graphify 2>/dev/null) 71# 1. uv tool installs — most reliable on modern Mac/Linux 72if [ -z "$PYTHON" ] && command -v uv >/dev/null 2>&1; then 73 _UV_PY=$(uv tool run --from graphifyy python -c "import sys; print(sys.executable)" 2>/dev/null) 74 if [ -n "$_UV_PY" ]; then PYTHON="$_UV_PY"; fi 75fi 76# 2. Read shebang from graphify binary (pipx and direct pip installs) 77if [ -z "$PYTHON" ] && [ -n "$GRAPHIFY_BIN" ]; thenFirst 10 of 698 lines.
- 303 lines in 29 placesbashdocs and examples1,467 tokensgraphify/skills/agents/references/query.md:14–316graphify/skills/amp/references/query.md:14–316graphify/skills/claude/references/query.md:14–316graphify/skills/claw/references/query.md:14–316graphify/skills/codex/references/query.md:14–316and 24 more
14$(cat graphify-out/.graphify_python) -c " 15from pathlib import Path 16if not Path('graphify-out/graph.json').exists(): 17 print('ERROR: No graph found. Run /graphify <path> first to build the graph.') 18 raise SystemExit(1) 19" 20``` 21If it fails, stop and tell the user to run `/graphify <path>` first. 22 23### Step 0 — Constrained query expansion (REQUIRED before traversal)First 10 of 303 lines.
- 265 lines in 19 placesmarkdowndocs and examples2,079 tokensgraphify/skill-agents.md:6–270graphify/skill-claw.md:6–270graphify/skill-codex.md:6–270graphify/skill-copilot.md:6–270graphify/skill-kilo.md:6–270and 14 more
6# /graphify 7 8Turn any folder of files into a navigable knowledge graph with community detection, an honest audit trail, and three outputs: interactive HTML, GraphRAG-ready … 9 10## Usage 11 12``` 13/graphify # full pipeline on current directory (HTML viz; add --obsidian for a vault) 14/graphify <path> # full pipeline on specific path 15/graphify https://github.com/<owner>/<repo> # clone repo then run full pipeline on itFirst 10 of 265 lines.
- 80 lines in 21 placestextdocs and examples1,772 tokens
- 204 lines in 29 placesbashdocs and examples1,214 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 104 | 90,815 | 264 | 3,163 | 3.48% |
| typescript | 1 | 190 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 547 | 226,911 | 812 | 9,056 | 3.99% |
| markdown | 365 | 79,802 | 544 | 55,620 | 69.7% |
| bash | 245 | 27,663 | 406 | 27,139 | 98.11% |
| text | 103 | 4,102 | 116 | 3,898 | 95.03% |
| powershell | 6 | 987 | 4 | 508 | 51.47% |
| yaml | 10 | 679 | 1 | 10 | 1.47% |
| typescript | 5 | 665 | 1 | 6 | 0.9% |
| json | 7 | 10,634 | 0 | 0 | 0% |
| toml | 2 | 398 | 0 | 0 | 0% |
| php | 5 | 161 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 21, 2026 | #3 | 130,530 (+802) | 1,332 | 353,496 | 1,884 | 27.22% | 3.48% | C 60.7 | b90b9df |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.