Ollama JavaScript Library
Official JavaScript client library for Ollama to run and interact with local language models.
Model SDKs npm MIT
How Ollama JavaScript Library is used
Ollama JavaScript Library is a dependency in 29 of the 6,208 public GitHub projects set up for AI coding agents that we scanned (0.6% of the 4,818 JavaScript/TypeScript ones), #11 of 79 in model sdks. Counting the projects our scan samples by dependency (Solana 2,661, Ethereum and EVM 1,496, 3D and games 2,818, agent frameworks and SDKs 10,983), it appears in 86; those are left out of every share on this page. The most used alternative in our scan is OpenAI (284 projects). Projects that use it most often also use dotenv (82.8%), Vitest (79.3%), Express (72.4%). It is more common in projects set up for OpenClaw (5.5%) than for GitHub Copilot (0.3%).
AgentGid articles about Ollama JavaScript Library
Ollama JavaScript Library popularity over time
Gid Score 50: downloads 56, use in agent projects 49, GitHub stars 36, downloads trend 58 (each 0-100). How it is calculated.
Often used with Ollama JavaScript Library
| dotenv | 82.8% of Ollama JavaScript Library projects · 5.3× more than average |
|---|---|
| Vitest | 79.3% of Ollama JavaScript Library projects · 3.9× more than average |
| Express | 72.4% of Ollama JavaScript Library projects · 10.7× more than average |
| tsx | 72.4% of Ollama JavaScript Library projects · 4.8× more than average |
| ws | 72.4% of Ollama JavaScript Library projects · 23.1× more than average |
| Commander | 69.0% of Ollama JavaScript Library projects · 24.9× more than average |
| yaml | 69.0% of Ollama JavaScript Library projects · 22.2× more than average |
| chalk | 65.5% of Ollama JavaScript Library projects · 22.7× more than average |
By coding agent
| Claude Code | 0.7% of projects set up for it |
|---|---|
| OpenClaw | 5.5% of projects set up for it |
| Gemini CLI | 3.0% of projects set up for it |
| GitHub Copilot | 0.3% of projects set up for it |
Share of public repos configured for each agent that list Ollama JavaScript Library as a dependency.
Install
| Package | npm install ollama |
|---|---|
| Main stacks | TypeScript / JavaScript (20), Next.js (5), Python (2), .NET (1) |
| Example projects | Bitterbot-AI/bitterbot-desktop, vual/lobe-chat-pro, ArgentAIOS/argentos-core, smithersbot/smithersbot |
Alternatives to Ollama JavaScript Library
Tools that do the same job, so a project picks one or the other. Add-ons and libraries used alongside Ollama JavaScript Library are not listed here; they are in "Often used with".
| Tool | Gid Score | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|---|
| OpenAI npm Official TypeScript SDK for accessing OpenAI APIs including GPT and embeddings. |
76 | 284 (5.9%) | 25.3M | 11.2K | Apache-2.0 |
| Anthropic SDK npm Official TypeScript SDK for calling Claude API and building agent applications. |
69 | 232 (4.8%) | 28.3M | 2,145 | MIT |
| Google Generative AI npm Official SDK for Google Gemini API to build AI-powered applications. |
64 | 169 (3.5%) | 14.7M | 1,691 | Apache-2.0 |
| Groq SDK npm Official TypeScript SDK for calling Groq's fast language models API. |
42 | 20 (0.4%) | 511K | 267 | Apache-2.0 |
| node-llama-cpp npm · new in the catalog Runs local models with llama.cpp from Node.js, with JSON schema output. |
33 | 19 (0.4%) | 138K | 2,192 | MIT |
| Mistral AI npm Official TypeScript SDK for calling Mistral's language models and APIs. |
42 | 11 (0.2%) | 4M | 157 | Apache-2.0 |
| GitHub Copilot SDK npm TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC. |
42 | 10 (0.2%) | 1.1M | — | MIT |
| Genkit Google AI npm · no longer maintained Genkit AI framework plugin for Google Gemini and other Google AI APIs. |
34 | 9 (0.2%) | 29.9K | 6,533 | Apache-2.0 |
More in Model SDKs: AI SDK OpenAI Python Library Anthropic Python SDK Google GenAI Python SDK Hugging Face Hub LiteLLM Ollama Pi-AI