gray-matter
Parser extracting YAML/JSON front matter from markdown and text files.
Markdown, editors and content npm MIT
Used in agent projects
106
0.8% of 12,697 public repos built with AI coding agents
Rank in markdown, editors and content
#6 of 46
by use in those projects
Downloads
10.6M
npm, last 7 days, gray-matter
GitHub stars
4,490
last push Jun 14, 2025
How gray-matter is used
gray-matter is a dependency in 106 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (0.8%), #6 of 46 in markdown, editors and content. The most used alternative there is react-markdown. Projects that use it most often also use Next.js (65.1%), remark-gfm (45.3%), clsx (54.7%).
Often used with gray-matter
| Next.js | 65.1% of gray-matter projects · 2.9× more than average |
|---|---|
| remark-gfm | 45.3% of gray-matter projects · 20.0× more than average |
| clsx | 54.7% of gray-matter projects · 3.1× more than average |
| TypeScript | 94.3% of gray-matter projects · 1.7× more than average |
| Lucide React | 54.7% of gray-matter projects · 2.8× more than average |
| Tailwind CSS | 71.7% of gray-matter projects · 2.1× more than average |
| next-themes | 35.8% of gray-matter projects · 4.1× more than average |
| Tailwind Merge | 48.1% of gray-matter projects · 2.9× more than average |
By coding agent
| Claude Code | 1.7% of projects set up for it |
|---|---|
| Cursor | 1.7% of projects set up for it |
| GitHub Copilot | 1.2% of projects set up for it |
| Gemini CLI | 2.7% of projects set up for it |
| OpenAI Codex | 2.7% of projects set up for it |
| OpenCode | 2.5% of projects set up for it |
| Devin Desktop | 1.8% of projects set up for it |
Share of public repos configured for each agent that list gray-matter as a dependency.
Install
| Package | npm install gray-matter |
|---|---|
| Main stacks | Next.js (66), TypeScript / JavaScript (36), Python (3), Rust (1) |
| Example projects | thedaviddias/Front-End-Checklist, inboundemail/inbound, lostintangent/gistpad-mcp, ChrisTitusTech/website, HXQLabs/helixque-landing |
Alternatives to gray-matter
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| react-markdown npm React component for rendering markdown with customizable component handling. |
360 (2.8%) | 37.2M | 15.9K | MIT |
| remark-gfm npm Remark plugin adding GitHub Flavored Markdown support for tables and strikethrough. |
288 (2.3%) | 44.5M | 1,249 | MIT |
| Jinja2 pypi Fast and expressive template engine for Python with powerful flexibility. |
175 (1.4%) | 145M | 11.8K | — |
| Marked npm Fast, efficient markdown parser for converting markdown to HTML. |
148 (1.2%) | 83.8M | 37.2K | MIT |
| React Syntax Highlighter npm React component for syntax highlighting code with Prism.js or Highlight.js. |
110 (0.9%) | 7.8M | 4,674 | MIT |
| Tiptap npm Headless Vue/React rich text editor framework with customizable extensions. |
105 (0.8%) | 18.7M | 38.7K | MIT |
| Pygments pypi Syntax highlighting library for code in Python supporting hundreds of programming languages. |
97 (0.8%) | 239M | 2,213 | — |
| Shiki npm Beautiful syntax highlighter powered by TextMate grammars with superior accuracy. |
89 (0.7%) | 24.9M | 13.9K | MIT |