graphifyy 0.3.17 → 0.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +60 -17
- package/README.md +41 -13
- package/README.zh-CN.md +54 -17
- package/dist/cli.js +862 -369
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1070 -598
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -6
- package/dist/index.d.ts +36 -6
- package/dist/index.js +1092 -614
- package/dist/index.js.map +1 -1
- package/dist/skill-runtime.js +1182 -669
- package/dist/skill-runtime.js.map +1 -1
- package/package.json +14 -4
- package/src/skills/skill-claw.md +1 -0
- package/src/skills/skill-codex.md +69 -11
- package/src/skills/skill-droid.md +73 -6
- package/src/skills/skill-gemini.toml +207 -0
- package/src/skills/skill-opencode.md +73 -6
- package/src/skills/skill-trae.md +1 -0
- package/src/skills/skill-windows.md +76 -5
- package/src/skills/skill.md +82 -8
package/README.ja-JP.md
CHANGED
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://github.com/rhanka/graphify/actions/workflows/typescript-ci.yml)
|
|
6
6
|
|
|
7
|
-
**AIコーディングアシスタント向けのスキル。** Claude Code、
|
|
7
|
+
**AIコーディングアシスタント向けのスキル。** Claude Code、Gemini CLI、GitHub Copilot CLI、Aider、OpenCode、OpenClaw、Factory Droid、Trae では `/graphify`、Codex では `$graphify` と入力すると、ファイルを読み込んでナレッジグラフを構築し、あなたが気づいていなかった構造を返します。コードベースをより速く理解し、アーキテクチャ上の意思決定の「なぜ」を見つけ出します。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
このリポジトリは元の Graphify プロジェクトの保守中 TypeScript ポートです。製品の方向性、ワークフロー、初期実装は [Safi Shamsi](https://github.com/safishamsi/graphify) による原典プロジェクトに依拠しています。
|
|
10
|
+
|
|
11
|
+
graphify はマルチモーダルであり、この TypeScript ポートは upstream `v3` に対してリリース単位でキャッチアップしています。現在の TS ランタイムはコード、Markdown、PDF、Office 文書、スクリーンショット、図表、その他の画像を処理できます。このブランチではさらにローカルの音声/動画検出と `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` による文字起こし経路を追加しており、生成された transcript も同じ意味抽出パスに流し込まれます。tree-sitter AST により 20 言語をサポートします(Python、JS、TS、Go、Rust、Java、C、C++、Ruby、C#、Kotlin、Scala、PHP、Swift、Lua、Zig、PowerShell、Elixir、Objective-C、Julia)。
|
|
10
12
|
|
|
11
13
|
> Andrej Karpathy は論文、ツイート、スクリーンショット、メモを放り込む `/raw` フォルダを持っています。graphify はまさにその問題への答えです――生ファイルを読むのに比べて1クエリあたりのトークン数が 71.5 倍少なく、セッションをまたいで永続化され、見つけたものと推測したものを正直に区別します。
|
|
12
14
|
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
+
```bash
|
|
16
|
+
$graphify . # Codex
|
|
17
|
+
/graphify . # Claude Code / Gemini CLI / Copilot CLI / Aider / OpenCode / OpenClaw / Droid / Trae
|
|
15
18
|
```
|
|
16
19
|
|
|
17
20
|
```
|
|
@@ -36,15 +39,15 @@ dist/
|
|
|
36
39
|
|
|
37
40
|
## 仕組み
|
|
38
41
|
|
|
39
|
-
graphify
|
|
42
|
+
graphify は決定論的な構造抽出とモデル駆動の意味抽出を組み合わせ、必要に応じてその間にローカル前処理を挟みます。コードは LLM を使わない AST パスでクラス、関数、インポート、コールグラフ、docstring、根拠コメントを抽出します。ドキュメント、論文、Office 文書、画像はテキストまたはマルチモーダル入力に正規化したうえで、プラットフォーム側モデルのサブエージェントが概念、関係、設計意図を抽出します。このキャッチアップブランチでは音声/動画もローカルで検出でき、TypeScript ランタイムから `yt-dlp` で音声を取得し、`ffmpeg` で正規化し、`sherpa-onnx-node` で文字起こしします。その transcript も他のドキュメントと同じ意味抽出パスに流し込みます。結果は Graphology グラフにマージされ、Louvain コミュニティ検出でクラスタリングされ、インタラクティブ HTML、クエリ可能な JSON、平易な監査レポートとしてエクスポートされます。
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
**クラスタリングはグラフトポロジベースで、埋め込みは使いません。** Louvain はエッジ密度によってコミュニティを見つけます。プラットフォームモデルが抽出する意味的類似性エッジ(`semantically_similar_to`、`INFERRED`)は既にグラフに含まれているため、コミュニティ検出に直接影響します。グラフ構造そのものが類似性シグナルであり、別途の embedding ステップやベクターデータベースは不要です。
|
|
42
45
|
|
|
43
46
|
すべての関係は `EXTRACTED`(ソースから直接見つかった)、`INFERRED`(合理的な推論、信頼度スコア付き)、`AMBIGUOUS`(レビュー対象としてフラグ付け)のいずれかでタグ付けされます。何が見つかったもので何が推測されたものか、常に分かります。
|
|
44
47
|
|
|
45
48
|
## インストール
|
|
46
49
|
|
|
47
|
-
**必要なもの:** Node.js 20+
|
|
50
|
+
**必要なもの:** Node.js 20+ と、次のいずれかのクライアント: [Claude Code](https://claude.ai/code), [Codex](https://openai.com/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli), [Aider](https://aider.chat), [OpenCode](https://opencode.ai), [OpenClaw](https://openclaw.ai), [Factory Droid](https://factory.ai), [Trae](https://trae.com), [Cursor](https://cursor.com)
|
|
48
51
|
|
|
49
52
|
```bash
|
|
50
53
|
npm install -g graphifyy
|
|
@@ -60,16 +63,22 @@ graphify install
|
|
|
60
63
|
| Claude Code (Linux/Mac) | `graphify install` |
|
|
61
64
|
| Claude Code (Windows) | `graphify install`(自動検出)または `graphify install --platform windows` |
|
|
62
65
|
| Codex | `graphify install --platform codex` |
|
|
66
|
+
| Gemini CLI | `graphify install --platform gemini` |
|
|
67
|
+
| GitHub Copilot CLI | `graphify install --platform copilot` |
|
|
68
|
+
| Aider | `graphify install --platform aider` |
|
|
63
69
|
| OpenCode | `graphify install --platform opencode` |
|
|
64
70
|
| OpenClaw | `graphify install --platform claw` |
|
|
65
71
|
| Factory Droid | `graphify install --platform droid` |
|
|
72
|
+
| Trae | `graphify install --platform trae` |
|
|
73
|
+
| Trae CN | `graphify install --platform trae-cn` |
|
|
66
74
|
|
|
67
|
-
Codex ユーザーは並列抽出のために `~/.codex/config.toml` の `[features]` の下に `multi_agent = true` も必要です。Factory Droid は並列サブエージェントディスパッチに `Task` ツールを使用します。OpenClaw は逐次抽出を使用します(並列エージェントサポートはこのプラットフォームではまだ初期段階です)。
|
|
75
|
+
Codex ユーザーは並列抽出のために `~/.codex/config.toml` の `[features]` の下に `multi_agent = true` も必要です。Gemini CLI は `/graphify` を `~/.gemini/commands/graphify.toml` のカスタムコマンドとして登録し、プロジェクトインストール時には `.gemini/settings.json` に `graphify serve` 用の MCP 設定も書き込みます。GitHub Copilot CLI はグローバルな `~/.copilot/skills/graphify/SKILL.md` を使います。Aider は `~/.aider/graphify/SKILL.md` を使いますが、このプラットフォームでは意味抽出はまだ逐次実行です。Factory Droid は並列サブエージェントディスパッチに `Task` ツールを使用します。OpenClaw は逐次抽出を使用します(並列エージェントサポートはこのプラットフォームではまだ初期段階です)。Trae は `Agent` ツールを使いますが、Claude/Codex 型の PreToolUse フックは持たないため `AGENTS.md` が常時有効の仕組みです。
|
|
68
76
|
|
|
69
77
|
次に、AI コーディングアシスタントを開いて入力します:
|
|
70
78
|
|
|
71
|
-
```
|
|
72
|
-
|
|
79
|
+
```bash
|
|
80
|
+
$graphify . # Codex
|
|
81
|
+
/graphify . # Claude Code / Gemini CLI / Copilot CLI / Aider / OpenCode / OpenClaw / Droid / Trae
|
|
73
82
|
```
|
|
74
83
|
|
|
75
84
|
注意:Codex はスキル呼び出しに `/` ではなく `$` を使用するため、代わりに `$graphify .` と入力してください。
|
|
@@ -82,13 +91,25 @@ Codex ユーザーは並列抽出のために `~/.codex/config.toml` の `[featu
|
|
|
82
91
|
|----------|---------|
|
|
83
92
|
| Claude Code | `graphify claude install` |
|
|
84
93
|
| Codex | `graphify codex install` |
|
|
94
|
+
| Gemini CLI | `graphify gemini install` |
|
|
95
|
+
| GitHub Copilot CLI | `graphify copilot install` |
|
|
96
|
+
| Aider | `graphify aider install` |
|
|
97
|
+
| Cursor | `graphify cursor install` |
|
|
85
98
|
| OpenCode | `graphify opencode install` |
|
|
86
99
|
| OpenClaw | `graphify claw install` |
|
|
87
100
|
| Factory Droid | `graphify droid install` |
|
|
101
|
+
| Trae | `graphify trae install` |
|
|
102
|
+
| Trae CN | `graphify trae-cn install` |
|
|
88
103
|
|
|
89
104
|
**Claude Code** は 2 つのことを行います:Claude にアーキテクチャの質問に答える前に `graphify-out/GRAPH_REPORT.md` を読むように指示する `CLAUDE.md` セクションを書き込み、すべての Glob と Grep 呼び出しの前に発火する **PreToolUse フック**(`settings.json`)をインストールします。ナレッジグラフが存在する場合、Claude は次のメッセージを見ます:_"graphify: Knowledge graph exists. Read GRAPH_REPORT.md for god nodes and community structure before searching raw files."_ ――これにより Claude はすべてのファイルを grep するのではなく、グラフを介してナビゲートします。
|
|
90
105
|
|
|
91
|
-
**Codex
|
|
106
|
+
**Codex** は `AGENTS.md` にルールを書き込み、`.codex/hooks.json` に PreToolUse フックも追加します。
|
|
107
|
+
**Gemini CLI** は `GEMINI.md` を書き込み、`.gemini/settings.json` でプロジェクトスコープの `graphify` MCP サーバーを登録します。
|
|
108
|
+
**GitHub Copilot CLI** はグローバル `~/.copilot/skills/graphify/SKILL.md` を使います。
|
|
109
|
+
**Aider** はプロジェクトルートの `AGENTS.md` とグローバル `~/.aider/graphify/SKILL.md` を使いますが、意味抽出はまだ逐次です。
|
|
110
|
+
**Cursor** は `.cursor/rules/graphify.mdc` を `alwaysApply: true` で書き込みます。
|
|
111
|
+
**OpenCode** は `AGENTS.md` に加え、`.opencode/plugins/graphify.js` と `opencode.json` でプロジェクトローカルプラグインを登録します。
|
|
112
|
+
**OpenClaw、Factory Droid、Trae、Trae CN** は同じルールをプロジェクトルートの `AGENTS.md` に書き込みます。これらのプラットフォームは Claude/Codex 型の PreToolUse フックをサポートしていないため、AGENTS.md が常時有効のメカニズムとなります。
|
|
92
113
|
|
|
93
114
|
アンインストールは対応するアンインストールコマンドで行います(例:`graphify claude uninstall`)。
|
|
94
115
|
|
|
@@ -131,6 +152,7 @@ When the user types `/graphify`, invoke the Skill tool with `skill: "graphify"`
|
|
|
131
152
|
/graphify ./raw --obsidian --obsidian-dir ~/vaults/myproject # ボールトを特定のディレクトリに書き込み
|
|
132
153
|
|
|
133
154
|
/graphify add https://arxiv.org/abs/1706.03762 # 論文を取得、保存、グラフを更新
|
|
155
|
+
/graphify add https://www.youtube.com/watch?v=... # 動画の音声を取得し、次回 build/update で transcript 化
|
|
134
156
|
/graphify add https://x.com/karpathy/status/... # ツイートを取得
|
|
135
157
|
/graphify add https://... --author "Name" # 元の著者をタグ付け
|
|
136
158
|
/graphify add https://... --contributor "Name" # コーパスに追加した人をタグ付け
|
|
@@ -158,9 +180,21 @@ graphify hook status
|
|
|
158
180
|
graphify claude install # CLAUDE.md + PreToolUse フック(Claude Code)
|
|
159
181
|
graphify claude uninstall
|
|
160
182
|
graphify codex install # AGENTS.md(Codex)
|
|
183
|
+
graphify gemini install # GEMINI.md + .gemini/settings.json(Gemini CLI)
|
|
184
|
+
graphify gemini uninstall
|
|
185
|
+
graphify copilot install # ~/.copilot/skills/graphify/SKILL.md(GitHub Copilot CLI)
|
|
186
|
+
graphify copilot uninstall
|
|
187
|
+
graphify aider install # AGENTS.md(Aider)
|
|
188
|
+
graphify aider uninstall
|
|
189
|
+
graphify cursor install # .cursor/rules/graphify.mdc(Cursor)
|
|
190
|
+
graphify cursor uninstall
|
|
161
191
|
graphify opencode install # AGENTS.md(OpenCode)
|
|
162
192
|
graphify claw install # AGENTS.md(OpenClaw)
|
|
163
193
|
graphify droid install # AGENTS.md(Factory Droid)
|
|
194
|
+
graphify trae install # AGENTS.md(Trae)
|
|
195
|
+
graphify trae uninstall
|
|
196
|
+
graphify trae-cn install # AGENTS.md(Trae CN)
|
|
197
|
+
graphify trae-cn uninstall
|
|
164
198
|
|
|
165
199
|
# ターミナルから直接グラフをクエリ(AI アシスタント不要)
|
|
166
200
|
graphify query "アテンションとオプティマイザを結ぶものは?"
|
|
@@ -173,11 +207,12 @@ graphify query "..." --graph path/to/graph.json
|
|
|
173
207
|
|
|
174
208
|
| タイプ | 拡張子 | 抽出方法 |
|
|
175
209
|
|------|-----------|------------|
|
|
176
|
-
| コード | `.py .ts .js .go .rs .java .c .cpp .rb .cs .kt .scala .php .swift .lua .zig .ps1 .ex .exs .m .mm` | tree-sitter による AST + コールグラフ + docstring
|
|
177
|
-
| ドキュメント | `.md .txt .rst` |
|
|
178
|
-
| Office | `.docx .xlsx` | Markdown
|
|
210
|
+
| コード | `.py .ts .js .jsx .tsx .go .rs .java .c .cpp .rb .cs .kt .scala .php .swift .lua .zig .ps1 .ex .exs .m .mm .jl` | tree-sitter による AST + コールグラフ + docstring / コメントの根拠 |
|
|
211
|
+
| ドキュメント | `.md .txt .rst` | 現在のプラットフォームモデルによる概念 + 関係性 + 設計根拠 |
|
|
212
|
+
| Office | `.docx .xlsx` | Markdown に変換した後、現在のプラットフォームモデルで抽出 |
|
|
179
213
|
| 論文 | `.pdf` | 引用マイニング + 概念抽出 |
|
|
180
|
-
| 画像 | `.png .jpg .webp .gif` |
|
|
214
|
+
| 画像 | `.png .jpg .webp .gif` | プラットフォームのマルチモーダルモデル - スクリーンショット、図、任意の言語 |
|
|
215
|
+
| 音声 / 動画 | `.mp4 .mov .webm .mkv .avi .m4v .mp3 .wav .m4a .ogg` | ローカルで検出し、必要に応じて `yt-dlp` で取得、`ffmpeg` で正規化、`sherpa-onnx-node` で文字起こししたうえで、ドキュメントと同じ意味抽出パスに流し込む |
|
|
181
216
|
|
|
182
217
|
## 得られるもの
|
|
183
218
|
|
|
@@ -215,11 +250,19 @@ graphify query "..." --graph path/to/graph.json
|
|
|
215
250
|
|
|
216
251
|
## プライバシー
|
|
217
252
|
|
|
218
|
-
graphify はドキュメント、論文、画像の意味的抽出のために、ファイル内容を AI コーディングアシスタントの基盤モデル API
|
|
253
|
+
graphify はドキュメント、論文、画像の意味的抽出のために、ファイル内容を AI コーディングアシスタントの基盤モデル API に送信します。Anthropic(Claude Code)、OpenAI(Codex)、Google(Gemini CLI)など、利用中プラットフォームのプロバイダーが対象です。コードファイルは tree-sitter AST を介してローカルで処理されるため、コードに関してはファイル内容がマシンから出ることはありません。音声/動画の文字起こしを使う場合、その工程はローカルの `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` ツールチェーンで実行されます。テレメトリ、利用追跡、分析は一切ありません。ネットワーク呼び出しは、あなたが明示的に ingestion を指示した URL 取得と、抽出中のプラットフォームのモデル API 呼び出しのみです。
|
|
219
254
|
|
|
220
255
|
## 技術スタック
|
|
221
256
|
|
|
222
|
-
|
|
257
|
+
Graphology + Louvain(`graphology-communities-louvain`) + tree-sitter + vis-network に加え、`pdf-parse`、`mammoth`、`exceljs`、`turndown`、そしてこのキャッチアップブランチで upstream に合わせて導入した `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` の文字起こし経路を使います。意味的抽出は利用中プラットフォームのモデル(Claude Code、Codex、Gemini CLI など)を介して行われます。デフォルトの HTML 出力は完全な静的ファイルです。
|
|
258
|
+
|
|
259
|
+
## 謝辞
|
|
260
|
+
|
|
261
|
+
このリポジトリは [Safi Shamsi](https://github.com/safishamsi/graphify) による元の Graphify プロジェクトの TypeScript ポートです。現行コードベースは assistant-skill ワークフローとナレッジグラフモデルを維持しつつ、保守されるランタイムをリポジトリルートの TypeScript 実装へ移しています。
|
|
262
|
+
|
|
263
|
+
## ライセンス
|
|
264
|
+
|
|
265
|
+
MIT。詳細は [LICENSE](LICENSE) を参照してください。
|
|
223
266
|
|
|
224
267
|
## スター履歴
|
|
225
268
|
|
package/README.md
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://github.com/rhanka/graphify/actions/workflows/typescript-ci.yml)
|
|
6
6
|
|
|
7
|
-
**An AI coding assistant skill.** Type `/graphify` in Claude Code or `$graphify` in Codex - it reads your files, builds a knowledge graph, and gives you back structure you didn't know was there. Understand a codebase faster. Find the "why" behind architectural decisions.
|
|
7
|
+
**An AI coding assistant skill.** Type `/graphify` in Claude Code, Gemini CLI, GitHub Copilot CLI, Aider, OpenCode, OpenClaw, Factory Droid, or Trae, or `$graphify` in Codex - it reads your files, builds a knowledge graph, and gives you back structure you didn't know was there. Understand a codebase faster. Find the "why" behind architectural decisions.
|
|
8
8
|
|
|
9
9
|
This repository is the maintained TypeScript port of the original Graphify project. Thanks to the original work by [Safi Shamsi](https://github.com/safishamsi/graphify) for the product direction, workflow, and initial implementation.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Multimodal, with the TypeScript catch-up tracked release-by-release against upstream `v3`. Code, markdown, PDFs, Office docs, screenshots, diagrams, and other images already flow through the current TS runtime. This branch also adds local audio/video detection plus a `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` transcription path, and those transcripts now feed the same assistant-driven semantic pass as docs and papers. 20 languages are supported via tree-sitter AST (Python, JS, TS, Go, Rust, Java, C, C++, Ruby, C#, Kotlin, Scala, PHP, Swift, Lua, Zig, PowerShell, Elixir, Objective-C, Julia).
|
|
12
12
|
|
|
13
13
|
> Andrej Karpathy keeps a `/raw` folder where he drops papers, tweets, screenshots, and notes. graphify is the answer to that problem - 71.5x fewer tokens per query vs reading the raw files, persistent across sessions, honest about what it found vs guessed.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
$graphify . # Codex
|
|
17
|
-
/graphify . # Claude Code / OpenCode / OpenClaw / Droid / Trae
|
|
17
|
+
/graphify . # Claude Code / Gemini CLI / Copilot CLI / Aider / OpenCode / OpenClaw / Droid / Trae
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
In Codex, `$graphify` is a skill trigger, not a Bash subcommand like `graphify .`. A successful TypeScript-backed Codex run should leave `graphify-out/.graphify_runtime.json` with `runtime: "typescript"`.
|
|
@@ -37,11 +37,11 @@ dist/
|
|
|
37
37
|
*.generated.py
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
Same syntax as `.gitignore`. Patterns
|
|
40
|
+
Same syntax as `.gitignore`. Patterns are discovered from the folder you run graphify on and its ancestors up to the git root, then matched against paths relative to the folder being scanned.
|
|
41
41
|
|
|
42
42
|
## How it works
|
|
43
43
|
|
|
44
|
-
graphify
|
|
44
|
+
graphify combines a deterministic structural pass with a model-backed semantic pass, with local preprocessing in between when needed. Code goes through a no-LLM AST pass that extracts classes, functions, imports, call graphs, docstrings, and rationale comments. Docs, papers, Office files, and images are normalized into text or multimodal inputs, then platform-backed subagents extract concepts, relationships, and design rationale. On this catch-up branch, audio/video files are also detected locally, normalized through `ffmpeg`, transcribed through the TypeScript runtime with `sherpa-onnx-node`, and fed into the same semantic extraction path as any other document. The results are merged into a Graphology graph, clustered with Louvain community detection, and exported as interactive HTML, queryable JSON, and a plain-language audit report.
|
|
45
45
|
|
|
46
46
|
**Clustering is graph-topology-based — no embeddings.** Louvain finds communities by edge density. The semantic similarity edges that the model extracts (`semantically_similar_to`, marked INFERRED) are already in the graph, so they influence community detection directly. The graph structure is the similarity signal — no separate embedding step or vector database needed.
|
|
47
47
|
|
|
@@ -49,7 +49,7 @@ Every relationship is tagged `EXTRACTED` (found directly in source), `INFERRED`
|
|
|
49
49
|
|
|
50
50
|
## Install
|
|
51
51
|
|
|
52
|
-
**Requires:** Node.js 20+ and one of: [Claude Code](https://claude.ai/code), [Codex](https://openai.com/codex), [OpenCode](https://opencode.ai), [OpenClaw](https://openclaw.ai), [Factory Droid](https://factory.ai),
|
|
52
|
+
**Requires:** Node.js 20+ and one of: [Claude Code](https://claude.ai/code), [Codex](https://openai.com/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli), [Aider](https://aider.chat), [OpenCode](https://opencode.ai), [OpenClaw](https://openclaw.ai), [Factory Droid](https://factory.ai), [Trae](https://trae.com), or [Cursor](https://cursor.com)
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
55
|
npm install -g graphifyy
|
|
@@ -65,19 +65,22 @@ graphify install
|
|
|
65
65
|
| Claude Code (Linux/Mac) | `graphify install` |
|
|
66
66
|
| Claude Code (Windows) | `graphify install` (auto-detected) or `graphify install --platform windows` |
|
|
67
67
|
| Codex | `graphify install --platform codex` |
|
|
68
|
+
| Gemini CLI | `graphify install --platform gemini` |
|
|
69
|
+
| GitHub Copilot CLI | `graphify install --platform copilot` |
|
|
70
|
+
| Aider | `graphify install --platform aider` |
|
|
68
71
|
| OpenCode | `graphify install --platform opencode` |
|
|
69
72
|
| OpenClaw | `graphify install --platform claw` |
|
|
70
73
|
| Factory Droid | `graphify install --platform droid` |
|
|
71
74
|
| Trae | `graphify install --platform trae` |
|
|
72
75
|
| Trae CN | `graphify install --platform trae-cn` |
|
|
73
76
|
|
|
74
|
-
Codex users also need `multi_agent = true` under `[features]` in `~/.codex/config.toml` for parallel extraction. Factory Droid uses the `Task` tool for parallel subagent dispatch. OpenClaw uses sequential extraction (parallel agent support is still early on that platform). Trae uses the Agent tool for parallel subagent dispatch and does **not** support PreToolUse hooks — AGENTS.md is the always-on mechanism.
|
|
77
|
+
Codex users also need `multi_agent = true` under `[features]` in `~/.codex/config.toml` for parallel extraction. Gemini CLI exposes `/graphify` through a custom command installed into `~/.gemini/commands/graphify.toml`, and the project install writes `.gemini/settings.json` so Gemini can use `graphify serve` as an MCP server. GitHub Copilot CLI installs a global `~/.copilot/skills/graphify/SKILL.md`. Aider uses a global `~/.aider/graphify/SKILL.md`, but semantic extraction stays sequential there because multi-agent dispatch is still early on that platform. OpenCode installs a project-local `tool.execute.before` plugin in `.opencode/plugins/graphify.js` and registers it in `opencode.json`, so OpenCode gets the same graph reminder before bash tool calls. Factory Droid uses the `Task` tool for parallel subagent dispatch. OpenClaw uses sequential extraction (parallel agent support is still early on that platform). Trae uses the Agent tool for parallel subagent dispatch and does **not** support PreToolUse hooks — AGENTS.md is the always-on mechanism.
|
|
75
78
|
|
|
76
79
|
Then open your AI coding assistant and invoke the skill:
|
|
77
80
|
|
|
78
81
|
```bash
|
|
79
82
|
$graphify . # Codex
|
|
80
|
-
/graphify . # Claude Code / OpenCode / OpenClaw / Droid / Trae
|
|
83
|
+
/graphify . # Claude Code / Gemini CLI / Copilot CLI / Aider / OpenCode / OpenClaw / Droid / Trae
|
|
81
84
|
```
|
|
82
85
|
|
|
83
86
|
### Make your assistant always use the graph (recommended)
|
|
@@ -88,17 +91,31 @@ After building a graph, run this once in your project:
|
|
|
88
91
|
|----------|---------|
|
|
89
92
|
| Claude Code | `graphify claude install` |
|
|
90
93
|
| Codex | `graphify codex install` |
|
|
94
|
+
| Gemini CLI | `graphify gemini install` |
|
|
95
|
+
| GitHub Copilot CLI | `graphify copilot install` |
|
|
96
|
+
| Aider | `graphify aider install` |
|
|
91
97
|
| OpenCode | `graphify opencode install` |
|
|
92
98
|
| OpenClaw | `graphify claw install` |
|
|
93
99
|
| Factory Droid | `graphify droid install` |
|
|
94
100
|
| Trae | `graphify trae install` |
|
|
95
101
|
| Trae CN | `graphify trae-cn install` |
|
|
102
|
+
| Cursor | `graphify cursor install` |
|
|
96
103
|
|
|
97
104
|
**Claude Code** does two things: writes a `CLAUDE.md` section telling Claude to read `graphify-out/GRAPH_REPORT.md` before answering architecture questions, and installs a **PreToolUse hook** (`settings.json`) that fires before every Glob and Grep call. If a knowledge graph exists, Claude sees: _"graphify: Knowledge graph exists. Read GRAPH_REPORT.md for god nodes and community structure before searching raw files."_ — so Claude navigates via the graph instead of grepping through every file.
|
|
98
105
|
|
|
99
106
|
**Codex** writes to `AGENTS.md`, teaches Codex to use the installed `graphify` skill for graph build/update/query tasks, and also installs a **PreToolUse hook** in `.codex/hooks.json` that fires before every Bash tool call.
|
|
100
107
|
|
|
101
|
-
**
|
|
108
|
+
**Gemini CLI** writes `GEMINI.md` in your project root and registers a project-scoped `graphify` MCP server in `.gemini/settings.json`. Gemini CLI does not have a Claude/Codex-style PreToolUse hook, so `GEMINI.md` is the always-on mechanism and `/graphify` is the explicit custom command.
|
|
109
|
+
|
|
110
|
+
**GitHub Copilot CLI** installs the global `graphify` skill in `~/.copilot/skills/graphify/SKILL.md`. There is no separate project-scoped hook in this port, so `/graphify` is the explicit entrypoint.
|
|
111
|
+
|
|
112
|
+
**Aider** writes `AGENTS.md` in your project root and relies on the installed global skill in `~/.aider/graphify/SKILL.md`. Semantic extraction is sequential there, so expect it to be slower than Codex/OpenCode on large doc-heavy corpora.
|
|
113
|
+
|
|
114
|
+
**OpenCode** writes to `AGENTS.md` and installs a project-local `tool.execute.before` plugin in `.opencode/plugins/graphify.js`, registered via `opencode.json`, so bash tool calls get the same graph reminder before raw-file traversal.
|
|
115
|
+
|
|
116
|
+
**Cursor** writes `.cursor/rules/graphify.mdc` with `alwaysApply: true`, so Cursor always sees the graph context before it starts crawling raw files.
|
|
117
|
+
|
|
118
|
+
**OpenClaw, Factory Droid, Trae** write the same rules to `AGENTS.md` in your project root. These platforms don't support PreToolUse hooks, so AGENTS.md is the always-on mechanism.
|
|
102
119
|
|
|
103
120
|
Uninstall with the matching uninstall command (e.g. `graphify claude uninstall`).
|
|
104
121
|
|
|
@@ -172,11 +189,12 @@ When the user types `/graphify`, invoke the Skill tool with `skill: "graphify"`
|
|
|
172
189
|
|
|
173
190
|
## Usage
|
|
174
191
|
|
|
175
|
-
In Codex, replace the leading `/` in the examples below with `$`.
|
|
192
|
+
In Codex, replace the leading `/` in the examples below with `$`. Gemini CLI, GitHub Copilot CLI, and Aider use the `/graphify` form directly.
|
|
176
193
|
|
|
177
194
|
```
|
|
178
195
|
/graphify # run on current directory
|
|
179
196
|
/graphify ./raw # run on a specific folder
|
|
197
|
+
/graphify ./raw --directed # build directed graph (preserves source->target)
|
|
180
198
|
/graphify ./raw --mode deep # more aggressive INFERRED edge extraction
|
|
181
199
|
/graphify ./raw --update # re-extract only changed files, merge into existing graph
|
|
182
200
|
/graphify ./raw --cluster-only # rerun clustering on existing graph, no re-extraction
|
|
@@ -185,6 +203,7 @@ In Codex, replace the leading `/` in the examples below with `$`.
|
|
|
185
203
|
/graphify ./raw --obsidian --obsidian-dir ~/vaults/myproject # write vault to a specific directory
|
|
186
204
|
|
|
187
205
|
/graphify add https://arxiv.org/abs/1706.03762 # fetch a paper, save, update graph
|
|
206
|
+
/graphify add https://www.youtube.com/watch?v=... # download video audio, then transcribe it on the next build/update
|
|
188
207
|
/graphify add https://x.com/karpathy/status/... # fetch a tweet
|
|
189
208
|
/graphify add https://... --author "Name" # tag the original author
|
|
190
209
|
/graphify add https://... --contributor "Name" # tag who added it to the corpus
|
|
@@ -212,7 +231,15 @@ graphify hook status
|
|
|
212
231
|
graphify claude install # CLAUDE.md + PreToolUse hook (Claude Code)
|
|
213
232
|
graphify claude uninstall
|
|
214
233
|
graphify codex install # AGENTS.md (Codex)
|
|
215
|
-
graphify
|
|
234
|
+
graphify gemini install # GEMINI.md + .gemini/settings.json (Gemini CLI)
|
|
235
|
+
graphify gemini uninstall
|
|
236
|
+
graphify copilot install # ~/.copilot/skills/graphify/SKILL.md (GitHub Copilot CLI)
|
|
237
|
+
graphify copilot uninstall
|
|
238
|
+
graphify aider install # AGENTS.md (Aider)
|
|
239
|
+
graphify aider uninstall
|
|
240
|
+
graphify cursor install # .cursor/rules/graphify.mdc (Cursor)
|
|
241
|
+
graphify cursor uninstall
|
|
242
|
+
graphify opencode install # AGENTS.md + opencode.json plugin (OpenCode)
|
|
216
243
|
graphify claw install # AGENTS.md (OpenClaw)
|
|
217
244
|
graphify droid install # AGENTS.md (Factory Droid)
|
|
218
245
|
graphify trae install # AGENTS.md (Trae)
|
|
@@ -236,6 +263,7 @@ Works with any mix of file types:
|
|
|
236
263
|
| Office | `.docx .xlsx` | Converted to markdown then extracted via the platform model |
|
|
237
264
|
| Papers | `.pdf` | Citation mining + concept extraction |
|
|
238
265
|
| Images | `.png .jpg .webp .gif` | Multimodal vision - screenshots, diagrams, any language |
|
|
266
|
+
| Audio / Video | `.mp4 .mov .webm .mkv .avi .m4v .mp3 .wav .m4a .ogg` | Detected locally; downloaded with `yt-dlp` when needed, normalized with `ffmpeg`, transcribed via `sherpa-onnx-node`, then fed through the same semantic extraction path as docs |
|
|
239
267
|
|
|
240
268
|
## What you get
|
|
241
269
|
|
|
@@ -273,11 +301,11 @@ Token reduction scales with corpus size. 6 files fits in a context window anyway
|
|
|
273
301
|
|
|
274
302
|
## Privacy
|
|
275
303
|
|
|
276
|
-
graphify sends file contents to your AI coding assistant's underlying model API for semantic extraction of docs, papers, and images — Anthropic (Claude Code), OpenAI (Codex), or whichever provider your platform uses. Code files are processed locally via tree-sitter AST — no file contents leave your machine for code. No telemetry, usage tracking, or analytics of any kind. The only network calls are to your platform's model API during extraction, using your own API key.
|
|
304
|
+
graphify sends file contents to your AI coding assistant's underlying model API for semantic extraction of docs, papers, and images — Anthropic (Claude Code), OpenAI (Codex), Google (Gemini CLI), or whichever provider your platform uses. Code files are processed locally via tree-sitter AST — no file contents leave your machine for code. When you use audio/video transcription on this catch-up branch, that step runs through your local `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` toolchain. No telemetry, usage tracking, or analytics of any kind. The only network calls are to your platform's model API during extraction, using your own API key, plus any URL fetches you explicitly ask graphify to ingest.
|
|
277
305
|
|
|
278
306
|
## Tech stack
|
|
279
307
|
|
|
280
|
-
Graphology + Louvain (`graphology-communities-louvain`) + tree-sitter + vis-network. Semantic extraction
|
|
308
|
+
Graphology + Louvain (`graphology-communities-louvain`) + tree-sitter + vis-network, with `pdf-parse`, `mammoth`, `exceljs`, `turndown`, and the upstream-aligned `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` transcription path on this catch-up branch. Semantic extraction runs through your platform's model (Claude Code, Codex, Gemini CLI, or another supported client). No Neo4j required, and the default HTML output is fully static.
|
|
281
309
|
|
|
282
310
|
## Acknowledgements
|
|
283
311
|
|
package/README.zh-CN.md
CHANGED
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://github.com/rhanka/graphify/actions/workflows/typescript-ci.yml)
|
|
6
6
|
|
|
7
|
-
**一个面向 AI 编码助手的技能。** 在 Claude Code、
|
|
7
|
+
**一个面向 AI 编码助手的技能。** 在 Claude Code、Gemini CLI、GitHub Copilot CLI、Aider、OpenCode、OpenClaw、Factory Droid 或 Trae 中输入 `/graphify`,在 Codex 中输入 `$graphify`,它会读取你的文件、构建知识图谱,并把原本不明显的结构关系还给你。更快理解代码库,找到架构决策背后的“为什么”。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
这个仓库是原始 Graphify 项目的受维护 TypeScript 版本。产品方向、工作流和最初实现来自 [Safi Shamsi](https://github.com/safishamsi/graphify) 的原始项目,这里保留了同样的知识图谱与 assistant-skill 交互模型。
|
|
10
|
+
|
|
11
|
+
graphify 是多模态的,而且这个 TypeScript 端口正按 upstream `v3` 的发布节奏逐版追平。当前 TS runtime 已经覆盖代码、Markdown、PDF、Office 文档、截图、图表和其他图片。本分支还补上了本地音频/视频检测,以及基于 `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` 的转录路径;这些 transcript 现在也会并入同一条语义抽取流水线。代码 AST 侧通过 tree-sitter 支持 20 种语言(Python、JS、TS、Go、Rust、Java、C、C++、Ruby、C#、Kotlin、Scala、PHP、Swift、Lua、Zig、PowerShell、Elixir、Objective-C、Julia)。
|
|
10
12
|
|
|
11
13
|
> Andrej Karpathy 会维护一个 `/raw` 文件夹,把论文、推文、截图和笔记都丢进去。graphify 就是在解决这类问题 —— 相比直接读取原始文件,每次查询的 token 消耗可降低 **71.5 倍**,结果还能跨会话持久保存,并且会明确区分哪些内容是实际发现的,哪些只是合理推断。
|
|
12
14
|
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
+
```bash
|
|
16
|
+
$graphify . # Codex
|
|
17
|
+
/graphify . # Claude Code / Gemini CLI / Copilot CLI / Aider / OpenCode / OpenClaw / Droid / Trae
|
|
15
18
|
```
|
|
16
19
|
|
|
17
20
|
```
|
|
@@ -24,15 +27,15 @@ graphify-out/
|
|
|
24
27
|
|
|
25
28
|
## 工作原理
|
|
26
29
|
|
|
27
|
-
graphify
|
|
30
|
+
graphify 把确定性的结构提取和模型驱动的语义提取组合在一起,中间按需做本地预处理。代码文件先走无 LLM 的 AST 流水线,提取类、函数、导入、调用图、docstring 和 rationale 注释。文档、论文、Office 文件和图片会先被规范化成文本或多模态输入,再交给平台模型驱动的子代理抽取概念、关系和设计动机。本分支还补上了本地音频/视频检测,并通过 TypeScript runtime 调用 `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` 做本地转录;生成出的 transcript 会和其他文档一起进入同一条语义抽取流水线。最终结果会合并到 Graphology 图里,用 Louvain 社区发现做聚类,并导出成可交互 HTML、可查询 JSON 和人类可读的审计报告。
|
|
28
31
|
|
|
29
|
-
**聚类是基于图拓扑完成的,不依赖 embeddings。**
|
|
32
|
+
**聚类是基于图拓扑完成的,不依赖 embeddings。** Louvain 按边密度发现社区。平台模型抽取出的语义相似边(`semantically_similar_to`,标记为 `INFERRED`)本来就存在于图中,所以会直接影响社区划分。图结构本身就是相似性信号,不需要额外的 embedding 步骤,也不需要向量数据库。
|
|
30
33
|
|
|
31
34
|
每条关系都会被标记为 `EXTRACTED`(直接在源材料中找到)、`INFERRED`(合理推断,并附带置信度分数)或 `AMBIGUOUS`(有歧义,需要复核)。所以你始终知道哪些是实际发现的,哪些是模型猜出来的。
|
|
32
35
|
|
|
33
36
|
## 安装
|
|
34
37
|
|
|
35
|
-
**要求:** Node.js 20+,并且使用以下平台之一:[Claude Code](https://claude.ai/code)、[Codex](https://openai.com/codex)、[OpenCode](https://opencode.ai)、[OpenClaw](https://openclaw.ai)、[Factory Droid](https://factory.ai) 或 [
|
|
38
|
+
**要求:** Node.js 20+,并且使用以下平台之一:[Claude Code](https://claude.ai/code)、[Codex](https://openai.com/codex)、[Gemini CLI](https://github.com/google-gemini/gemini-cli)、[GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli)、[Aider](https://aider.chat)、[OpenCode](https://opencode.ai)、[OpenClaw](https://openclaw.ai)、[Factory Droid](https://factory.ai)、[Trae](https://trae.com) 或 [Cursor](https://cursor.com)
|
|
36
39
|
|
|
37
40
|
```bash
|
|
38
41
|
npm install -g graphifyy
|
|
@@ -45,20 +48,25 @@ graphify install
|
|
|
45
48
|
|
|
46
49
|
| 平台 | 安装命令 |
|
|
47
50
|
|------|----------|
|
|
48
|
-
| Claude Code | `graphify install` |
|
|
51
|
+
| Claude Code(Linux / Mac) | `graphify install` |
|
|
52
|
+
| Claude Code(Windows) | `graphify install`(自动检测)或 `graphify install --platform windows` |
|
|
49
53
|
| Codex | `graphify install --platform codex` |
|
|
54
|
+
| Gemini CLI | `graphify install --platform gemini` |
|
|
55
|
+
| GitHub Copilot CLI | `graphify install --platform copilot` |
|
|
56
|
+
| Aider | `graphify install --platform aider` |
|
|
50
57
|
| OpenCode | `graphify install --platform opencode` |
|
|
51
58
|
| OpenClaw | `graphify install --platform claw` |
|
|
52
59
|
| Factory Droid | `graphify install --platform droid` |
|
|
53
60
|
| Trae | `graphify install --platform trae` |
|
|
54
61
|
| Trae CN | `graphify install --platform trae-cn` |
|
|
55
62
|
|
|
56
|
-
Codex 用户还需要在 `~/.codex/config.toml` 的 `[features]` 下打开 `multi_agent = true`,这样才能并行提取。OpenClaw 目前的并行 agent 支持还比较早期,所以使用顺序提取。Trae 使用 Agent 工具进行并行子代理调度,**不支持** PreToolUse hook,因此 AGENTS.md 是其常驻机制。
|
|
63
|
+
Codex 用户还需要在 `~/.codex/config.toml` 的 `[features]` 下打开 `multi_agent = true`,这样才能并行提取。Gemini CLI 会把 `/graphify` 作为自定义命令安装到 `~/.gemini/commands/graphify.toml`,项目级安装还会写入 `.gemini/settings.json`,让 Gemini 通过 `graphify serve` 访问 MCP。GitHub Copilot CLI 会安装全局 `~/.copilot/skills/graphify/SKILL.md`。Aider 会安装全局 `~/.aider/graphify/SKILL.md`,但该平台上的语义抽取仍然是串行的。OpenClaw 目前的并行 agent 支持还比较早期,所以使用顺序提取。Trae 使用 Agent 工具进行并行子代理调度,**不支持** PreToolUse hook,因此 AGENTS.md 是其常驻机制。
|
|
57
64
|
|
|
58
65
|
然后打开你的 AI 编码助手,输入:
|
|
59
66
|
|
|
60
|
-
```
|
|
61
|
-
|
|
67
|
+
```bash
|
|
68
|
+
$graphify . # Codex
|
|
69
|
+
/graphify . # Claude Code / Gemini CLI / Copilot CLI / Aider / OpenCode / OpenClaw / Droid / Trae
|
|
62
70
|
```
|
|
63
71
|
|
|
64
72
|
### 让助手始终优先使用图谱(推荐)
|
|
@@ -69,11 +77,15 @@ Codex 用户还需要在 `~/.codex/config.toml` 的 `[features]` 下打开 `mult
|
|
|
69
77
|
|------|------|
|
|
70
78
|
| Claude Code | `graphify claude install` |
|
|
71
79
|
| Codex | `graphify codex install` |
|
|
80
|
+
| Gemini CLI | `graphify gemini install` |
|
|
81
|
+
| GitHub Copilot CLI | `graphify copilot install` |
|
|
82
|
+
| Aider | `graphify aider install` |
|
|
72
83
|
| OpenCode | `graphify opencode install` |
|
|
73
84
|
| OpenClaw | `graphify claw install` |
|
|
74
85
|
| Factory Droid | `graphify droid install` |
|
|
75
86
|
| Trae | `graphify trae install` |
|
|
76
87
|
| Trae CN | `graphify trae-cn install` |
|
|
88
|
+
| Cursor | `graphify cursor install` |
|
|
77
89
|
|
|
78
90
|
**Claude Code** 会做两件事:
|
|
79
91
|
1. 在 `CLAUDE.md` 中写入一段规则,告诉 Claude 在回答架构问题前先读 `graphify-out/GRAPH_REPORT.md`
|
|
@@ -81,7 +93,13 @@ Codex 用户还需要在 `~/.codex/config.toml` 的 `[features]` 下打开 `mult
|
|
|
81
93
|
|
|
82
94
|
如果知识图谱存在,Claude 会先看到:_"graphify: Knowledge graph exists. Read graphify-out/GRAPH_REPORT.md for god nodes and community structure before searching raw files."_ —— 这样 Claude 会优先按图谱导航,而不是一上来就 grep 整个项目。
|
|
83
95
|
|
|
84
|
-
**Codex
|
|
96
|
+
**Codex** 会把规则写进 `AGENTS.md`,并在 `.codex/hooks.json` 里安装 PreToolUse hook。
|
|
97
|
+
**Gemini CLI** 会写入项目根目录的 `GEMINI.md`,并在 `.gemini/settings.json` 中注册项目级 `graphify` MCP server。
|
|
98
|
+
**GitHub Copilot CLI** 依赖全局 `~/.copilot/skills/graphify/SKILL.md`,这个端口里没有单独的项目级 hook。
|
|
99
|
+
**Aider** 会写入项目根目录的 `AGENTS.md`,并依赖全局 `~/.aider/graphify/SKILL.md`,但目前语义抽取仍是串行。
|
|
100
|
+
**OpenCode** 会写入 `AGENTS.md`,并在 `.opencode/plugins/graphify.js` 里安装项目级 `tool.execute.before` 插件,再通过 `opencode.json` 注册。
|
|
101
|
+
**Cursor** 会写入 `.cursor/rules/graphify.mdc`,并设置 `alwaysApply: true`。
|
|
102
|
+
**OpenClaw、Factory Droid、Trae、Trae CN** 会把规则写进项目根目录的 `AGENTS.md`,这些平台没有 Claude/Codex 风格的 PreToolUse hook,所以 `AGENTS.md` 是常驻机制。
|
|
85
103
|
|
|
86
104
|
卸载时使用对应平台的 uninstall 命令即可(例如 `graphify claude uninstall`)。
|
|
87
105
|
|
|
@@ -123,6 +141,7 @@ When the user types `/graphify`, invoke the Skill tool with `skill: "graphify"`
|
|
|
123
141
|
/graphify ./raw --obsidian # 额外生成 Obsidian vault(可选)
|
|
124
142
|
|
|
125
143
|
/graphify add https://arxiv.org/abs/1706.03762 # 拉取论文、保存并更新图谱
|
|
144
|
+
/graphify add https://www.youtube.com/watch?v=... # 下载视频音频,下一次 build/update 时转成 transcript
|
|
126
145
|
/graphify add https://x.com/karpathy/status/... # 拉取推文
|
|
127
146
|
/graphify add https://... --author "Name" # 标记原作者
|
|
128
147
|
/graphify add https://... --contributor "Name" # 标记是谁把它加入语料库的
|
|
@@ -150,6 +169,14 @@ graphify hook status
|
|
|
150
169
|
graphify claude install # CLAUDE.md + PreToolUse hook(Claude Code)
|
|
151
170
|
graphify claude uninstall
|
|
152
171
|
graphify codex install # AGENTS.md(Codex)
|
|
172
|
+
graphify gemini install # GEMINI.md + .gemini/settings.json(Gemini CLI)
|
|
173
|
+
graphify gemini uninstall
|
|
174
|
+
graphify copilot install # ~/.copilot/skills/graphify/SKILL.md(GitHub Copilot CLI)
|
|
175
|
+
graphify copilot uninstall
|
|
176
|
+
graphify aider install # AGENTS.md(Aider)
|
|
177
|
+
graphify aider uninstall
|
|
178
|
+
graphify cursor install # .cursor/rules/graphify.mdc(Cursor)
|
|
179
|
+
graphify cursor uninstall
|
|
153
180
|
graphify opencode install # AGENTS.md(OpenCode)
|
|
154
181
|
graphify claw install # AGENTS.md(OpenClaw)
|
|
155
182
|
graphify droid install # AGENTS.md(Factory Droid)
|
|
@@ -163,10 +190,12 @@ graphify trae-cn uninstall
|
|
|
163
190
|
|
|
164
191
|
| 类型 | 扩展名 | 提取方式 |
|
|
165
192
|
|------|--------|----------|
|
|
166
|
-
| 代码 | `.py .ts .js .go .rs .java .c .cpp .rb .cs .kt .scala .php` | tree-sitter AST + 调用图 + docstring / 注释中的 rationale |
|
|
167
|
-
| 文档 | `.md .txt .rst` |
|
|
193
|
+
| 代码 | `.py .ts .js .jsx .tsx .go .rs .java .c .cpp .rb .cs .kt .scala .php .swift .lua .zig .ps1 .ex .exs .m .mm .jl` | tree-sitter AST + 调用图 + docstring / 注释中的 rationale |
|
|
194
|
+
| 文档 | `.md .txt .rst` | 通过当前平台模型提取概念、关系和设计动机 |
|
|
195
|
+
| Office | `.docx .xlsx` | 先转换成 markdown,再交给当前平台模型做抽取 |
|
|
168
196
|
| 论文 | `.pdf` | 引文挖掘 + 概念提取 |
|
|
169
|
-
| 图片 | `.png .jpg .webp .gif` |
|
|
197
|
+
| 图片 | `.png .jpg .webp .gif` | 平台多模态视觉 —— 截图、图表、任意语言都可以 |
|
|
198
|
+
| 音频 / 视频 | `.mp4 .mov .webm .mkv .avi .m4v .mp3 .wav .m4a .ogg` | 本地检测;需要时先用 `yt-dlp` 下载音频,再用 `ffmpeg` 规范化并通过 `sherpa-onnx-node` 做本地转录,随后进入和文档相同的语义抽取路径 |
|
|
170
199
|
|
|
171
200
|
## 你会得到什么
|
|
172
201
|
|
|
@@ -204,11 +233,19 @@ Token 压缩效果会随着语料规模增大而更明显。6 个文件本来就
|
|
|
204
233
|
|
|
205
234
|
## 隐私
|
|
206
235
|
|
|
207
|
-
graphify 会把文档、论文和图片的内容发送给你所用 AI 编码助手背后的模型 API 来做语义提取 —— 可能是 Anthropic(Claude Code)、OpenAI(Codex),或者你当前平台使用的其他提供方。代码文件则完全在本地通过 tree-sitter AST
|
|
236
|
+
graphify 会把文档、论文和图片的内容发送给你所用 AI 编码助手背后的模型 API 来做语义提取 —— 可能是 Anthropic(Claude Code)、OpenAI(Codex)、Google(Gemini CLI),或者你当前平台使用的其他提供方。代码文件则完全在本地通过 tree-sitter AST 处理,不会把代码内容发出去。若你启用本分支的音频/视频转录能力,这一步会通过你本机上的 `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` 工具链完成。项目本身没有任何遥测、使用跟踪或分析。网络请求只包括你显式要求 graphify 拉取的 URL,以及语义提取阶段调用你平台自己的模型 API,使用的也是你自己的 API key。
|
|
208
237
|
|
|
209
238
|
## 技术栈
|
|
210
239
|
|
|
211
|
-
|
|
240
|
+
Graphology + Louvain(`graphology-communities-louvain`)+ tree-sitter + vis-network,再加上 `pdf-parse`、`mammoth`、`exceljs`、`turndown`,以及本分支中按 upstream 对齐的 `yt-dlp` + `ffmpeg` + `sherpa-onnx-node` 转录路径。语义提取由你当前平台运行的模型完成(Claude Code、Codex、Gemini CLI 或其他已支持客户端)。默认 HTML 输出是纯静态文件,不需要 Neo4j。
|
|
241
|
+
|
|
242
|
+
## 致谢
|
|
243
|
+
|
|
244
|
+
本仓库是 [Safi Shamsi](https://github.com/safishamsi/graphify) 原始 Graphify 项目的 TypeScript 端口。当前代码库保留了原项目的 assistant-skill 工作流和知识图谱模型,同时把受维护的 runtime 迁移到了仓库根目录的 TypeScript 实现。
|
|
245
|
+
|
|
246
|
+
## 许可证
|
|
247
|
+
|
|
248
|
+
MIT。见 [LICENSE](LICENSE)。
|
|
212
249
|
|
|
213
250
|
<details>
|
|
214
251
|
<summary>贡献</summary>
|