picomatch

Blazing-fast JavaScript glob pattern matching library with zero dependencies. The underlying engine used by micromatch, chokidar, rollup, and other major tools. Converts glob patterns to regular expressions with support for extglob, brace expansion, and negation. Lower-level than micromatch — designed for library authors who need the pattern compiler directly without the higher-level array filtering API.

Evaluated Mar 06, 2026 (0d ago) v4.x
Homepage ↗ Repo ↗ Developer Tools glob pattern-matching picomatch wildcard file filter fast
⚙ Agent Friendliness
66
/ 100
Can an agent use this?
🔒 Security
100
/ 100
Is it safe for agents?
⚡ Reliability
91
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
72
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
100
Secret Handling
100

Zero dependencies, local computation, MIT licensed. No security concerns.

⚡ Reliability

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

Best When

You're building a library or performance-critical tool that needs efficient glob pattern compilation — picomatch is the foundation that tools like micromatch and chokidar use.

Avoid When

You're building an application (not a library) — use micromatch instead, which wraps picomatch with a more convenient array-filtering API.

Use Cases

  • Build file watchers and build tools that need to test whether paths match glob patterns with maximum performance
  • Implement custom file filtering logic in build pipelines where micromatch's array API adds unnecessary overhead
  • Create reusable glob matchers that can be compiled once and tested against many paths efficiently
  • Write library code that needs glob pattern support without taking micromatch as a dependency
  • Validate path patterns in agent configuration systems with precise control over matching behavior

Not For

  • End-user applications — micromatch provides a friendlier higher-level API built on picomatch
  • Filesystem traversal — picomatch only matches strings against patterns; use fast-glob for filesystem discovery
  • Regular expression patterns — picomatch handles glob syntax only

Interface

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

Authentication

Methods: none
OAuth: No Scopes: No

Local library — no authentication required. MIT licensed.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed. Zero cost. Zero dependencies.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • picomatch() returns a FUNCTION — call it to create a matcher, then call the matcher with a string: const isMatch = picomatch('*.js'); isMatch('foo.js') // => true
  • Compile patterns once and reuse — picomatch caches compiled regexes by default, but creating new picomatch() calls in loops is unnecessary work
  • Windows paths: backslashes must be normalized to forward slashes before matching — set { windows: true } option or normalize manually
  • Dot files require { dot: true } option — hidden files starting with . are excluded by default like standard glob behavior
  • v3+ changed some matching semantics around ** and trailing slashes — test against actual paths if upgrading from v2
  • Low-level API — for most use cases, micromatch is the better choice; picomatch is the engine for library authors

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for picomatch.

$99

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

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