Ollama JS / TS SDK

Fully offline

Official Node + browser SDK for Ollama. ESM-first, typed, streaming.

Editorial verdict: “Foundational primitive for Node + browser apps against Ollama. ESM-native, typed.

SDK / proxy
Free
MIT
4.4 / 5
GitHub ★ 4,500

Compatibility at a glance

Which runtime + OS combos this app works against. Source of truth for "will it run on my setup?"

§ Runtimes supported
ollama
§ OS / platform
linuxmacoswindowsweb

What it is

For Node and browser developers who want a typed, streaming bridge to Ollama without reinventing HTTP calls. This is the official SDK, so it tracks Ollama’s API surface closely and ships ESM-native with full TypeScript definitions. Streaming works in the browser once you configure CORS on the Ollama server — a one-time setup that’s worth the trade-off for real-time chat UIs. It’s fully offline by design, since Ollama runs locally, and works across Linux, macOS, Windows, and the web. Just know it’s Ollama-specific: if you later switch runtimes, you’ll swap SDKs entirely.

✓ Strengths

  • +Official + maintained by Ollama team
  • +Streaming works in browser when CORS allows
  • +ESM-native, TypeScript-first

△ Caveats

  • Browser usage requires CORS config on the server
  • Ollama-specific