DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-tool-ast-grep

d

dsh-tool-ast-grep

Manifest valid

AST-based structural code search and syntax outline tool powered by ast-grep.

hasBundlePatch

dsh-tool-ast-grep

English | 中文

npm version license GitHub release

AST-based structural code search and outline plugin for DeepSeek Harness (DSH), powered by ast-grep.

Provides structural code searching and outline inspection capabilities for coding agents, dramatically outperforming traditional regular expression search (grep) in token efficiency and semantic accuracy.


Features

  • ast_search: Search code structures using AST patterns and meta-variables ($NAME, $$$).
    • Finds structural patterns across multiple lines regardless of formatting or whitespace.
    • Supports node kind queries (e.g. function_declaration, interface_declaration, class_declaration).
    • Supports strictness modes (smart, relaxed, ast, cst).
    • Supports file path and glob filtering.
  • ast_outline: Extract an ultra-compact structural outline (functions, classes, types, interfaces, exports) from a source file.
    • Saves 80%–95% tokens compared to reading the entire file.
    • Supports depth control (top-level vs. nested methods).
  • Zero Shell Quoting Issues: Invoked safely via child processes with JSON streaming — immune to Windows shell argument escaping and quoting pitfalls.

Prerequisites

This plugin requires ast-grep CLI installed on your machine:

  • npm:
    npm install -g @ast-grep/cli
    
  • pip:
    pip install ast-grep-cli
    
  • cargo:
    cargo install ast-grep --locked
    
  • brew (macOS/Linux):
    brew install ast-grep
    

Verify with:

ast-grep --version

Installation in DSH

Option 1: Via DSH Market (Recommended)

Once published and indexed, search for dsh-tool-ast-grep in Settings → Plugin Market and click Install.

Or run in terminal:

dsh plugin --profile web add dsh-tool-ast-grep

Option 2: Mount in an Agent Preset

In your agent configuration (e.g. ~/.dsh/.agent-presets/your-agent/agent.cordis.yml):

id: my-agent
name: My Agent
tools:
  - id: tool-ast-grep
    name: dsh-tool-ast-grep
    config:
      maxResults: 50
      timeoutMs: 60000

Tool API Overview

1. ast_search

ParameterTypeDescription
patternstringAST pattern, e.g. function $NAME($$$) { $$$ } or $OBJ.push($ITEM)
kindstringAST node kind, e.g. class_declaration, function_declaration
pathstringDirectory or file path to search in (defaults to workspace root)
langstringLanguage override (ts, tsx, js, jsx, python, rust, go, etc.)
globsstringFile glob pattern to include/exclude (e.g. src/**/*.ts)
limitintegerMax matches to return (default: 50)

2. ast_outline

ParameterTypeDescription
file_pathstringPath of the file to inspect
langstringLanguage override (auto-detected if omitted)
depthinteger1 for top-level only (default), 2 to include class methods

Supported Languages

TypeScript (ts, tsx), JavaScript (js, jsx), Python (py), Rust (rs), Go (go), Java (java), C (c, h), C++ (cpp, hpp, cc).


License

MIT © Jaylor Wang (Jaylor-Wang)

Comments

Loading…

Similar plugins

dsh-tool-lens

by trench-xinxin

Deterministic AST code graph and architecture intelligence tool for call hierarchies, blast radius, circular dependencies, domain slices, and full-stack API contracts.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 4

↓ 277/wk

MIT

TypeScript

Aug 18, 2026

dsh plugin --profile web add @trench-xinxin/dsh-tool-lens

by xiaoso456

DeepSeek Harness 基础工具增强:持久 bash、结构化 read、多模式 edit、原子 write、双引擎 grep/glob、图像直读,一个插件全覆盖

Tools & CapabilitiesManifest valid

★ 8

↓ 404/wk

MIT

TypeScript

Oct 8, 2026

dsh plugin --profile web add @xiaoso/dsh-tool-plus

by he-yufeng

Repo reading-map tool for DeepSeek Harness: a structured, priority-ranked map of any codebase before the agent edits it

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 0

MIT

TypeScript

Sep 14, 2026

dsh plugin --profile web add dsh-tool-reading-map

by GooDAnDReaDY

AST-based context compression, test log filtering, and token budget guard for DeepSeek Harness: strips redundant syntax, prunes noisy log lines, and enforces a token ceiling so the context window neve

Tools & CapabilitiesMemory & ContextTerminal & ClientsDevelopment & InfrastructureManifest valid

★ 2

↓ 1.9k/wk

MIT

JavaScript

Sep 26, 2026

dsh plugin --profile web add @goodandready/dsh-context-lens

by MkaliezZ

Lightweight read-only repository structure and symbol map for DSH; complements dsh-context-pack.

Development & InfrastructureManifest valid

★ 0

MIT

TypeScript

Aug 29, 2026

dsh plugin --profile web add @mkaliezz/dsh-repo-map

by amplifthq

A curated distribution of DeepSeek Harness. Overlay, not a fork.

Dev presetsManifest valid

★ 16

↓ 190/wk

MIT

TypeScript

Sep 5, 2026

dsh plugin --profile web add oh-my-dsh