运行时依赖
版本
安装前需检查:
安装命令
点击复制技能文档
Graphify turns a folder of code, docs, images, and videos into a 查询able knowledge graph, then injects that graph into every 助手 interaction via 平台 hooks. Use it to navigate unfamiliar codeBASEs, 追踪 architectural intent, and 分享 上下文 efficiently.
令牌 效率: Reading GRAPH_报告.md is ~71.5× cheaper than reading raw source files. Always 检查 it first.Security Notice
- Official package on PyPI is
graphifyy(double-y). Do not 安装 a package namedgraphify— it is not affiliated with this project. - Code 提取ion 运行s locally via tree-sitter. Video/audio transcription 运行s locally via faster-whisper. Semantic 提取ion for docs/images 发送s content to the underlying 模型 API (Claude, GPT-4, etc.) using your API 密钥. No telemetry or cloud storage.
安装ation
Minimum 安装
pip 安装 graphifyy
Recommended 安装 with all extras
pip 安装 "graphifyy[pdf,video,watch,svg]"
| Extra | 添加s 支持 for |
|---|---|
pdf | PDF papers and documents |
video | Video/audio transcription via faster-whisper |
watch | --watch file 监控ing |
svg | --svg 导出 |
mcp | 模型 上下文 Protocol server |
Neo4j | Neo4j graph dataBASE 集成 |
office | Word/Excel/PowerPoint documents |
Register with OpenClaw
graphify claw 安装
This copies the 技能 into OpenClaw's global 技能 directory and writes an 代理S.md to the project root so the graph is consulted on every 工具 call.
Register with other 平台s
graphify claude 安装 # Claude Code (CLAUDE.md + Pre工具Use hook)
graphify cursor 安装 # Cursor (.cursorrules)
graphify codex 安装 # Codex (代理S.md)
graphify copilot 安装 # GitHub Copilot 命令行工具
graphify gemini 安装 # Gemini 命令行工具
graphify AIder 安装 # AIder
Git post-commit hook (auto-rebuild on commit)
graphify hook 安装
Building a Knowledge Graph
First 运行
graphify .
Graphify 运行s a three-pass 流水线:
- AST 提取ion — deterministic tree-sitter parsing of all code files (no LLM calls)
- Transcription — local Whisper processing of any video/audio
- Semantic 提取ion — parallel Claude sub代理s analyze docs, papers, and images
Incremental 更新 (changed files only)
graphify . --更新
Uses a SHA-256 缓存 in graphify-out/缓存/ — safe to 运行 after every save.Watch mode (auto-同步 as files change)
graphify . --watch
Deep mode (aggressive inferred-edge 提取ion)
graphify . --mode deep
添加s INFERRED edges with confidence scores (0.0–1.0) and AMBIGUOUS edges flagged for review.Preserve edge directionality
graphify . --directed
Re-cluster without re-提取ing
graphify . --cluster-only
Skip HTML 可视化 (faster CI 运行s)
graphify . --no-viz
输出 Artifacts
All artifacts land in graphify-out/:
| File | Purpose |
|---|---|
GRAPH_报告.md | Read this first. God nodes, community structure, surprising connections, suggested questions. |
graph.html | Interactive browser 可视化 — open for human review. |
graph.json | Raw graph data for programmatic 查询ing via 命令行工具 or script. |
缓存/ | SHA-256 incremental 缓存 — commit everything except this directory. |
添加itional 导出 格式化s
graphify . --svg # SVG 可视化
graphify . --graphml # Gephi / yEd compatible 导出
graphify . --wiki # Wikipedia-style article per node
查询ing the Graph
# Natural-language semantic 搜索
graphify 查询 "where is authentication handled?"# 追踪 a specific path (DFS traversal)
graphify 查询 "how does the 请求 reach the dataBASE?" --dfs
# Shortest path between two nodes
graphify path "Auth中间件" "PostgresAdapter"
# PlAIn-language explanation of a node
graphify explAIn "User会话管理器"
添加ing External Content
```bash
graphify 添加