Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Mines git history for file co-change patterns into a queryable knowledge graph via MCP.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"graphkeeper": {
"command": "uvx",
"args": [
"graphkeeper-cli",
"graphkeeper-mcp"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add graphkeeper -- uvx graphkeeper-cli graphkeeper-mcpวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"graphkeeper": {
"command": "uvx",
"args": [
"graphkeeper-cli",
"graphkeeper-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"graphkeeper": {
"type": "stdio",
"command": "uvx",
"args": [
"graphkeeper-cli",
"graphkeeper-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub RudrenduPaul ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.5) เข้า registry 3 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
Install • Quickstart • CLI Reference • Comparison • FAQ
A local-only CLI that mines your git log for which files actually change together, then hands an AI coding agent a queryable answer instead of a grep across the whole history.
npx graphkeeper-cli build
npx graphkeeper-cli query co-change src/git.ts
Files that historically change alongside "src/git.ts":
1 src/store.ts 1 src/types.ts 1 test/git.test.ts 1 test/store.test.ts 1 test/test-helpers.ts
(Real output from running GraphKeeper against its own repo, this early in its history. Co-change counts grow as a codebase accumulates more commits.)
No server, no account, no embeddings API. Every byte of output comes from git log on the repo you already have checked out.
GraphKeeper ships two independent, equally first-class packages. Pick whichever fits your toolchain, or install both. Both mine the same git log co-change signal and share one on-disk .graphkeeper/graph.json schema, so a store built by either can be read back by the other.
# npm -- JavaScript/TypeScript CLI + library
npm install -g graphkeeper-cli
npx graphkeeper-cli build
pip install graphkeeper-cli
The npm package requires Node.js 18 or later; the Python package requires Python 3.9 or later. Both require git on your PATH. The Python package's CLI entry point is also graphkeeper (e.g. graphkeeper build). See python/README.md for the Python-specific walkthrough, and CHANGELOG.md for each distribution's version history.
Run it against any git repo, including this one:
git clone https://github.com/RudrenduPaul/GraphKeeper.git
cd GraphKeeper graphkeeper build
GraphKeeper build complete: /path/to/GraphKeeper
Co-change graph: 4 commit(s) analyzed, 80 file pair(s) found graphify enrichment: skipped -- graphify was not found on PATH. Install it with uv tool install graphifyy (or pipx install graphifyy) for symbol/call-graph enrichment; GraphKeeper works fine without it, in co-change-only mode.
Wrote /path/to/GraphKeeper/.graphkeeper/graph.json
Now query it:
graphkeeper query co-change src/git.ts
Files that historically change alongside "src/git.ts":
1 src/store.ts 1 src/types.ts 1 test/git.test.ts 1 test/store.test.ts 1 test/test-helpers.ts
If graphify is installed (uv tool install graphifyy), graphkeeper build automatically shells out to its local, no-API-key graphify extract --code-only and merges its symbol/call-graph into the same store, unlocking call-graph queries:
graphkeeper query calls mineCoChange
mineCoChange() (src/git.ts)
Calls (2): --> assertIsGitRepo() --> runGit()
Called by (1): <-- build()
(Also real output, from running graphkeeper build against this repo with graphify installed.)
Without graphify installed, that same command explains exactly why the answer isn't available instead of crashing or returning an empty result:
Call-graph query for "mineCoChange" is not available.
graphify was not found on PATH. Install it with uv tool install graphifyy (or pipx install graphifyy) for symbol/call-graph enrichment; GraphKeeper works fine without it, in co-change-only mode.
Every command also supports --json for scripts and agents:
graphkeeper query co-change src/git.ts --json
{
"file": "src/git.ts", "results": [ { "file": "src/store.ts", "count": 1 }, { "file": "src/types.ts", "count": 1 }, { "file": "test/git.test.ts", "count": 1 }, { "file": "test/store.test.ts", "count": 1 }, { "file": "test/test-helpers.ts", "count": 1 } ] }
graphkeeper build runs git log --no-merges --name-only across the full history of the repo and counts every file pair that changed together in the same commit. There's no guessing at coupling from folder structure or import statements alone; the answer comes from how the codebase actually got edited over time.PATH, graphkeeper build shells out to its local graphify extract --code-only --no-cluster and merges the resulting symbol/call edges into the same store, unlocking graphkeeper query calls. Without graphify, GraphKeeper still works in co-change-only mode and says so plainly instead of failing.graphkeeper query co-change --json and the equivalents return machine-readable output, so an agent's calling code parses a real data structure instead of scraping text.src/, TypeScript) and the PyPI package (python/src/graphkeeper/, Python) are independent ports, not a wrapper of one around the other. Both read and write the same .graphkeeper/graph.json, so a store built with one CLI is queryable from the other.spawnSync/subprocess.run with a list of arguments, so a crafted commit message or filename in the repo being analyzed can't be interpreted as shell syntax.Usage: graphkeeper [options] [command]
Options: -V, --version output the version number -h, --help display help for command
Commands: build [options] [path] Mine git history for co-change and (if available) merge in graphify's symbol/call graph query Query the GraphKeeper store built by graphkeeper build help [command] display help for command
graphkeeper build [path]Walks path (default: current directory), runs git log --no-merges --name-only across the whole history, and counts how often each pair of files was touched in the same commit. Writes the result to .graphkeeper/graph.json.
| Option | Description |
|---|---|
--json | emit machine-readable JSON instead of human-readable text |
--max-files-per-commit | skip commits touching more than this many files (default: 100), keeping a single mass-reformat or vendoring commit from drowning out real co-change signal |
--no-graphify | skip graphify enrichment even if graphify is installed |
If graphify is detected on PATH, build also runs graphify extract --code-only --no-cluster (graphify's own headless, local, no-API-key AST extraction path) into a directory inside .graphkeeper/, and merges its nodes/edges into the same store. The build output always states plainly whether that enrichment was included, and why it was skipped if not.
graphkeeper query co-change Lists files that historically changed alongside , ranked by how many commits touched both.
| Option | Description |
|---|---|
--json | emit machine-readable JSON instead of human-readable text |
--limit | cap the number of results |
--graph | path to a specific graph.json (default: /.graphkeeper/graph.json) |
Exit code 0 when results are found, 1 when there's no co-change data for that file yet, 2 on a usage or filesystem error.
graphkeeper query calls Shows callers and callees of , using graphify's calls edges from the most recent build. Only meaningful when that build included graphify enrichment; if it didn't, this prints a clear explanation of why instead of a crash or a silent empty result.
| Option | Description |
|---|---|
--json | emit machine-readable JSON instead of human-readable text |
--graph | path to a specific graph.json (default: /.graphkeeper/graph.json) |
Exit code 0 when the symbol is found, 1 when it isn't (or enrichment wasn't available), 2 on a usage or filesystem error.
GraphKeeper ships a Model Context Protocol server so an AI coding agent (Claude, Cursor, or any MCP-compatible client) can mine co-change history and query the graph directly, without a human invoking the CLI by hand.
Install the extra:
pip install "graphkeeper-cli[mcp]"
Add it to your MCP client's config (for Claude Desktop, claude_desktop_config.json):
{
"mcpServers": { "graphkeeper": { "command": "uvx", "args": ["--from", "graphkeeper-cli", "graphkeeper-mcp"] } } }
The server exposes one tool, run, that shells out to the published graphkeeper-cli npm package (via npx graphkeeper-cli) with the given subcommand and arguments plus --json, and returns the parsed JSON result:
run(["build", "."])
run(["query", "co-change", "src/git.ts"])
Transport is stdio, so there is nothing to host: the MCP client spawns the server as a local subprocess. Source: python/src/graphkeeper/mcp_server.py.
Both packages expose a real importable surface, listed below. The command line is a thin wrapper over the same functions.
graphkeeper-cli on npm)import { build, queryCoChange } from "graphkeeper-cli";
const result = build("."); console.log(${result.store.commitsAnalyzed} commit(s) analyzed);
const coChange = queryCoChange(result.store, "src/git.ts"); for (const row of coChange.results) { console.log(row.count, row.file); }
| Export | Signature | |
|---|---|---|
build | build(targetPath: string, options?: BuildOptions): BuildResult | |
queryCoChange | queryCoChange(store: GraphKeeperStore, file: string, options?: { limit?: number }): CoChangeQueryResult | |
queryCalls | queryCalls(store: GraphKeeperStore, symbol: string): CallsQueryResult | |
findGraphifyNode | `findGraphifyNode(nodes: GraphifyNode[], symbol: string): GraphifyNode \ | null` |
normalizeFileArg | normalizeFileArg(store: GraphKeeperStore, file: string): string |
| detectGraphify | `detectGr
ตัดมาแค่ช่วงต้น อ่านต่อใน repo