1. License
“Permission is hereby granted, free of charge, to any person obtaining a copy”
MIT allows use in paid and closed-source apps.
github.com/SuperchupuDev/tinyglobby/blob/main/LICENSE3. Used by agents' projects
Dependency in 5 public GitHub projects set up for AI coding agents that we scanned (0.1%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily; card checked Nov 11, 2026. Tap a verdict to see its source.How we checkedReport an error
What tinyglobby does
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.
What people build with 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 Idea
A small docs or blog generator gathers every Markdown page in the project, without the ones inside installed packages.
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.
tinyglobby popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How tinyglobby is used
- tinyglobby joined the catalog on its public numbers (317,170,004 downloads a week on npm and 549 GitHub stars), not on our project count: it is a dependency in 12 public GitHub projects of our scan, 5 of them set up for AI coding agents.
- Projects that use it most often also use yaml (66.7%), chalk (58.3%), tsx (58.3%).
By coding agent
Often used with
More about tinyglobby
Funding
- GitHub Sponsors: https://github.com/SuperchupuDev
- 3 GitHub sponsors
More in Build tools and bundlers
Alternatives
tinyglobby This page
Pick globby when you want .gitignore rules applied for you through its gitignore option, which tinyglobby leaves out.
Pick fast-glob when existing code depends on its exact deep option, which tinyglobby counts in a different way.
Pick glob when you want the long-standing, widely used glob package and size matters less.
Get started
Tell your AI assistant
“Use tinyglobby (pin tinyglobby@0.2.17, Node.js 12+) to list the project's files with glob(patterns, { cwd, ignore: ['node_modules/**'] }); set expandDirectories: false, sort the result, and add dot: true only if hidden files should count.”
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' });From github.com/SuperchupuDev/tinyglobby/blob/main/README.md
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' });
Mistakes to avoid
With the default, a folder name expands to every file inside it; our demo got 5 files for glob('src') and [] with expandDirectories: false.
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".
Patterns that reach outside cwd are slower, and the paths you get back are still worked out from cwd, not from the pattern.
tinyglobby ignores the trailing slash; in our run 'src/index.ts/' still returned the file src/index.ts.
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.