Skip to content

Add ast-grep support #3856

Closed
Closed

Description

@Micaso

ast-grep isn't covered yet — only grep/rg get filtered right now.
Matches are usually multi-line (whole statement/block per hit), so raw output on a repo-wide search gets big fast.
Same idea as the grep filter, just for structural search.

I tried a quick prototype locally: group matches by file, cap per-file/total, same pattern as rtk grep.
On a repo-wide test search here it cut ~1528 tokens down to ~235 (~85%). --json stays untouched since that's an explicit structured-output ask.

Happy to open a PR for this if it's a good fit — let me know if the approach makes sense or if you'd want it done differently.

Activity

  1. officiallymarky commented on Sep 7, 2026

    @officiallymarky

    Yes please!

  2. added a commit that references this issue on Sep 13, 2026
    d5364b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions