# tinyglobby — card for AI agents

Fast minimal glob pattern matcher as alternative to globby.

Category: Build tools and bundlers · npm package `tinyglobby` · latest version 0.2.17 (checked 2026-11-01)
Install: `npm install tinyglobby`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Numbers (AgentGid data)
- Gid Score: 50.9 (#1864 of all tools, 104 of 185 in its category)
- Used in 5 public projects set up for AI coding agents (0.1%)
- Downloads last week: 317,170,004 (as of 2026-11-24), +40.1% over 4 weeks
- GitHub stars: 549 (as of 2026-11-24)
- Last push: 2026-11-23

## Often used with
yaml 66.7%, chalk 58.3%, tsx 58.3%, Vitest 66.7%, Model Context Protocol SDK (JavaScript) 50.0%, Clack Prompts 41.7%

## Links
- AgentGid page: https://agentgid.com/tools/tinyglobby/
- Homepage: https://superchupu.dev/tinyglobby
- Repository: https://github.com/SuperchupuDev/tinyglobby


## tinyglobby: find files by pattern in Node.js

tinyglobby is a small free JavaScript library that finds files in a folder by a pattern like src/**/*.ts. Your build script or tool gets back a list of matching file paths, with tests, hidden files or other folders left out as you ask. It is a lighter stand-in for the older globby and fast-glob libraries.

### Where to use it
- Pick source files for a build: A build or lint script needs every TypeScript file in src except tests and type files; one call returns that list.
- Swap out globby or fast-glob: Your project or a package you maintain uses globby or fast-glob; switching to tinyglobby keeps the same calls with far fewer extra packages to install.
- Collect docs pages for a site: A small docs or blog generator gathers every Markdown page in the project, without the ones inside installed packages. (idea, not from the official pages)
- Stop a search that runs long: A tool that searches a big or unknown folder gives up after a second instead of making the user wait.
- Folders with brackets in names: A user picks a folder called photos (1) or [draft]; escape its name first so the brackets are read as plain letters, not as pattern signs.
- Find hidden config files: A setup checker looks for files like .env or .prettierrc, which a normal search skips because their names start with a dot.

### How to start
- Add tinyglobby to your project; it runs on Node.js 12 or newer and pulls in only two small helper packages.
- Call glob (returns a promise) or globSync with one pattern or a list; patterns starting with ! leave files out.

```
import { glob, globSync } from 'tinyglobby';

await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' });
globSync('src/**/*.ts', { ignore: '**/*.d.ts' });
```

- Search inside a folder by setting cwd; results come back relative to it unless you turn on absolute.

```
import { glob } from 'tinyglobby';
const files = await glob('src/**', { cwd: './projects/best-cats' });
```


### License
Free to use in any project, including paid and closed-source ones, under the MIT license. Keep the license notice when you ship its files.

### Good to know
- It does not read .gitignore files. The guide shows a workaround that asks git for the ignored files and passes them as ignore patterns.
- The order of the files in the result can change between runs, so sort the list if order matters.
- Files and folders whose names start with a dot, like .env, are skipped unless you turn on the dot option.
- A few rare brace forms such as {01..03} are not supported; the page says no user has reported a problem from this.
- The project is alive; version 0.2.17 came out on 30 May 2026 and was still the newest on 11 November 2026.

Checked 2026-11-11 against: https://superchupu.dev/tinyglobby, https://superchupu.dev/tinyglobby/documentation, https://superchupu.dev/tinyglobby/migration, https://superchupu.dev/tinyglobby/comparison, https://github.com/SuperchupuDev/tinyglobby/blob/main/README.md, https://github.com/SuperchupuDev/tinyglobby/blob/main/CHANGELOG.md, https://github.com/SuperchupuDev/tinyglobby/blob/main/LICENSE, https://github.com/SuperchupuDev/tinyglobby/releases, https://registry.npmjs.org/tinyglobby, https://registry.npmjs.org/tinyglobby/0.2.17

### Mistakes to avoid
- Don't: Switching from fast-glob and keeping the same calls, like glob('src') → Do: Pass expandDirectories: false (it is on by default only to copy globby) (With the default, a folder name expands to every file inside it; our demo got 5 files for glob('src') and [] with expandDirectories: false.)
- Don't: glob({ patterns: ['src/**'] }) (patterns inside the options, the old form) → Do: glob(['src/**'], { ...options }) with the patterns as the first argument (Version 0.2.15 deprecated patterns in the options object; in our run passing both threw "Cannot pass patterns as both an argument and an option".)
- Don't: await glob(`${dir}/*.ts`, { absolute: true }) with no cwd → Do: await glob('*.ts', { absolute: true, cwd: dir }) (Patterns that reach outside cwd are slower, and the paths you get back are still worked out from cwd, not from the pattern.)
- Don't: Expecting a pattern with a trailing slash, like src/index.ts/, to match only folders → Do: Use onlyDirectories: true when you want folders only (tinyglobby ignores the trailing slash; in our run 'src/index.ts/' still returned the file src/index.ts.)
- Don't: Treating the result of a glob with signal as complete → Do: Check whether the signal fired (signal.aborted) before trusting the list (When the signal aborts, the search stops and returns what it has without an error; in our run an aborted signal returned [].)

### Questions
- Can I just replace fast-glob with it? Mostly yes, but set expandDirectories: false, because tinyglobby turns it on by default to match globby.
- Does it skip files listed in .gitignore? No. There is no gitignore option; the migration guide shows a workaround with git ls-files.
- If I pass an absolute path as the pattern, do I get absolute paths back? No. Results are relative to cwd whatever the pattern looks like; turn on absolute: true to get full paths.
- Can I search a fake or in-memory folder, for example in tests? Yes. The fs option takes your own readdir, realpath and stat functions instead of Node's.
- Can I use it in a paid product? Yes, it is MIT licensed; keep its license notice in copies you ship.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
