1. License
“Each contributor licenses you to do everything with this software that would otherwise infringe that contributor's copyright in it.”
The Blue Oak license grants use of the code in any product.
github.com/isaacs/node-glob/blob/main/LICENSE.md3. Used by agents' projects
Dependency in 122 public GitHub projects set up for AI coding agents that we scanned (1.9%).
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 10, 2026. Tap a verdict to see its source.How we checkedReport an error
What glob does
glob is a free Node.js library that finds files on disk by a pattern, like every .js file under src or all images in two folders. Your script gets back a plain list of file paths to read, copy, check or delete. It uses the same wildcards as the command line.
What people build with it
Collect your project's source files
A build or check script gathers every JavaScript file in the project but stays out of the huge folder of installed packages.
Gather images from several folders
A script that resizes or uploads pictures picks every png and jpeg from the css and public folders in one call.
Build pages from Markdown posts Idea
A small static site generator lists every Markdown post in the content folder and turns each into a page.
Stop a search that takes too long
On a big drive or network share, give the search a time limit so a slow folder cannot hang your tool.
Include hidden config files
A backup or packaging script also picks up files like .env or .eslintrc that a plain pattern skips.
Clean up generated files Idea
Before a fresh build, list old reports or temporary files by pattern and delete them in one pass.
glob popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How glob is used
- glob is a dependency in 122 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (2.5% of the 4,867 JavaScript/TypeScript ones), #7 of 408 in utilities.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 311; those are left out of every share on this page.
- Projects that use it most often also use tsx (50.0%), Husky (39.3%), TypeScript (86.9%).
By coding agent
Often used with
More about glob
Funding
- GitHub Sponsors: https://github.com/isaacs
- 23 GitHub sponsors
Agent Skills for it
- glob: Find files by glob pattern recursively. Results sorted by modification time (newest first). Auto-skips .git, node_modules and other common i
Alternatives
glob This page
Pick globby when your patterns are simple and you want .gitignore rules respected automatically; glob's README names it for that.
Pick fast-glob when patterns are simple and raw speed of a sync search matters most, as glob's own README suggests.
Pick tinyglobby when you want a small library for everyday patterns with few dependencies.
Get started
Tell your AI assistant
“Use glob (pin glob@14.0.4, Node.js 20+) with `import { glob } from "glob"` to list the project's files by pattern; always pass ignore: "node_modules/**", use forward slashes in patterns, and sort the result.”
Install the package named glob (not node-glob, which is a different, abandoned package).
npm i globImport the functions by name and await the list of matches.
// load using import import { glob, globSync, globStream, globStreamSync, Glob } from 'glob' // all js files, but don't look in node_modules const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' })Need it on the command line? The command moved to its own package in version 13.
npm install glob-bin
Mistakes to avoid
Version 9 moved to promises and named exports; the ESM build has no default export (our run: typeof default was undefined).
Nothing is skipped by default; our demo returned node_modules/left-pad/index.js until ignore was set.
A backslash is an escape in patterns; in our run 'src\\*.js' found nothing and found src/app.js with windowsPathsNoEscape.
The walk happens in no fixed order.
The command left the main package in version 13.
Questions
Does it skip node_modules on its own?
No. Pass ignore: "node_modules/**"; in our demo **/*.js returned node_modules files until we did.
What happens when nothing matches?
You get an empty list, unlike a shell, which prints the pattern itself.
Where did the glob command go?
Since version 13 it lives in the separate glob-bin package.
Why does my old callback code fail?
Version 9 replaced callbacks with promises and renamed the exported functions; use await glob(...).
Can I use it in a paid product?
Yes. The Blue Oak license allows it; pass on the license text or link with copies of glob's files.