### Install prerequisites on Ubuntu/Debian Source: https://github.com/graphify-labs/graphify/blob/v8/docs/translations/README.fa-IR.md Install Python 3.12, pip, and pipx, or alternatively install uv via curl. ```bash sudo apt install python3.12 python3-pip pipx # or install uv: curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Install graphifyy with all extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `all` extra, which includes everything above. ```bash uv tool install "graphifyy[all]" ``` -------------------------------- ### Windows quick install with winget Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs uv on Windows using winget. ```powershell winget install astral-sh.uv ``` -------------------------------- ### Install graphify CLI with uv or pipx Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Install the graphify CLI using uv tool install or pipx install, then run graphify install to detect your assistant and register the skill. Requires Python 3.10+ and uv (or pipx). ```bash uv tool install graphifyy # install the CLI (or: pipx install graphifyy) graphify install # detects your assistant and registers the skill ``` -------------------------------- ### Install graphifyy with gemini extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `gemini` extra for Google Gemini API. ```bash uv tool install "graphifyy[gemini]" ``` -------------------------------- ### Install graphifyy with sql extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `sql` extra for SQL schema extraction. ```bash uv tool install "graphifyy[sql]" ``` -------------------------------- ### Install graphifyy via uv, pipx, or pip Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Three alternative install methods for the graphifyy package. uv is recommended for an isolated environment; pip may require PATH setup. ```bash uv tool install graphifyy # recommended, isolated env (if 'graphify' isn't found after, run: uv tool update-shell) pipx install graphifyy # alternative pip install graphifyy # may need PATH setup, see Troubleshooting below ``` -------------------------------- ### Install graphifyy with office extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `office` extra for `.docx` and `.xlsx` support. ```bash uv tool install "graphifyy[office]" ``` -------------------------------- ### Install graphifyy with pdf extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `pdf` extra for PDF extraction. ```bash uv tool install "graphifyy[pdf]" ``` -------------------------------- ### Install graphifyy with openai extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `openai` extra for OpenAI or OpenAI-compatible APIs. ```bash uv tool install "graphifyy[openai]" ``` -------------------------------- ### Install graphifyy with video extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `video` extra for video/audio transcription using faster-whisper and yt-dlp. ```bash uv tool install "graphifyy[video]" ``` -------------------------------- ### Install graphifyy with ollama extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `ollama` extra for Ollama local inference. ```bash uv tool install "graphifyy[ollama]" ``` -------------------------------- ### Install graphifyy with google extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `google` extra for Google Sheets rendering. ```bash uv tool install "graphifyy[google]" ``` -------------------------------- ### Install graphifyy with mcp extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `mcp` extra for the MCP stdio server. ```bash uv tool install "graphifyy[mcp]" ``` -------------------------------- ### Install graphifyy with neo4j extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `neo4j` extra for Neo4j push support. ```bash uv tool install "graphifyy[neo4j]" ``` -------------------------------- ### Install graphifyy with falkordb extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `falkordb` extra for FalkorDB push support. ```bash uv tool install "graphifyy[falkordb]" ``` -------------------------------- ### Install graphifyy with postgres extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `postgres` extra for live PostgreSQL introspection via `--postgres DSN`. ```bash uv tool install "graphifyy[postgres]" ``` -------------------------------- ### Install and run graphify on a mixed corpus Source: https://github.com/graphify-labs/graphify/blob/v8/worked/mixed-corpus/README.md Shows the repository corpus, installation commands for different AI assistants, and the command to run graphify on the raw directory. ```text raw/ ├── analyze.py — graph analysis module (god_nodes, surprising_connections) ├── build.py — graph builder (build_from_json, NetworkX wrapper) ├── cluster.py — Leiden community detection (cluster, score_all) ├── attention_notes.md — Transformer paper notes (Vaswani et al., 2017) with arXiv citation ``` ```bash pip install graphifyy graphify install # Claude Code graphify install --platform codex # Codex graphify install --platform opencode # OpenCode graphify install --platform claw # OpenClaw ``` ```text /graphify ./raw ``` -------------------------------- ### Development Setup Commands Source: https://github.com/graphify-labs/graphify/blob/v8/CONTRIBUTING.md Commands to fork, clone, set up the environment, run tests, and lint/type-check before pushing. Requires Python 3.10+ and uv. Always branch off upstream v8. ```bash # Fork and clone the repository git clone https://github.com//graphify.git cd graphify git remote add upstream https://github.com/Graphify-Labs/graphify.git git fetch upstream git checkout -b my-feature-branch upstream/v8 # Always branch off upstream v8, never commit directly to v8 # Set up the environment (--all-extras installs the optional grammars and SDKs, # matching CI; without it the tests that need them are skipped) uv sync --all-extras uv run pre-commit install # Run the test suite to confirm your setup uv run pytest tests/ -q # Run linters and type checkers before pushing uv run ruff check . uv run pyright ``` -------------------------------- ### Install graphifyy with chinese extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `chinese` extra for Chinese query segmentation using jieba. ```bash uv tool install "graphifyy[chinese]" ``` -------------------------------- ### Install Graphify CLI with MCP extra Source: https://github.com/graphify-labs/graphify/blob/v8/GEMINI.md One-time setup to install the Graphify CLI with the required [mcp] extra. Use either uv tool install or pipx install; the [mcp] extra is required or graphify-mcp will not start. ```bash uv tool install "graphifyy[mcp]" ``` ```bash pipx install "graphifyy[mcp]" ``` -------------------------------- ### Install graphify skill with --project flag Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the assistant skill into the current repository instead of the user profile. The second command also specifies the codex platform. ```bash graphify install --project graphify install --project --platform codex ``` -------------------------------- ### Install graphifyy with bedrock extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `bedrock` extra for AWS Bedrock. Uses IAM, no API key required. ```bash uv tool install "graphifyy[bedrock]" ``` -------------------------------- ### Install graphifyy with ocaml extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `ocaml` extra for OCaml `.ml`/`.mli` AST extraction. ```bash uv tool install "graphifyy[ocaml]" ``` -------------------------------- ### macOS quick install with Homebrew Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs Python 3.12 and uv via Homebrew on macOS. ```bash brew install python@3.12 uv ``` -------------------------------- ### Install and configure graphify Source: https://github.com/graphify-labs/graphify/blob/v8/worked/example/README.md Install graphifyy via pip, then run graphify install for Claude Code, Codex, OpenCode, or OpenClaw. The --platform flag selects the target AI coding assistant. ```bash pip install graphifyy graphify install # Claude Code graphify install --platform codex # Codex graphify install --platform opencode # OpenCode graphify install --platform claw # OpenClaw ``` -------------------------------- ### Install graphifyy with dm extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `dm` extra for BYOND DreamMaker `.dm`/`.dme` AST extraction. May need a C compiler and `python3-dev` if no wheel matches your platform. ```bash uv tool install "graphifyy[dm]" ``` -------------------------------- ### Install graphifyy with svg extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `svg` extra for SVG graph export. ```bash uv tool install "graphifyy[svg]" ``` -------------------------------- ### Install graphifyy with watch extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `watch` extra for auto-rebuild on file changes via `graphify watch`. ```bash uv tool install "graphifyy[watch]" ``` -------------------------------- ### Ubuntu/Debian install commands Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs uv (which manages its own Python) or uses system Python with pipx on Ubuntu/Debian. ```bash # uv manages its own Python, so this is the only step you need: curl -LsSf https://astral.sh/uv/install.sh | sh # or use the system Python with pipx: sudo apt install python3 python3-pip pipx ``` -------------------------------- ### Platform-specific install commands Source: https://github.com/graphify-labs/graphify/blob/v8/docs/translations/README.fa-IR.md Commands for various assistants. Some platforms use a subcommand (e.g., `graphify vscode install`) or require additional flags. ```bash graphify install ``` ```bash graphify install --platform windows ``` ```bash graphify install --platform codebuddy ``` ```bash graphify install --platform codex ``` ```bash graphify install --platform opencode ``` ```bash graphify install --platform kilo ``` ```bash graphify install --platform copilot ``` ```bash graphify vscode install ``` ```bash graphify install --platform aider ``` ```bash graphify install --platform claw ``` ```bash graphify install --platform droid ``` ```bash graphify install --platform trae ``` ```bash graphify install --platform trae-cn ``` ```bash graphify install --platform gemini ``` ```bash graphify install --platform hermes ``` ```bash graphify install --platform kimi ``` ```bash graphify amp install ``` ```bash graphify install --platform agents ``` ```bash graphify kiro install ``` ```bash graphify install --platform pi ``` ```bash graphify pi guard install ``` ```bash graphify cursor install ``` ```bash graphify devin install ``` ```bash graphify antigravity install ``` -------------------------------- ### Install graphifyy with robot extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `robot` extra for Robot Framework `.robot`/`.resource` extraction, including suites, test cases, keywords, and keyword-call and resource/library import edges. ```bash uv tool install "graphifyy[robot]" ``` -------------------------------- ### Install graphify CLI with uv tool Source: https://github.com/graphify-labs/graphify/blob/v8/worked/rsl-siege-manager/README.md Installs the graphify CLI via its PyPI package graphifyy (double-y). ```powershell uv tool install graphifyy ``` -------------------------------- ### Install graphifyy with commonlisp extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `commonlisp` extra for Common Lisp `.lisp`/`.cl`/`.lsp`/`.asd` AST extraction. ```bash uv tool install "graphifyy[commonlisp]" ``` -------------------------------- ### Install graphifyy with terraform extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `terraform` extra for Terraform/HCL `.tf`/`.tfvars`/`.hcl` AST extraction. ```bash uv tool install "graphifyy[terraform]" ``` -------------------------------- ### Verify install from PyPI with uvx Source: https://github.com/graphify-labs/graphify/blob/v8/RELEASING.md Verify the installed version from PyPI using uvx with --refresh to bypass the cached index. Replace X.Y.Z with the released version. ```bash uvx --refresh --from graphifyy==X.Y.Z graphify --version ``` -------------------------------- ### Install graphifyy with anthropic extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `anthropic` extra for Anthropic Claude API. Uses `--backend claude` and requires `ANTHROPIC_API_KEY`. ```bash uv tool install "graphifyy[anthropic]" ``` -------------------------------- ### Install graphifyy with leiden extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `leiden` extra for Leiden community detection. Uses graspologic on Python < 3.13 and a native backend on 3.13+. ```bash uv tool install "graphifyy[leiden]" ``` -------------------------------- ### Install, uninstall, and check graphify commit hook Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/agents/references/hooks.md Install a post-commit hook that auto-rebuilds the graph after every commit. graphify hook install sets up the hook, uninstall removes it, and status checks it. If a hook already exists, graphify appends rather than replaces. ```bash graphify hook install # install graphify hook uninstall # remove graphify hook status # check ``` -------------------------------- ### serve(graph_path) Source: https://github.com/graphify-labs/graphify/blob/v8/ARCHITECTURE.md Starts an MCP stdio server for the given graph file. ```APIDOC ## serve(graph_path) ### Description Starts an MCP stdio server for the given graph file. ### Parameters - `graph_path` (path) - Required - Path to the graph file. ### Returns An MCP stdio server. ``` -------------------------------- ### Start MCP server with --mcp flag Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/agents/references/exports.md Starts a stdio MCP server exposing tools: query_graph, get_node, get_neighbors, get_community, god_nodes, graph_stats, shortest_path. Add to Claude Desktop or any MCP-compatible agent orchestrator. Only run when --mcp was explicitly given. ```bash $(cat graphify-out/.graphify_python) -m graphify.serve graphify-out/graph.json ``` -------------------------------- ### Install datasketch and rapidfuzz into venv Source: https://github.com/graphify-labs/graphify/blob/v8/docs/superpowers/plans/2026-05-04-incremental-updates-dedup.md Installs the two new packages into the virtual environment using pip. Expected to complete without errors. ```bash cd /home/safi/graphify venv/bin/pip install datasketch rapidfuzz -q ``` -------------------------------- ### Install graphifyy with pascal extra Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Installs the `pascal` extra for Pascal/Delphi `.pas`/`.dpr`/`.dpk`/`.inc` AST extraction. Provides more accurate `calls`/`inherits` edges; falls back to a regex extractor when absent. ```bash uv tool install "graphifyy[pascal]" ``` -------------------------------- ### Run graphify on the raw directory Source: https://github.com/graphify-labs/graphify/blob/v8/worked/example/README.md After installation, open your AI coding assistant in the project directory and type /graphify ./raw to generate the knowledge graph. No PDF or image extraction is performed; it runs entirely on AST and markdown with no token cost for semantic extraction. ```text /graphify ./raw ``` -------------------------------- ### Install native AGENTS.md integration with graphify agents install Source: https://github.com/graphify-labs/graphify/blob/v8/tools/skillgen/expected/graphify__skills__agents__references__hooks.md Run once per project to make graphify always-on in agent sessions. Writes a ## graphify section to the local AGENTS.md that instructs the agent to check the graph before answering codebase questions and rebuild it after code changes. No manual /graphify needed in future sessions. ```bash graphify agents install ``` -------------------------------- ### Manage AGENTS.md integration (graphify amp) Source: https://github.com/graphify-labs/graphify/blob/v8/tools/skillgen/expected/graphify__skills__amp__references__hooks.md Install or remove the native AGENTS.md integration. 'install' writes a '## graphify' section to the local AGENTS.md that instructs Amp to check the graph before answering codebase questions and rebuild it after code changes. ```bash graphify amp install ``` ```bash graphify amp uninstall # remove the section ``` -------------------------------- ### JSON summary schema example Source: https://github.com/graphify-labs/graphify/blob/v8/docs/node-summaries-rfc.md Example of a file-level summary object for the file 'graphify/extract.py'. Use this shape to provide agents with a concise, token-saving summary while still allowing them to locate the file and understand its role. ```json { "label": "extract.py", "source_file": "graphify/extract.py", "summary": "Extracts source files into graph nodes and relationships; defines language parsers and import/call extraction helpers.", "generated_by": "deterministic", "summary_version": 1 } ``` -------------------------------- ### Install Trae AGENTS.md integration Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/trae/references/hooks.md Run this command once per project to configure Trae to use graphify for codebase context. ```bash graphify trae install # or: graphify trae-cn install ``` -------------------------------- ### Install native AGENTS.md integration Source: https://github.com/graphify-labs/graphify/blob/v8/tools/skillgen/fragments/references/host/hooks-agents-md.md Run once per project to make graphify always-on in @@HOST_DISPLAY@@ sessions. Writes a '## graphify' section to the local AGENTS.md that instructs @@HOST_DISPLAY@@ to check the graph before answering codebase questions and rebuild it after code changes. ```bash @@AGENTS_INSTALL_BLOCK@@ ``` -------------------------------- ### serve_http(graph_path, *, host, port, ...) Source: https://github.com/graphify-labs/graphify/blob/v8/ARCHITECTURE.md Starts an HTTP server for the given graph file. ```APIDOC ## serve_http(graph_path, *, host, port, ...) ### Description Starts an HTTP server for the given graph file. ### Parameters - `graph_path` (path) - Required - Path to the graph file. - `host` (string, keyword-only) - Required - Host to bind. - `port` (int, keyword-only) - Required - Port to bind. - Additional keyword arguments may be supported. ### Returns An HTTP server. ``` -------------------------------- ### Step 1: Ensure graphify is installed (bash) Source: https://github.com/graphify-labs/graphify/blob/v8/tools/skillgen/expected/graphify__skill-devin.md Detects the correct Python interpreter (handles uv tool, pipx, venv, system installs), installs graphifyy if missing, writes the interpreter path to graphify-out/.graphify_python, forces UTF-8 I/O on Windows, and saves the scan root via a quoted heredoc to prevent shell injection. If import succeeds, prints nothing and moves to Step 2. In every subsequent bash block, replace python3 with $(cat graphify-out/.graphify_python). ```bash PYTHON="" GRAPHIFY_BIN=$(which graphify 2>/dev/null) # 1. uv tool installs — most reliable on modern Mac/Linux if [ -z "$PYTHON" ] && command -v uv >/dev/null 2>&1; then _UV_PY=$(uv tool run --from graphifyy python -c "import sys; print(sys.executable)" 2>/dev/null) if [ -n "$_UV_PY" ]; then PYTHON="$_UV_PY"; fi fi # 2. Read shebang from graphify binary (pipx and direct pip installs) if [ -z "$PYTHON" ] && [ -n "$GRAPHIFY_BIN" ]; then _SHEBANG=$(head -1 "$GRAPHIFY_BIN" | tr -d '#!') case "$_SHEBANG" in *[!a-zA-Z0-9/_.@-]*) ;; *) "$_SHEBANG" -c "import graphify" 2>/dev/null && PYTHON="$_SHEBANG" ;; esac fi # 3. Fall back to python3 if [ -z "$PYTHON" ]; then PYTHON="python3"; fi if ! "$PYTHON" -c "import graphify" 2>/dev/null; then if command -v uv >/dev/null 2>&1; then uv tool install --upgrade graphifyy -q 2>&1 | tail -3 _UV_PY=$(uv tool run --from graphifyy python -c "import sys; print(sys.executable)" 2>/dev/null) if [ -n "$_UV_PY" ]; then PYTHON="$_UV_PY"; fi else "$PYTHON" -m pip install graphifyy -q 2>/dev/null \ || "$PYTHON" -m pip install graphifyy -q --break-system-packages 2>&1 | tail -3 fi fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" # Force UTF-8 I/O on Windows (prevents garbled CJK/non-ASCII output) export PYTHONUTF8=1 # Save scan root so `graphify update` (no args) knows where to look next time. # The scan path is passed through a quoted heredoc, never substituted into the # command line itself: a bare `cd ` (or an unquoted heredoc, which # still expands $()/backticks in its body) would let a malicious path execute # as shell code the moment this line runs. "$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' INPUT_PATH GRAPHIFY_ROOT_EOF ``` -------------------------------- ### CLI: graphify explain NODE_NAME Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/agents/references/query.md Use the CLI to get a plain-language explanation of a single node and its connections. Replace NODE_NAME with the concept the user asked about. ```bash graphify explain "NODE_NAME" ``` -------------------------------- ### Run image directly to debug MCP handshake failure Source: https://github.com/graphify-labs/graphify/blob/v8/docs/docker-mcp-sqlite.md When the error 'starting client: calling "initialize": EOF' occurs, run the image directly with this command to see the error. Common causes include a missing entrypoint binary (sqlite-mcp-server failure mode) or missing required env/secrets. ```bash printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"0.0"}}}'\n | docker run --rm -i -v mcp-sqlite:/mcp --db-path /mcp/db.sqlite ``` -------------------------------- ### Install and uninstall graphify AGENTS.md integration Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/agents/references/hooks.md Run graphify agents install once per project to write a ## graphify section into AGENTS.md, enabling the agent to check the graph before answering questions and rebuild it after code changes. graphify agents uninstall removes the section. ```bash graphify agents install ``` ```bash graphify agents uninstall # remove the section ``` -------------------------------- ### Install native AGENTS.md integration Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/amp/references/hooks.md Run once per project to make graphify always-on in Amp sessions. Writes a '## graphify' section to the local AGENTS.md that instructs Amp to check the graph before answering codebase questions and rebuild it after code changes. ```bash graphify amp install ``` -------------------------------- ### Install, uninstall, and check the post-commit hook Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/amp/references/hooks.md Commands to install, remove, and check the post-commit hook. The hook triggers once per commit, detects changed code files via git diff HEAD~1, and rebuilds graph.json and GRAPH_REPORT.md. If a post-commit hook already exists, graphify appends to it. ```bash graphify hook install # install graphify hook uninstall # remove graphify hook status # check ``` -------------------------------- ### Install Devin integration for always-on context Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-devin.md Run once per project to make graphify always-on in Devin sessions. This writes a '## graphify' section to .windsurf/rules/graphify.md that instructs Devin to check the graph before answering codebase questions and rebuild it after code changes. ```bash graphify devin install --project ``` -------------------------------- ### Configure ambiguous extensions and viz_node_limit in .graphifyrc Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Declares language mappings for ambiguous extensions like .inc, .h, or .m, and sets viz_node_limit=0 for git hooks. Lines starting with # are comments; a typo is reported once on stderr and the scan continues with defaults. ```ini # .graphifyrc # A language name: language.inc=php # Or an extension graphify already knows: language.tpl=.ts # Baked into the git hooks (see Team setup): viz_node_limit=0 ``` -------------------------------- ### Calling extract() from your own code Source: https://github.com/graphify-labs/graphify/blob/v8/ARCHITECTURE.md Example of calling extract() with a list of paths and an explicit root. Always pass root to avoid incorrect node ids and source_file values. ```python from pathlib import Path from graphify.extract import extract paths = [Path("src/lib/content.ts"), Path("src/pages/index.astro")] result = extract(paths, root=Path(".").resolve()) # pass root explicitly ``` -------------------------------- ### Dispatch subagents in parallel (B2) Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-devin.md Concrete example for 3 chunks: dispatch all subagents in the same response so they run in parallel. Each subagent receives a prompt with the file list filled in. Do not send separate messages. ```text [Subagent 1: files 1-15] [Subagent 2: files 16-30] [Subagent 3: files 31-45] ``` -------------------------------- ### Install CLAUDE.md integration Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-aider.md Run once per project to make graphify always-on in Claude Code sessions. This writes a `## graphify` section to the local `CLAUDE.md` that instructs Claude to check the graph before answering codebase questions and rebuild it after code changes. No manual `/graphify` needed in future sessions. ```bash graphify claude install ``` -------------------------------- ### Dispatch subagents via @mention (OpenCode) Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-opencode.md Shows the pattern for dispatching all subagents in a single message using @mention on OpenCode. Each chunk gets its own @agent mention with the extraction prompt and substituted variables (FILE_LIST, CHUNK_NUM, TOTAL_CHUNKS, DEEP_MODE). All mentions run in parallel. ```text @agent Chunk CHUNK_NUM of TOTAL_CHUNKS: [extraction prompt with FILE_LIST, CHUNK_NUM, TOTAL_CHUNKS, DEEP_MODE substituted] @agent Chunk 2 of TOTAL_CHUNKS: [next chunk] ``` -------------------------------- ### Claude Desktop MCP configuration for graphify Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/agents/references/exports.md Configure Claude Desktop to use the MCP server. Claude Desktop can't run $(...), and under uv tool install the system python3 can't import graphify, so set command to the absolute interpreter path printed by cat graphify-out/.graphify_python. ```json { "mcpServers": { "graphify": { "command": "", "args": ["-m", "graphify.serve", "/absolute/path/to/graphify-out/graph.json"] } } } ``` -------------------------------- ### Refresh and read lessons with graphify reflect --if-stale Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/agents/references/query.md Run this at the start of graph work to refresh and read lessons. The --if-stale flag makes it a no-op when LESSONS.md is already newer than every input, so it costs almost nothing if the git hook just refreshed it. After running, read graphify-out/reflections/LESSONS.md for preferred sources, known dead ends, and prior corrections. ```bash graphify reflect --if-stale ``` -------------------------------- ### Run graphify query CLI traversal Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/agents/references/query.md Runs the graphify query CLI with the expanded query string (not the original user question). The --dfs flag enables DFS mode with a budget of 3000; without it, BFS is the default. Prefer this when the CLI is installed. ```bash graphify query "QUESTION" ``` ```bash # or: graphify query "QUESTION" --dfs --budget 3000 ``` -------------------------------- ### Full deploy one-liner Source: https://github.com/graphify-labs/graphify/blob/v8/tests/fixtures/deploy_guide.md Runs on the VPS to update the application by pulling the latest code and rebuilding the API container without cache. ```bash cd /opt/QuranicWords && git pull origin main && docker compose build --no-cache api ``` -------------------------------- ### Uninstall Devin integration Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-devin.md Removes the graphify Devin integration that was installed with 'graphify devin install --project'. ```bash graphify devin uninstall --project # remove ``` -------------------------------- ### Option A: CLI usage for summarizing and explaining Source: https://github.com/graphify-labs/graphify/blob/v8/docs/node-summaries-rfc.md Commands to generate summaries and explain a node when using the summary attribute approach. The first command triggers summarization, the second explains a specific file. ```bash graphify . --summarize-nodes graphify explain "extract.py" ``` -------------------------------- ### Detect Python interpreter and install graphify Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-agents.md Bash script that detects the correct Python interpreter for graphify, handling uv tool, pipx, venv, and system installs. It installs graphify if missing, then writes the interpreter path and scan root to graphify-out for later steps. The scan root is passed via a quoted heredoc to avoid shell injection. ```bash PYTHON="" GRAPHIFY_BIN=$(which graphify 2>/dev/null) # 1. uv tool installs — most reliable on modern Mac/Linux if [ -z "$PYTHON" ] && command -v uv >/dev/null 2>&1; then _UV_PY=$(uv tool run --from graphifyy python -c "import sys; print(sys.executable)" 2>/dev/null) if [ -n "$_UV_PY" ]; then PYTHON="$_UV_PY"; fi fi # 2. Read shebang from graphify binary (pipx and direct pip installs) if [ -z "$PYTHON" ] && [ -n "$GRAPHIFY_BIN" ]; then _SHEBANG=$(head -1 "$GRAPHIFY_BIN" | tr -d '#!') case "$_SHEBANG" in *[!a-zA-Z0-9/_.@-]*) ;; *) "$_SHEBANG" -c "import graphify" 2>/dev/null && PYTHON="$_SHEBANG" ;; esac fi # 3. Fall back to python3 if [ -z "$PYTHON" ]; then PYTHON="python3"; fi if ! "$PYTHON" -c "import graphify" 2>/dev/null; then if command -v uv >/dev/null 2>&1; then uv tool install --upgrade graphifyy -q 2>&1 | tail -3 _UV_PY=$(uv tool run --from graphifyy python -c "import sys; print(sys.executable)" 2>/dev/null) if [ -n "$_UV_PY" ]; then PYTHON="$_UV_PY"; fi else "$PYTHON" -m pip install graphifyy -q 2>/dev/null \ || "$PYTHON" -m pip install graphifyy -q --break-system-packages 2>&1 | tail -3 fi fi # Write interpreter path for all subsequent steps (persists across invocations) mkdir -p graphify-out "$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w', encoding='utf-8').write(sys.executable)" # Save scan root so `graphify update` (no args) knows where to look next time. # The scan path is passed through a quoted heredoc, never substituted into the # command line itself: a bare `cd ` (or an unquoted heredoc, which # still expands $()/backticks in its body) would let a malicious path execute # as shell code the moment this line runs. "$PYTHON" -c "import os, sys; out_path = os.path.abspath('graphify-out/.graphify_root'); os.chdir(sys.stdin.readline().rstrip('\n')); open(out_path, 'w', encoding='utf-8').write(os.getcwd())" <<'GRAPHIFY_ROOT_EOF' INPUT_PATH GRAPHIFY_ROOT_EOF ``` -------------------------------- ### Option B: CLI usage for summarizing and explaining Source: https://github.com/graphify-labs/graphify/blob/v8/docs/node-summaries-rfc.md Commands to generate summaries and explain a node when using the sidecar approach. The first command generates the sidecar file, the second explains a specific file. ```bash graphify summarize graphify explain "extract.py" ``` -------------------------------- ### Directory structure for raw/ folder Source: https://github.com/graphify-labs/graphify/blob/v8/worked/karpathy-repos/README.md Shows the required folder structure for the benchmark. All files must be placed in a single folder named `raw/` with the specified subdirectories and files. ```text raw/ ├── nanoGPT/ ├── minGPT/ ├── micrograd/ ├── attention.pdf ├── flashattention.pdf ├── flashattention2.pdf ├── attn_residuals.pdf ├── neuralwalker.pdf ├── gpt2_124M_loss.png ├── gout.svg └── moon_mlp.png ``` -------------------------------- ### Detect and Install graphify Python Interpreter (PowerShell) Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-windows.md PowerShell script that locates a Python interpreter with graphify installed, checking uv tool dir, pipx venvs, and the active environment. If not found, it installs graphifyy via uv or pip, then saves the interpreter path and scan root to files for subsequent steps. Note: uses BOM-less UTF-8 encoding to avoid WinError 123. ```powershell # Detect Python with graphify — uv/pipx-aware (fixes #831) New-Item -ItemType Directory -Force -Path graphify-out | Out-Null $GRAPHIFY_PYTHON = $null function Find-GraphifyPython { # 1. uv tool install — 'uv tool dir' is authoritative, respects UV_TOOL_DIR automatically if (Get-Command uv -ErrorAction SilentlyContinue) { $uvDir = (uv tool dir 2>$null).Trim() if ($uvDir) { $py = Join-Path $uvDir "graphifyy\Scripts\python.exe" if (Test-Path $py) { & $py -c "import graphify" 2>$null if ($LASTEXITCODE -eq 0) { return $py } } } } # 2. pipx install — 'pipx environment' respects PIPX_HOME automatically if (Get-Command pipx -ErrorAction SilentlyContinue) { $venvs = (pipx environment --value PIPX_LOCAL_VENVS 2>$null).Trim() if ($venvs) { $py = Join-Path $venvs "graphifyy\Scripts\python.exe" if (Test-Path $py) { & $py -c "import graphify" 2>$null if ($LASTEXITCODE -eq 0) { return $py } } } } # 3. Active venv / conda / pip-into-current-env $pyCmd = Get-Command python -ErrorAction SilentlyContinue if ($pyCmd) { & $pyCmd.Source -c "import graphify" 2>$null if ($LASTEXITCODE -eq 0) { return (& $pyCmd.Source -c "import sys; print(sys.executable)").Trim() } } return $null } # Try to find the right Python (uv → pipx → active env) $GRAPHIFY_PYTHON = Find-GraphifyPython # Not found — install then re-detect if (-not $GRAPHIFY_PYTHON) { if (Get-Command uv -ErrorAction SilentlyContinue) { uv tool install --upgrade graphifyy -q 2>&1 | Select-Object -Last 3 } else { pip install graphifyy -q 2>&1 | Select-Object -Last 3 } $GRAPHIFY_PYTHON = Find-GraphifyPython } # Save interpreter path — all subsequent steps read this. # `Out-File -Encoding utf8` always writes a BOM on Windows PowerShell 5.1 (utf8NoBOM # only exists from PowerShell 6), and that BOM rides into the saved path, so the hook # rebuild fails with WinError 123 (#3028). WriteAllText with an explicit BOM-less # encoding writes the bytes POSIX writes, and adds no trailing newline. $Utf8NoBom = New-Object System.Text.UTF8Encoding $false [System.IO.File]::WriteAllText((Join-Path $PWD 'graphify-out\.graphify_python'), [string]$GRAPHIFY_PYTHON, $Utf8NoBom) # Save scan root so `graphify update` (no args) knows where to look next time. # INPUT_PATH is captured through a single-quoted (literal) here-string, never # substituted directly into the command line: an unquoted bareword argument # substituted here would let a malicious path (a stray `;`, `|`, or `$(...)`) # execute as script code the moment this line runs. $InputPathRaw = @' INPUT_PATH '@ [System.IO.File]::WriteAllText((Join-Path $PWD 'graphify-out\.graphify_root'), (Resolve-Path $InputPathRaw.Trim()).Path, $Utf8NoBom) ``` -------------------------------- ### graphify explain and path commands with sample output Source: https://github.com/graphify-labs/graphify/blob/v8/README.md Shows real terminal output from running graphify on the FastAPI codebase. The explain command displays node details and connections with confidence tags (EXTRACTED/INFERRED); the path command traces the shortest path between two nodes and ends with the path's overall confidence, that of its weakest hop. ```text $ graphify explain "APIRouter" Node: APIRouter Source: routing.py L2210 Community: 2 Degree: 47 Connections (47): --> RequestValidationError [uses] [INFERRED] --> Dependant [uses] [INFERRED] --> .get() [method] [EXTRACTED] <-- __init__.py [imports] [EXTRACTED] ... $ graphify path "FastAPI" "ModelField" Shortest path (3 hops): FastAPI --uses--> DefaultPlaceholder <--references-- get_request_handler() --references--> ModelField ``` -------------------------------- ### Start background watcher with graphify.watch Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-aider.md Starts a background watcher that monitors the graphify root folder and auto-updates the graph when files change. Uses a 3-second debounce to wait for file activity to stop. Press Ctrl+C to stop. For agentic workflows, run in a background terminal. ```bash $(cat graphify-out/.graphify_python) -m graphify.watch "$(cat graphify-out/.graphify_root)" --debounce 3 ``` -------------------------------- ### Run full test suite Source: https://github.com/graphify-labs/graphify/blob/v8/docs/superpowers/plans/2026-05-04-incremental-updates-dedup.md Run the complete test suite to ensure no regressions were introduced. ```bash venv/bin/python -m pytest tests/ -q --tb=no 2>&1 | tail -5 ``` -------------------------------- ### Uninstall SQLite server and clean up Source: https://github.com/graphify-labs/graphify/blob/v8/docs/docker-mcp-sqlite.md Removes the server from the default profile, drops the database volume (irreversible), and removes the image. ```bash # Remove server from the profile docker mcp profile server remove default SQLite # Drop the database volume (irreversible) docker volume rm mcp-sqlite # Remove the image docker rmi mcp/sqlite:latest ``` -------------------------------- ### Start background watcher with --watch Source: https://github.com/graphify-labs/graphify/blob/v8/tools/skillgen/expected/graphify__skill-aider.md Starts a background watcher that monitors the graphify root folder and auto-updates the graph when files change. Uses a 3-second debounce by default. Press Ctrl+C to stop. Code changes trigger immediate AST extraction and rebuild; docs, papers, or images set a needs_update flag for manual /graphify --update. ```bash $(cat graphify-out/.graphify_python) -m graphify.watch "$(cat graphify-out/.graphify_root)" --debounce 3 ``` -------------------------------- ### Run memory benchmark (LOCOMO) with graphify_v1_surreal adapter Source: https://github.com/graphify-labs/graphify/blob/v8/BENCHMARKS.md Runs the memory benchmark on the LOCOMO split with the SurrealDB-engine row (43.3%). Requires MOONSHOT_API_KEY. Respects --max-spend and writes a spend ledger. ```bash # Memory (LOCOMO). This invokes the SurrealDB-engine row (43.3%); the # graph-expand headline (45.3%) is a separate adapter in the same harness. python memory/runner.py --phase 3 --split locomo --n 300 \ --adapters graphify_v1_surreal --cn natural --workers 6 --max-spend 15 ``` -------------------------------- ### Database migration SQL ALTER TABLE Source: https://github.com/graphify-labs/graphify/blob/v8/tests/fixtures/deploy_guide.md Example of a database migration for the Prisma schema, adding a points column to the users table. ```SQL ALTER TABLE users ADD COLUMN points INT DEFAULT 0; ``` -------------------------------- ### Run lint and type checks with ruff and pyright Source: https://github.com/graphify-labs/graphify/blob/v8/CONTRIBUTING.md Run linting with ruff and type checking with pyright. Both commands are required before submitting changes. ```bash uv run ruff check . ``` ```bash uv run pyright ``` -------------------------------- ### Create GitHub release with gh CLI Source: https://github.com/graphify-labs/graphify/blob/v8/RELEASING.md Create a GitHub release off the v8 branch, triggering the publish workflow. Replace X.Y.Z with the version and with the path to the release notes file. ```bash gh release create vX.Y.Z --repo Graphify-Labs/graphify --target v8 \ --title "vX.Y.Z" --notes-file ``` -------------------------------- ### Clone the three Karpathy repositories Source: https://github.com/graphify-labs/graphify/blob/v8/worked/karpathy-repos/README.md Clones the nanoGPT, minGPT, and micrograd repositories from GitHub. These are the code files for the benchmark corpus. ```bash git clone https://github.com/karpathy/nanoGPT git clone https://github.com/karpathy/minGPT git clone https://github.com/karpathy/micrograd ``` -------------------------------- ### Run project checks Source: https://github.com/graphify-labs/graphify/blob/v8/CONTRIBUTING.md Run the test suite, linter, and type checker before opening a pull request. ```bash uv run pytest tests ``` ```bash uv run ruff check . ``` ```bash uv run pyright ``` -------------------------------- ### Run code cross-tool benchmark (ERPNext) Source: https://github.com/graphify-labs/graphify/blob/v8/BENCHMARKS.md Runs the code cross-tool benchmark on the ERPNext repository. Requires MOONSHOT_API_KEY. Respects --max-spend and writes a spend ledger. ```bash # Code cross-tool (ERPNext) python crosstool/run.py --repo erpnext --max-spend ``` -------------------------------- ### Graphify CLI 常用命令 Source: https://github.com/graphify-labs/graphify/blob/v8/docs/translations/README.zh-CN.md 用于构建图谱、更新、聚类、导出、查询、添加内容、管理钩子、合并图谱和查看 PR 仪表板的常用命令。 ```bash /graphify . # build graph for current folder /graphify ./docs --update # re-extract only changed files /graphify . --cluster-only # rerun clustering without re-extracting /graphify . --cluster-only --resolution 1.5 # more granular communities /graphify . --cluster-only --exclude-hubs 99 # suppress utility super-hubs from god-node rankings /graphify . --no-viz # skip the HTML, just the report + JSON /graphify . --wiki # build a markdown wiki from the graph graphify export callflow-html # Mermaid architecture/call-flow HTML (auto-regenerates on every git commit if hook is installed) /graphify query "what connects auth to the database?" /graphify path "UserService" "DatabasePool" /graphify explain "RateLimiter" /graphify add https://arxiv.org/abs/1706.03762 # fetch a paper and add it /graphify add # transcribe and add a video graphify hook install # auto-rebuild on commit + branch checkout (run `graphify update .` after `git pull`: see "Recommended workflow" below) graphify merge-graphs a.json b.json # combine two graphs graphify prs # PR dashboard: CI state, review status, worktree mapping graphify prs 42 # deep dive on PR #42 with graph impact graphify prs --triage # AI ranks your review queue (uses whatever backend is configured) graphify prs --conflicts # PRs sharing graph communities: merge-order risk ``` -------------------------------- ### Run tests on Python 3.10 and 3.13 Source: https://github.com/graphify-labs/graphify/blob/v8/RELEASING.md Run the full test suite on Python 3.10 and 3.13. The first command uses the default environment, the second explicitly targets Python 3.13. ```bash uv run pytest # and against a 3.13 environment, e.g. uv run --python 3.13 pytest ``` -------------------------------- ### Verify client wiring Source: https://github.com/graphify-labs/graphify/blob/v8/docs/docker-mcp-sqlite.md Lists the currently connected MCP clients to confirm the wiring was successful. ```bash docker mcp client ls ``` -------------------------------- ### Install, uninstall, and check post-commit hook Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skill-aider.md Use these commands to manage a post-commit hook that auto-rebuilds the graph after every commit. The hook detects changed code files via `git diff HEAD~1`, re-runs AST extraction, and rebuilds `graph.json` and `GRAPH_REPORT.md`. Doc/image changes are ignored; run `/graphify --update` manually for those. If a post-commit hook already exists, graphify appends to it rather than replacing it. ```bash graphify hook install # install graphify hook uninstall # remove graphify hook status # check ``` -------------------------------- ### Run full test suite with pytest Source: https://github.com/graphify-labs/graphify/blob/v8/docs/superpowers/plans/2026-05-04-incremental-updates-dedup.md Runs the full test suite quietly with no tracebacks, piping to tail -5. Expected: 532+ passed, 5 failed (pre-existing SQL). ```bash venv/bin/python -m pytest tests/ -q --tb=no 2>&1 | tail -5 ``` -------------------------------- ### Export wiki with --wiki flag Source: https://github.com/graphify-labs/graphify/blob/v8/graphify/skills/agents/references/exports.md Run before Step 9 (cleanup) so .graphify_labels.json is still available. Only run when --wiki was explicitly given. ```bash graphify export wiki ```