m1khal3v/dsh-tool-codegraph

CodeGraph navigation tools for DeepSeek Harness

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH), that wraps the open-source codegraph CLI to provide fast AST/tree-sitter based code indexing and navigation for large codebases. It splits the full functionality into ten separate focused tools, covering index status check, symbol search, caller/callee lookup, change impact analysis, project structure exploration and more. It also automatically injects usage rules into the agent’s system prompt following an orientation-first workflow that keeps large exploration responses out of the main session, and you can install it directly to your DSH environment with a single official CLI command.

The plugin follows an orientation-first workflow that prioritizes fast, lightweight lookups directly in the main agent session. It transparently notes that caller/callee and impact analysis may miss dynamic dispatch edges, and explicitly tells the model when to fall back to grep-based search if needed. Any heavy exploration work that generates large outputs is automatically routed to a subagent to avoid clogging the main agent session. This design makes it ideal for developers working with large complex codebases who need reliable, fast, accurate code navigation and change impact analysis from their DSH agent.

To use this plugin, you must have Node.js version ^22.19 or >=24 installed, and you need to install the codegraph CLI separately and ensure its binary is available on your system PATH. You can override the default codegraph executable path in the plugin configuration, plus set custom timeout values for both regular and long-running indexing commands to suit your system. On first run, you have to manually initialize the project code index with the codegraph init command, and if the binary or index is missing, the plugin gracefully falls back to standard grep-based search and is released under the permissive MIT open source license.

这是专门为DeepSeek Harness开发的原生插件,封装了开源的codegraph命令行工具,基于AST和tree-sitter提供快速代码索引能力,将不同功能拆分为十个专注的代码导航工具,支持查询符号、查找调用关系、分析修改影响、浏览项目结构等多种操作,可通过官方dsh命令直接安装到DSH环境中使用。

它采用面向定位的工作流,会自动将标准使用规则注入到agent的系统提示中,每个操作对应一个独立的专用工具,避免了大而全的单工具冗余模式,支持O(1)快速索引查询,探索类大任务会路由到子代理处理,帮助开发人员快速梳理代码结构,适合需要快速在大型代码库中导航分析代码的开发人员使用。

本插件依赖Node.js 22.19以上版本或Node.js 24及以上版本,还需要用户提前安装codegraph CLI,并确保其二进制文件位于系统PATH环境变量中,支持自定义可执行文件路径和超时配置,遵循MIT开源许可,首次使用需要用户手动执行codegraph init初始化索引,插件本身不会自动触发索引创建。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin add --profile web @m1khal3v/dsh-tool-codegraph

把 m1khal3v/dsh-tool-codegraph 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

npm DeepSeek Harness MIT License

dsh-tool-codegraph

CodeGraph navigation tools for DeepSeek Harness.
A DSH plugin that wraps the open-source codegraph CLI (an AST/tree-sitter code index) into ten focused agent tools — status, search, callers/callees, impact, explore, and more.

This package is a thin wrapper. All indexing and querying is done by the codegraph CLI — install it first and make sure its binary is on PATH.


⚡️ Highlights

  • 🧭 Orientation-first workflow — usage rules (status → sync → explore → targeted lookups) are injected into the agent system prompt automatically.
  • 🧰 Ten focused tools, one per operation — no mega-tool with an action parameter.
  • ⚡ O(1) indexed lookups — light outputs for the main session, heavy explore builds routed to subagents.
  • ⚠️ Honest about soundness — callers/callees/impact can miss dynamic-dispatch edges; the prompt tells the model when to fall back to grep.

🛠 Requirements

  • Node ^22.19 || >=24
  • The codegraph CLI available on PATH (override via the executable config key)

🚀 Quick Start

1. Install the plugin

dsh plugin add --profile web @m1khal3v/dsh-tool-codegraph

2. Check the wrapped CLI

codegraph status

If the binary is missing, the tools reply with an install hint and the agent falls back to grep-based search.

3. Initialize the index — your call

There is deliberately no init tool in the set above: following the codegraph project's own recommendation, indexing should be kicked off by the user, not by an agent. When codegraph status reports a missing index, run it yourself:

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-discord 下一个 Next deepseek-harness-server →