# globby

> Glob matching for Node.js with negated patterns, directory expansion and .gitignore support

Source: https://talira.ai/catalog/globby-wn2ptymw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / filesystem](https://talira.ai/categories/libraries/filesystem), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^3]
- Pricing: Free and open source[^3]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^3]
- Backed by: [Sindre Sorhus](https://talira.ai/orgs/sindresorhus.md)

globby is Sindre Sorhus's Node.js library for matching files with glob patterns, built on fast-glob. It takes several patterns at once, negated and negation-only patterns, expands a directory into everything under it, and respects .gitignore files the way Git does (including parent ones up to the repository root, and the global gitignore), or any ignore file with the same syntax such as .prettierignore. It has promise, sync and stream APIs and accepts a URL as the working directory.

## Links

- GitHub: https://github.com/sindresorhus/globby

## Problems it solves

- find files matching glob patterns in my Node.js script while skipping what .gitignore ignores
- match files with several patterns and exclusions in one call in Node
- list files in a directory tree without walking node_modules

## Features

- multiple and negated glob patterns
- directory expansion
- .gitignore and other ignore files, as Git applies them
- promise, sync and stream APIs

## Limitations

- Patterns must use forward slashes: on Windows, patterns with backslashes silently fail[^1]
- ESM only and needs Node.js 20 or newer[^2]

## Trust

Overall: 0.45 out of 1.
Signals: maintenance 0.45, adoption 0.69, momentum 0.39, community 0.69, backing 0.30, extensibility 0.00.

- last commit 3 months ago
- latest release v16.2.4 3 months ago
- 2.7k GitHub stars
- 51 contributors
- accepts sponsorship (Github, Open Collective, Buy Me A Coffee)
- backed by Sindre Sorhus

## Alternatives

- [glob](https://talira.ai/catalog/glob-x01zjgdr.md): Match files using the patterns the shell uses
- [minimatch](https://talira.ai/catalog/minimatch-nfwzcs0d.md): Glob matching for JavaScript, without regular expressions
- [fast-glob](https://talira.ai/catalog/fast-glob-410drv62.md): Very fast and efficient glob library for Node.js
- [del](https://talira.ai/catalog/del-x22je8ym.md): Delete files and directories by glob in Node.js, with a promise API
- [rimraf](https://talira.ai/catalog/rimraf-dg86ye06.md): rm -rf for Node.js, cross-platform

## Sources

[^1]: https://github.com/sindresorhus/globby/blob/main/readme.md (checked 29 Nov 2026)
[^2]: https://github.com/sindresorhus/globby/blob/main/package.json (checked 29 Nov 2026)
[^3]: https://github.com/sindresorhus/globby/blob/main/license (checked 29 Nov 2026)
