ashlr

ashlr__glob

Token-efficient glob matching. Uses git ls-files inside a repo; groups large results by directory with counts.

Server: ashlr-glob — servers/glob-server.ts

Replaces Claude Code's built-in Glob tool. Inside a git repo, uses git ls-files with the pattern (honors .gitignore for free). Outside git, uses a readdir walk with a default exclusion set. Output is compressed: up to 20 matches are listed verbatim. Over 20 are grouped by top-level directory, with a count and sample paths for each. A footer line reports the pattern, match count, directory count and limit.

Input schema

FieldTypeRequiredDescription
patternstringyesGlob pattern, e.g. **/*.ts or servers/*-server.ts
cwdstringnoDirectory to search in (default: cwd)
limitnumbernoMax matches to return (default: 200)

Output format

20 or fewer results (verbatim):

servers/bash-server.ts
servers/diff-server.ts
servers/efficiency-server.ts
servers/glob-server.ts
servers/tree-server.ts
[ashlr__glob] pattern "servers/*-server.ts" · 5 matches · 1 dirs · limit=200

Over 20 results (grouped by top-level directory):

scripts/ · 12 files (scripts/s0.ts, scripts/s1.ts, scripts/s10.ts, scripts/s11.ts, scripts/s2.ts, …, scripts/s8.ts, scripts/s9.ts)
servers/ · 5 files (servers/bash-server.ts, servers/diff-server.ts, servers/efficiency-server.ts, servers/glob-server.ts, servers/tree-server.ts)
site/ · 9 files (site/app/p0.ts, site/app/p1.ts, site/app/p2.ts, site/app/p3.ts, site/app/p4.ts, …, site/app/p7.ts, site/app/p8.ts)
[ashlr__glob] pattern "**/*.ts" · 26 matches · 3 dirs · limit=200

Example

Use ashlr__glob to find all server files: servers/*-server.ts

On this page