Jaylor-Wang/dsh-tool-ast-grep
AST-based structural code search and outline plugin for DeepSeek Harness powered by ast-grep: ast_search matches structural patterns with meta-variables ($NAME, $$$), node kinds and strictness modes across formatting and whitespace, and ast_outline extracts an ultra-compact structural outline (functions, classes, types, interfaces, exports) that saves 80-95% of the tokens of reading the whole file. It is invoked via child processes with JSON streaming, so it avoids shell quoting pitfalls.
dsh-tool-ast-grep adds AST-based structural code search and outline inspection to DeepSeek Harness, powered by ast-grep, for coding agents that would otherwise rely on regular-expression grep. Its ast_search tool matches structural patterns using meta-variables ($NAME, $$$), finds patterns across multiple lines regardless of formatting or whitespace, supports node-kind queries such as function_declaration or interface_declaration, offers smart/relaxed/ast/cst strictness modes and file-path or glob filtering; its ast_outline tool extracts an ultra-compact structural outline (functions, classes, types, interfaces, exports) with depth control, saving 80-95% of the tokens of reading the whole file. Both are invoked safely via child processes with JSON streaming, so they are immune to Windows shell argument escaping and quoting pitfalls.
Install
dsh plugin --profile web add dsh-tool-ast-grepCopied verbatim from the README's install block; it requires the ast-grep CLI (npm install -g @ast-grep/cli).
Compatibility
Prerequisite: the ast-grep CLI (npm install -g @ast-grep/cli). Exposes the ast_search and ast_outline tools to the DSH agent. English README with a 中文 translation.
Details
- Repo: Jaylor-Wang/dsh-tool-ast-grep
- Category: Coding & Development
- Stars: 2
- Version: GitHub repo Jaylor-Wang/dsh-tool-ast-grep (2★); npm package dsh-tool-ast-grep at 0.1.2 (registry check 2026-10-12; registry repository field resolves back to this repo).
Alternatives
030611/dsh-context-provenance · 030611/qiushi-dsh-evidence-audit · 0x3fffff/dsh-desktop-launcher