/graphify
Turn any folder of files into a navigable knowledge graph with community detection, an honest audit trail, and three outputs: interactive HTML, GraphRAG-ready JSON, and a plain-language GRAPH_REPORT.md.
Usage
/graphify # full pipeline on current directory → Obsidian vault
/graphify <path> # full pipeline on specific path
/graphify <path> --mode deep # thorough extraction, richer INFERRED edges
/graphify <path> --update # incremental - re-extract only new/changed files
/graphify <path> --directed # build directed graph (preserves edge direction: source→target)
/graphify <path> --cluster-only # rerun clustering on existing graph
/graphify <path> --no-viz # skip visualization, just report + JSON
/graphify <path> --html # (HTML is generated by default - this flag is a no-op)
/graphify <path> --svg # also export graph.svg (embeds in Notion, GitHub)
/graphify <path> --graphml # export graph.graphml (Gephi, yEd)
/graphify <path> --neo4j # generate graphify-out/cypher.txt for Neo4j
/graphify <path> --neo4j-push bolt://localhost:7687 # push directly to Neo4j
/graphify <path> --wiki # build agent-crawlable wiki (index.md + one article per community)
/graphify <path> --obsidian --obsidian-dir ~/vaults/my-project # write vault to custom path (e.g. existing vault)
/graphify <path> --mcp # start MCP stdio server for agent access
/graphify <path> --watch # watch folder, auto-rebuild on code changes (no LLM needed)
/graphify add <url> # fetch URL, save to ./raw, update graph
/graphify add <url> --author "Name" # tag who wrote it
/graphify add <url> --contributor "Name" # tag who added it to the corpus
/graphify query "<question>" # BFS traversal - broad context
/graphify query "<question>" --dfs # DFS - trace a specific path
/graphify query "<question>" --budget 1500 # cap answer at N tokens
/graphify path "AuthModule" "Database" # shortest path between two concepts
/graphify explain "SwinTransformer" # plain-language explanation of a node
What graphify is for
graphify is built around Andrej Karpathy's /raw folder workflow: drop anything into a folder - papers, tweets, screenshots, code, notes - and get a structured knowledge graph that shows you what you didn't know was connected.
Three things it does that your AI assistant alone cannot:
- Persistent graph - relationships are stored in
graphify-out/graph.jsonand survive across sessions. Ask questions weeks later without re-reading everything. - Honest audit trail - every edge is tagged EXTRACTED, INFERRED, or AMBIGUOUS. You know what was found vs invented.
- Cross-document surprise - community detection finds connections between concepts in different files that you would never think to ask about directly.
Use it for: a codebase you're new to, a reading list, a research corpus, or a personal /raw folder.
What You Must Do When Invoked
If the user invoked /graphify --help or /graphify -h (with no other arguments), print the contents of the ## Usage section above verbatim and stop. Do not run any commands, do not detect files, do not default the path to .. Just print the Usage block and return.
If no path was given, use . (current directory). Do not ask the user for a path.
Read ONLY the reference file for the invoked subcommand (progressive disclosure — do not read the others):
| Invocation | Read | Contents |
|---|---|---|
/graphify [<path>] + build flags (--mode, --directed, --no-viz, --svg, --graphml, --neo4j*, --wiki, --obsidian*, --mcp) |
references/build.md |
Full pipeline Steps 1-9: install check, file detection, video transcription, extraction, cluster/analyze, community labels, vault + HTML, exports, benchmark, manifest/report |
/graphify <path> --update or --cluster-only |
references/incremental.md |
Incremental re-extraction (manifest diff, ghost pruning) and clustering re-runs |
/graphify query / path / explain |
references/query.md |
BFS/DFS traversal, token-budget output, shortest path, node explanation |
/graphify add <url>, --watch, git hook, native CLAUDE.md integration |
references/integrations.md |
URL ingestion, watch mode, commit hooks, CLAUDE.md wiring |
Follow the steps in the reference file in order. Do not skip steps.
Troubleshooting
PowerShell 5.1 vertical scrolling breaks after a run → ANSI escape output from graspologic (suppressed in graphify v0.3.10+). Fixes: upgrade (pip install --upgrade graphifyy), use Windows Terminal, reopen the console, or pip uninstall graspologic (falls back to NetworkX Louvain, no ANSI).
Honesty Rules
- Never invent an edge. If unsure, use AMBIGUOUS.
- Never skip the corpus check warning.
- Always show token cost in the report.
- Never hide cohesion scores behind symbols - show the raw number.
- Never run HTML viz on a graph with more than 5,000 nodes without warning the user.