fast-glob

Extremely fast glob library for Node.js. fast-glob provides filesystem pattern matching (*.ts, src/**/*.test.js, !node_modules/**) with Promise and stream-based APIs. Up to 3-8x faster than competing glob libraries by using micromatch for pattern matching and walking the filesystem efficiently. Used by Vite, Vitest, ESLint, and many build tools that need fast file discovery.

Evaluated Mar 06, 2026 (0d ago) v3.x
Homepage ↗ Repo ↗ Developer Tools javascript node glob filesystem pattern-matching fast open-source
⚙ Agent Friendliness
67
/ 100
Can an agent use this?
🔒 Security
89
/ 100
Is it safe for agents?
⚡ Reliability
89
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
80
Auth Simplicity
100
Rate Limits
98

🔒 Security

TLS Enforcement
90
Auth Strength
90
Scope Granularity
88
Dep. Hygiene
88
Secret Handling
88

Local filesystem library — no network calls. Path traversal risks if patterns include user-supplied input — validate and sanitize glob patterns before use in agent file operations.

⚡ Reliability

Uptime/SLA
92
Version Stability
90
Breaking Changes
90
Error Recovery
85
AF Security Reliability

Best When

You need fast filesystem file discovery with glob patterns in a Node.js agent tool — fast-glob's performance makes it the standard choice for build tools and code analysis pipelines.

Avoid When

You need real-time file watching (use chokidar) or you're matching patterns against strings without filesystem traversal (use micromatch).

Use Cases

  • Discover agent source files matching patterns — find all Python files, exclude test directories, collect configs for processing
  • Build file manifest lists for agent code analysis pipelines — collect all TypeScript files in src/, excluding vendor directories
  • Stream large file sets for agent processing without loading all paths into memory — use fast-glob stream mode for large codebases
  • Generate dynamic import lists or watch file lists for agent development tools based on glob patterns
  • Implement project-wide search for agent code intelligence tools — find all files matching code patterns across directories

Not For

  • Simple string glob matching without filesystem traversal — use micromatch or picomatch for pattern testing without filesystem access
  • Real-time file watching — use chokidar for watching file system changes; fast-glob is one-time scan
  • Applications where glob is not the bottleneck — for simple patterns on small directories, the built-in glob module may be sufficient

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local filesystem library — no external auth or network calls.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT-licensed open source npm package.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Negation patterns (!**/node_modules/**) must be in the patterns array, not as a separate parameter — placing negation in the wrong location causes it to be treated as an affirmative pattern
  • fast-glob always returns forward-slash paths on all platforms (including Windows) — normalize paths with path.sep when comparing with os.path utilities in cross-platform agent code
  • Braces {a,b} in patterns are expanded before matching — avoid braces in file paths passed as arguments; escape them or use multiple patterns instead
  • The onlyFiles option (default: true) excludes directories — pass onlyDirectories: true or onlyFiles: false when agent needs to include directory paths in results
  • Symlinks to directories are followed by default — use followSymbolicLinks: false to prevent following symlinks that could cause infinite recursion in circular symlink setups
  • Pattern with absolute paths must use forward slashes — on Windows, C:\path\to\file must be C:/path/to/file in fast-glob patterns; use pathToFileURL for safe cross-platform path handling

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for fast-glob.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered