glob

The most correct and second-fastest shell-style file pattern matching library for Node.js.

Library
npm
v13.0.6
8,711 stars
BlueOak-1.0.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
58 /100 Fair
Development Activity 52
Maintenance 20
Community 60
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 87
Code Quality 88
Innovation 85
Learning Curve 82

Glob resolves shell-style wildcard patterns like **/*.js into lists of matching file paths, giving Node.js programs the same globbing power the Unix shell has at the command line. It supports globstar recursion, brace expansion, character classes, negation, and fine-grained ignore rules, returning results as arrays, async/sync iterators, or backpressure-aware Minipass streams.

Authored by Isaac Z. Schlueter and depended on by npm itself, ESLint, Mocha, and thousands of other build tools, glob is one of the most widely installed packages in the JavaScript ecosystem with hundreds of millions of weekly downloads. Version 13 is written in TypeScript, ships both ESM and CommonJS builds, and exposes a rich options surface for cwd control, symlink handling, file-type objects, and cancellation.

What You Get

  • Async and synchronous APIs (glob, globSync) that resolve to arrays of matching file paths
  • Streaming and iterator interfaces (globStream, globIterate) for processing large result sets with backpressure
  • A reusable Glob class that caches filesystem reads across repeated walks in the same directory tree
  • Rich options including globstar recursion, brace expansion, custom ignore functions, withFileTypes Path objects, and AbortSignal cancellation
  • First-class TypeScript types with dual ESM and CommonJS builds

Common Use Cases

  • Collecting source files for build tools, bundlers, and test runners
  • Selecting files to lint, format, or transform by wildcard pattern
  • Cleaning or copying files matching a pattern in scripts and task runners
  • Streaming large directory trees while filtering with custom ignore rules

Under The Hood

Architecture The public surface in src/index.ts re-exports the Glob class (src/glob.ts) and thin functional wrappers (glob, globSync, globStream, globIterate and their sync variants) that each construct a Glob and delegate to it. src/glob.ts normalizes options and parses the input into immutable Pattern objects (src/pattern.ts), which the Processor (src/processor.ts) walks against the filesystem via the GlobWalker/GlobStream machinery in src/walker.ts. Directory reads are delegated to path-scurry for cached, symlink-aware traversal, individual path segments are matched with minimatch, and results are emitted through minipass streams so async, sync, iterator, and streaming call styles all share one core walk. Ignore logic lives in src/ignore.ts, and src/has-magic.ts provides magic-character detection.

Tech Stack Written in TypeScript targeting Node 18/20/22+, glob has just three runtime dependencies: minimatch (pattern-to-regex compilation and escape/unescape), minipass (streams), and path-scurry (cached filesystem walking). It builds with tshy to emit both ESM and CommonJS outputs plus minified bundles via esbuild, is linted with oxlint, and formatted with Prettier.

Code Quality The repository has an extensive test/ directory (40+ tap test files covering absolute paths, symlinks, custom filesystems via memfs, ignore rules, Windows path handling, and bash-comparison fixtures), with tap snapshots committed. The code is strongly typed with heavily overloaded signatures so return types narrow correctly based on the withFileTypes option, and the walker separates async and sync paths explicitly rather than papering over them.

API Design The API is ergonomic and progressive: a one-line await glob('**/*.js') covers the common case, while the Glob class, streams, and iterators serve advanced needs, and a prior Glob instance can be passed as the options object to share caches. TypeScript overloads make withFileTypes return the right type automatically, and the README is exhaustive with runnable examples for every method and option. As of v13 the CLI moved to a separate glob-bin package, keeping the library dependency lean.

Used by 84 apps in this directory

TypeScript
83%
Other

AFFiNE

Collaboration · Note Taking · Productivity

72,584

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
90
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 83%
Rust 10%
Updated 1 weeks ago
TypeScript
63%
MIT

ALTCHA

Security

2,750

A self-hosted, privacy-first CAPTCHA alternative that uses memory-hard proof-of-work to stop bots without cookies, tracking, or third-party APIs.

View details
70
Repo Health
79
Technical
75
Dependency
Built with
TypeScript 63%
Svelte 29%
Updated 1 weeks ago
TypeScript
96%
Other

Amplication

AI Code Assistants · Automation · Developer Tools

16,013

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
59
Repo Health
84
Technical
60
Dependency
Built with
TypeScript 96%
Updated 2 months ago
TypeScript
68%
Apache 2.0

Appsmith

Automation · Developer Tools · No Code Platforms

40,871

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
94
Repo Health
79
Technical
66
Dependency
Built with
TypeScript 68%
Java 21%
Updated 1 weeks ago
Python
68%
Other

Baserow

Databases · No Code Platforms

5,895

Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Python 68%
JavaScript 16%
Vue 11%
Updated 1 weeks ago
Go
92%
AGPL 3.0

BillionMail

Marketing

15,596

Self-hosted email server and marketing platform that gives you unlimited sending, full deliverability control, and AI-assisted campaigns without monthly fees.

View details
53
Repo Health
74
Technical
70
Dependency
Built with
Go 92%
Updated 3 months ago
TypeScript
100%
MIT

Botpress

AI Assistants · AI Development · Customer Support

14,916

The open-source hub for building and deploying LLM-powered AI agents with TypeScript-first tooling, 40+ integrations, and a revolutionary code-execution agent framework.

View details
95
Repo Health
82
Technical
64
Dependency
Built with
TypeScript 100%
Updated 1 weeks ago
TypeScript
99%
Apache 2.0

Bubble Lab

AI Development · Automation

1,093

Open-core workflow engine for building AI-powered automations in TypeScript that run natively inside Slack — no context switching required.

View details
35
Repo Health
78
Technical
71
Dependency
Built with
TypeScript 99%
Updated 4 months ago
Java
72%
Other

ByteChef

AI Agents · Automation

1,002

Unified open-source platform for AI agent orchestration and workflow automation with 180+ connectors, MCP support, and durable execution.

View details
85
Repo Health
82
Technical
67
Dependency
Built with
Java 72%
TypeScript 27%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers