Acorn
Fast, minimal JavaScript/ECMAScript parser written in JavaScript.
Scraping, browsers and parsing npm MIT
How Acorn is used
Acorn is a dependency in 17 of the 6,208 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983); counting those, it appears in 41 projects, and what it is used with below comes from all of them. The most used alternative in our scan is web-tree-sitter (20 projects). Projects that use it most often also use chalk (36.6%), Commander (34.1%), OpenAI (31.7%).
Acorn popularity over time
Gid Score 66: downloads 100, use in agent projects 38, GitHub stars 52, downloads trend 53 (each 0-100). How it is calculated.
Often used with Acorn
| chalk | 36.6% of Acorn projects · 12.7× more than average |
|---|---|
| Commander | 34.1% of Acorn projects · 12.3× more than average |
| OpenAI | 31.7% of Acorn projects · 6.9× more than average |
| Playwright (JavaScript) | 46.3% of Acorn projects · 2.7× more than average |
| esbuild | 29.3% of Acorn projects · 6.3× more than average |
| ws | 29.3% of Acorn projects · 9.3× more than average |
| Express | 26.8% of Acorn projects · 4.0× more than average |
| Anthropic SDK | 24.4% of Acorn projects · 6.5× more than average |
From all 41 projects in our scan that use Acorn, including the dependency samples.
By coding agent
| Claude Code | 0.4% of projects set up for it |
|---|---|
| OpenClaw | 2.6% of projects set up for it |
| GitHub Copilot | 0.3% of projects set up for it |
| Cursor | 0.2% of projects set up for it |
Share of public repos configured for each agent that list Acorn as a dependency.
Install
| Package | npm install acorn |
|---|---|
| Main stacks | TypeScript / JavaScript (36), Next.js (2), Python (2), PHP (1) |
| Example projects | ag-grid/ag-charts, sdsrss/claude-mem-lite, hexian2001/lingxiao-coding, futrime/webdsh, gulagala001/oh-my-dsh |
Alternatives to Acorn
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside Acorn are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| web-tree-sitter npm Tree-sitter language parser bindings for parsing and analyzing code in browsers. |
61 | 20 (0.4%) | 4.8M | 27.2K | MIT |
| JSONRepair npm Repair and fix broken or malformed JSON documents automatically. |
50 | 14 (0.3%) | 2.2M | 2,409 | ISC |
More in Scraping, browsers and parsing: Beautiful Soup Puppeteer lxml Playwright Core Playwright (Python) Cheerio fast-xml-parser jsonc-parser