Skip to content

Build Commands

Fresh

Core Build Syntax

bash
/graphify <path> [options]
graphify <path> [options]   # terminal-direct (no assistant in loop)

All commands work as both slash commands (via AI assistant) and direct terminal commands.

Build Modes

Standard Build

bash
/graphify .                    # Current directory
/graphify ./src                # Specific subfolder
/graphify ./folder             # Any path

Deep Mode

bash
/graphify . --mode deep

Deep mode uses more aggressive inference. Produces more INFERRED edges — useful when you want to surface implicit relationships between modules.

Directed Graph

bash
/graphify . --directed

Preserves edge direction (source -> target). Use when call-graph directionality matters for your analysis.

Incremental Update

bash
/graphify . --update

Re-extracts only changed files (SHA256 cache comparison). Merges new nodes and edges into the existing graph.json. Much faster than a full rebuild.

Cluster-Only

bash
/graphify . --cluster-only

Reruns Leiden clustering on the existing graph without re-extracting any files. Use after manually editing graph.json or when you want to try different clustering parameters.

Skip Visualization

bash
/graphify . --no-viz

Produces GRAPH_REPORT.md and graph.json only — skips the graph.html generation. Faster for CI pipelines and automated runs.

Export Flags

These flags add additional output formats alongside the standard outputs:

FlagOutputUse Case
--wikiwiki/ directoryMarkdown article per community cluster
--obsidianobsidian/ vaultObsidian-compatible notes
--svggraph.svgStatic image export
--graphmlgraph.graphmlGephi, yEd visualization tools
--neo4jcypher.txtCypher statements for import
--neo4j-push bolt://localhost:7687Live pushDirect Neo4j database push
--mcpstdio serverStart MCP server after build

Wiki Export Example

bash
/graphify . --wiki

Produces one Markdown article per Leiden community cluster. Each article summarizes the cluster's key nodes and their relationships — useful for documentation generation.

Obsidian Export Example

bash
/graphify . --obsidian

Generates an Obsidian-compatible vault with bidirectional wiki-links between related concepts.

Watch Mode

bash
/graphify . --watch

Monitors the directory for file changes and triggers an incremental rebuild automatically. Pure AST rebuilds (code changes) are near-instant. LLM extraction (new prose/docs) takes longer.

Watch Mode Performance

Watch mode for code-only changes is very fast — it uses tree-sitter AST without calling the LLM. Only new or changed prose files trigger an LLM call.

Add External Content

bash
/graphify add https://arxiv.org/abs/1706.03762    # arXiv paper
/graphify add <youtube-url>                        # YouTube video
/graphify add https://example.com/paper.pdf        # Remote PDF
/graphify add https://... --author "Name"           # With attribution

External content is fetched, processed, and merged into the existing graph.

Combining Flags

Flags can be combined:

bash
/graphify . --mode deep --directed --wiki --no-viz
/graphify ./src --update --obsidian