Skip to content
SPECIFICTION
Get listed

ast-grep vs searchcode

ast-grep

ast-grep.github.io

searchcode

searchcode.com

Side by side

Figureast-grepsearchcode
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WebYesYes
WindowsYes—
macOSYes—
LinuxYes—
APIYesYes
Self-hosted—Yes
Plans published11
Spec score · Code Search Tools9.1 (#1)7.7 (#17)
IntegrationsThe documentation describes editor integrations, including a VS Code extension and language server support for editors such as Vim and Neovim.Setup instructions are provided for Claude Code, Claude Desktop, Cursor, VS Code/Copilot, Gemini CLI, Amp, OpenCode, Crush, Codex and LM Studio.
Purposeast-grep is a fast, polyglot tool for structural code search, linting, and rewriting at scale.Searchcode provides code intelligence dossiers for public GitHub repositories, including languages, complexity, tech stack and code quality.
SupportThe project directs users with questions or issues to GitHub or Discord and also points to Stack Overflow and Reddit.Support is available by email at [email protected].

Plans

ast-grep

  • ast-grepFree

ast-grep pricing →

searchcode

  • Free during betaFree

searchcode pricing →

In their own words

ast-grep

ast-grep is a free, open-source tool for structural code search, linting, and rewriting. It matches patterns against syntax-tree nodes, helping developers locate and change code across a codebase rather than searching plain text. Its CLI can preview and apply rewrites interactively, and scan configurable YAML rules with error, warning, info, or hint severity. Rules can combine pattern, kind, regex, relational, and composite conditions, and CLI commands help create and snapshot-test them. The project says it supports more than 20 languages and can load custom languages. JavaScript and WebAssembly APIs allow programmatic syntax-tree work; a browser playground offers a way to try patterns without local installation. Editor options include a VS Code extension and language-server setups, including for Vim and Neovim. The tool is free, has a web interface, and is distributed through package managers or built from source. Its FAQ notes that some advanced static-analysis information is unsupported, and one rule cannot target multiple languages at once.

Visit ast-grep.github.io

searchcode

searchcode provides code-intelligence dossiers for public GitHub repositories, covering languages, complexity, technology stacks, code quality, and secrets. Its MCP server exposes six tools for AI assistants, and each tool is also available as JSON over HTTP through the REST API. Analysis reports language breakdowns, complexity metrics, detected technologies, quality findings, and credentials such as API keys, tokens, and private keys with file, line, and confidence details. Search supports full text, boolean logic, regular expressions, and structural filters for declarations, usages, strings, and comments. File retrieval can return complete files, line ranges, or named symbols with nearby declarations; batch retrieval handles up to 10 files. The free beta plan covers public GitHub repositories without signup, an API key, or installation. Enterprise deployment runs on customer infrastructure as a Docker image with a Kubernetes Helm chart. Private repositories can authenticate with SSH keys or HTTPS tokens.

Visit searchcode.com