DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to count matches in a huge tree without flooding output with Aside Codemode

Get a match count and file count from a very large tree in one short result.

Short answer: Run npm install -g aside-codemode; then run codemode --install-mcp; run codemode --doctor and confirm the state reads activated. All steps.

Who it is forAn engineer in Aside checking how often a symbol or pattern appears across a repository with a very large file count.

The problemA plain recursive grep can emit millions of lines, which buries the answer before it arrives.

The outcomeThe agent returns a compact count, such as total matching lines and matching files, in a few hundred bytes.

What you need first

  • Node.js 18 or newer
  • Aside installed with its daemon running on macOS or Windows
  • ripgrep on the PATH for the CLI route (the MCP route uses Aside's bundled ripgrep automatically)
  • Browsing turned on in Aside for the browser batch use case

Steps

  1. Run npm install -g aside-codemode
  2. Run codemode --install-mcp
  3. Run codemode --doctor and confirm the state reads activated
  4. Ask the agent to run search.count over the tree with the pattern you want

Prompt for your agent

Use the aside-codemode execute_code tool to run search.count for <pattern> under <root folder> and return the matching line count and file count. Verify the totals against a small known subfolder before trusting the full-tree figure.

Caveat. The 2,966 ms count and 127,000-file figure come from one controlled measurement against codemode 0.8.1, so timings on your tree will differ.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for lidge-jun/aside-codemode and "Count matches in a huge tree without flooding output"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer