node-llama-cpp
Runs local models with llama.cpp from Node.js, with JSON schema output.
Model SDKs npm MIT
How node-llama-cpp is used
node-llama-cpp is a dependency in 19 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 34 projects, and what it is used with below comes from all of them. The most used alternative in our scan is Ollama JavaScript Library (29 projects). Projects that use it most often also use dotenv (82.4%), ws (82.4%), Zod (82.4%). It is more common in projects set up for OpenClaw (5.5%) than for GitHub Copilot (0.2%).
node-llama-cpp popularity over time
Gid Score 33: downloads 46, use in agent projects 35, GitHub stars 25, downloads trend 14 (each 0-100). How it is calculated.
Often used with node-llama-cpp
| dotenv | 82.4% of node-llama-cpp projects · 5.3× more than average |
|---|---|
| ws | 82.4% of node-llama-cpp projects · 26.2× more than average |
| Zod | 82.4% of node-llama-cpp projects · 3.3× more than average |
| Mozilla Readability | 67.6% of node-llama-cpp projects · 110.5× more than average |
| AWS SDK for JavaScript (S3) | 64.7% of node-llama-cpp projects · 20.5× more than average |
| Sharp | 64.7% of node-llama-cpp projects · 13.8× more than average |
| sqlite-vec (JavaScript) | 64.7% of node-llama-cpp projects · 121.7× more than average |
| tsx | 64.7% of node-llama-cpp projects · 4.3× more than average |
From all 34 projects in our scan that use node-llama-cpp, including the dependency samples.
By coding agent
| Claude Code | 0.6% of projects set up for it |
|---|---|
| OpenClaw | 5.5% of projects set up for it |
| Gemini CLI | 1.9% of projects set up for it |
| GitHub Copilot | 0.2% of projects set up for it |
Share of public repos configured for each agent that list node-llama-cpp as a dependency.
How node-llama-cpp is funded
Install
| Package | npm install node-llama-cpp |
|---|---|
| Main stacks | TypeScript / JavaScript (25), Python (7), Next.js (1), Java / Kotlin (1) |
| Example projects | Bitterbot-AI/bitterbot-desktop, ArgentAIOS/argentos-core, zhaojiaqi/MeowHub, raucvr/Group-Goki, viralcode/openwhale |
Alternatives to node-llama-cpp
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside node-llama-cpp are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| Ollama JavaScript Library npm Official JavaScript client library for Ollama to run and interact with local language models. |
50 | 29 (0.6%) | 454K | 4,392 | MIT |
| GitHub Copilot SDK npm TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC. |
42 | 10 (0.2%) | 1.1M | — | MIT |
| Ollama AI Provider npm Vercel AI provider for running LLMs locally using Ollama. |
31 | 9 (0.2%) | 85.9K | 340 | Apache-2.0 |
More in Model SDKs: OpenAI AI SDK OpenAI Python Library Anthropic SDK Google Generative AI Anthropic Python SDK Google GenAI Python SDK Hugging Face Hub