{
 "kind": "tool",
 "slug": "picomatch",
 "path": "tools/picomatch/",
 "name": "picomatch",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Utilities",
   "tools/utilities/"
  ]
 ],
 "lead": "Check file paths against glob patterns.",
 "chips": [
  {
   "label": "Utilities",
   "path": "tools/utilities/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install picomatch"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/micromatch/picomatch"
  },
  {
   "label": "Website",
   "href": "https://github.com/micromatch/picomatch"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "Permission is hereby granted, free of charge, to any person obtaining a copy",
   "note": "MIT allows use in paid and closed-source apps.",
   "src": "https://github.com/micromatch/picomatch/blob/master/LICENSE"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Oct 8, 2026",
   "note": "Latest GitHub release Aug 24, 2026. ",
   "src": "https://github.com/micromatch/picomatch"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "20 projects",
   "status": "info",
   "sub": "#74 of 408 in its category",
   "note": "Dependency in 20 public GitHub projects set up for AI coding agents that we scanned (0.3%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 10, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What picomatch does",
   "parts": [
    {
     "t": "prose",
     "text": "picomatch is a small free JavaScript library that answers one question: does this file path match a pattern like src/**/*.js? You give it a pattern once and get back a quick yes-or-no check. It only compares names you already have; it does not search your disk."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "React only to files that matter",
       "text": "A file watcher or build script hears about every changed file; one reused pattern check decides which ones should trigger a rebuild.",
       "idea": false
      },
      {
       "title": "Skip tests and hidden files",
       "text": "A deploy script picks every JavaScript file except tests, and leaves hidden files like .env out unless you ask for them.",
       "idea": false
      },
      {
       "title": "Accept only some upload types",
       "text": "An upload form lets through names ending in png, jpg or webp in any letter case, as a quick first filter before a real file check.",
       "idea": true
      },
      {
       "title": "Paths from Windows users",
       "text": "Paths typed on Windows use backslashes; turn on the Windows option so src\\ui\\button.js is seen as a file inside a folder.",
       "idea": false
      },
      {
       "title": "Find where a pattern starts",
       "text": "Split a pattern like src/**/*.js into the fixed folder (src) and the wildcard part, so your tool only reads the folder it needs.",
       "idea": false
      },
      {
       "title": "Pattern rules in admin settings",
       "text": "Let editors type rules like docs/** or *.pdf in a settings page to decide which stored files are public.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "picomatch popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "62",
       "of": "/ 100",
       "l": "Gid Score, #862 overall"
      },
      {
       "n": "743M",
       "l": "downloads a week, npm"
      },
      {
       "n": "1,338",
       "l": "GitHub stars"
      },
      {
       "n": "20",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How picomatch is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "picomatch is a dependency in 20 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (0.4% of the 4,867 JavaScript/TypeScript ones), #74 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 99; those are left out of every share on this page.",
      "The most used alternative in our scan is glob (122 projects).",
      "Projects that use it most often also use Zod (90.0%), Vitest (75.0%), yaml (60.0%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "17 projects, 0.5%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "14 projects, 0.5%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "6 projects, 0.2%",
       "v": "Cursor",
       "path": "agents/cursor/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 90.0% of its projects",
       "v": "Zod",
       "path": "tools/zod/"
      },
      {
       "l": "In 75.0% of its projects",
       "v": "Vitest",
       "path": "tools/vitest/"
      },
      {
       "l": "In 60.0% of its projects",
       "v": "yaml",
       "path": "tools/yaml/"
      },
      {
       "l": "In 55.0% of its projects",
       "v": "Biome",
       "path": "tools/biomejs/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "Model Context Protocol SDK (JavaScript)",
       "path": "tools/modelcontextprotocol/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "esbuild",
       "path": "tools/esbuild/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "Marked",
       "path": "tools/marked/"
      },
      {
       "l": "In 55.0% of its projects",
       "v": "tsx",
       "path": "tools/tsx/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about picomatch",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/doowb",
        "GitHub Sponsors: https://github.com/jonschlinkert",
        "4 GitHub sponsors"
       ]
      },
      {
       "title": "More in Utilities",
       "path": "tools/utilities/",
       "items": [
        {
         "text": "clsx",
         "path": "tools/clsx/"
        },
        {
         "text": "date-fns",
         "path": "tools/date-fns/"
        },
        {
         "text": "PyYAML",
         "path": "tools/pyyaml/"
        },
        {
         "text": "uuid",
         "path": "tools/uuid/"
        },
        {
         "text": "yaml",
         "path": "tools/yaml/"
        },
        {
         "text": "js-yaml",
         "path": "tools/js-yaml/"
        },
        {
         "text": "Lodash",
         "path": "tools/lodash/"
        },
        {
         "text": "tqdm",
         "path": "tools/tqdm/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "picomatch",
       "me": true,
       "facts": [
        "MIT",
        "Gid 62",
        "743M/wk"
       ]
      },
      {
       "name": "minimatch",
       "why": "Pick minimatch when you want the matcher that npm and the glob package use, with brace expansion built in.",
       "path": "tools/minimatch/",
       "facts": []
      },
      {
       "name": "micromatch",
       "why": "Pick micromatch when you need brace ranges such as {01..03} or helpers that filter whole lists; its README names it for advanced braces.",
       "path": "tools/micromatch/",
       "facts": []
      },
      {
       "name": "glob",
       "why": "Correct and fast file pattern matching for file system operations.",
       "path": "tools/glob/",
       "facts": [
        "BlueOak-1.0.0",
        "Gid 74",
        "557M/wk"
       ]
      }
     ],
     "more": "Compare picomatch with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Use picomatch (pin picomatch@4.0.7) to build one matcher per pattern at startup and filter the file paths we already have; pass {dot: true} if hidden files count and {windows: true} if paths may use backslashes."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install it into your project.",
       "code": "npm install --save picomatch",
       "src": "https://github.com/micromatch/picomatch/blob/master/README.md"
      },
      {
       "text": "Make a matcher from a pattern once, then call it on each path.",
       "code": "const pm = require('picomatch');\nconst isMatch = pm('*.js');\n\nconsole.log(isMatch('abcd')); //=> false\nconsole.log(isMatch('a.js')); //=> true\nconsole.log(isMatch('a.md')); //=> false\nconsole.log(isMatch('a/b.js')); //=> false\n",
       "src": "https://github.com/micromatch/picomatch/blob/master/README.md"
      },
      {
       "text": "Outside Node.js (a browser or an edge worker), load picomatch/posix, which has no operating-system check.",
       "code": "const picomatch = require('picomatch/posix');",
       "src": "https://github.com/micromatch/picomatch/blob/master/README.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "picomatch('*.js') to find .js files in subfolders",
       "fix": "picomatch('**/*.js'), or {basename: true} to match only the file name",
       "why": "A single * stops at a slash; in our run '*.js' gave false for 'a/b.js' and true with basename: true."
      },
      {
       "dont": "Matching Windows paths like 'src\\ui\\a.js' with picomatch(pattern) and no options",
       "fix": "Pass {windows: true}, or turn backslashes into slashes first",
       "why": "Since 3.0 a call without options uses forward slashes only; in our demo the backslash path matched '*.js' as one name and missed 'src/**/*.js'."
      },
      {
       "dont": "Expecting src/** to include src/.env or .github files",
       "fix": "Add {dot: true} when hidden files should count",
       "why": "Dotfiles are skipped by default; our demo shows src/.env matched only with dot: true."
      },
      {
       "dont": "Using picomatch to get the list of files in a folder",
       "fix": "List files with glob or tinyglobby, then use picomatch to filter names you already have",
       "why": "picomatch never touches the disk."
      },
      {
       "dont": "A lockfile still pinning picomatch below 2.3.2, 3.0.2 or 4.0.4 while users can type patterns",
       "fix": "Update to 4.0.7 (or at least 2.3.2 / 3.0.2 on old major lines)",
       "why": "4.0.4 fixed a ReDoS (CVE-2026-33671) from crafted nested extglobs, and the fix was backported to 2.3.2 and 3.0.2."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Can it find files in a folder?",
       "a": "No. It only checks path strings you give it; no library in its comparison table does file system work.",
       "evidence": {
        "url": "https://github.com/micromatch/picomatch/blob/master/README.md",
        "quote": "File system operations | - | - | - | - | - | - | - |"
       }
      },
      {
       "q": "Why does *.js not match src/app.js?",
       "a": "A single star does not cross folders. Use **/*.js, or the basename option to match only the file name.",
       "evidence": {
        "url": "https://github.com/micromatch/picomatch/blob/master/README.md",
        "quote": "Picomatch only matches nested directories with **."
       }
      },
      {
       "q": "Does it treat backslashes as folder separators on Windows?",
       "a": "Only with windows: true. A call without options uses forward slashes; with an options object, picomatch() checks the platform.",
       "evidence": {
        "url": "https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md",
        "quote": "The main picomatch() entry point applies platform detection only when an options object is provided"
       }
      },
      {
       "q": "Can I use it in the browser?",
       "a": "Yes. The picomatch/posix entry has no dependencies and skips the operating-system check.",
       "evidence": {
        "url": "https://github.com/micromatch/picomatch/blob/master/README.md",
        "quote": "For environments without node.js, picomatch/posix provides you a dependency-free matcher, without automatic OS detection."
       }
      },
      {
       "q": "Can I use it in a paid product?",
       "a": "Yes, it is MIT licensed; keep its license notice in copies you ship.",
       "evidence": {
        "url": "https://github.com/micromatch/picomatch/blob/master/LICENSE",
        "quote": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm picomatch"
  ],
  [
   "Category",
   "Utilities"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "62.1"
  ],
  [
   "Rank in category",
   "#74 of 408"
  ],
  [
   "GitHub",
   "micromatch/picomatch"
  ],
  [
   "Last change",
   "Oct 8, 2026"
  ]
 ],
 "good": [
  "It does not list or read files. To find files on disk, use a tool such as glob or tinyglobby; picomatch only checks names.",
  "A single * stays inside one folder. To reach files in subfolders, use ** in the pattern.",
  "Hidden files that start with a dot, like .env, are skipped unless you turn on the dot option."
 ],
 "checked_line": "Read by AgentGid from 7 official pages, card checked Nov 10, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/micromatch.png"
}