ollama

command module
v0.17.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 3 Imported by: 0

README

ollama

Ollama

Start building with open models.

Download

macOS
curl -fsSL https://ollama.com/install.sh | sh

or download manually

Windows
irm https://ollama.com/install.ps1 | iex

or download manually

Linux
curl -fsSL https://ollama.com/install.sh | sh

Manual install instructions

Docker

The official Ollama Docker image ollama/ollama is available on Docker Hub.

Libraries
Community

Get started

ollama

You'll be prompted to run a model or connect Ollama to your existing agents or applications such as claude, codex, openclaw and more.

Coding

To launch a specific integration:

ollama launch claude

Supported integrations include Claude Code, Codex, Droid, and OpenCode.

AI assistant

Use OpenClaw to turn Ollama into a personal AI assistant across WhatsApp, Telegram, Slack, Discord, and more:

ollama launch openclaw
Chat with a model

Run and chat with Gemma 3:

ollama run gemma3

See ollama.com/library for the full list.

See the quickstart guide for more details.

REST API

Ollama has a REST API for running and managing models.

curl http://localhost:11434/api/chat -d '{
  "model": "gemma3",
  "messages": [{
    "role": "user",
    "content": "Why is the sky blue?"
  }],
  "stream": false
}'

See the API documentation for all endpoints.

Python
pip install ollama
from ollama import chat

response = chat(model='gemma3', messages=[
  {
    'role': 'user',
    'content': 'Why is the sky blue?',
  },
])
print(response.message.content)
JavaScript
npm i ollama
import ollama from "ollama";

const response = await ollama.chat({
  model: "gemma3",
  messages: [{ role: "user", content: "Why is the sky blue?" }],
});
console.log(response.message.content);

Supported backends

  • llama.cpp project founded by Georgi Gerganov.

Documentation

Community Integrations

Want to add your project? Open a pull request.

Chat Interfaces
Web
Desktop
  • Dify.AI - LLM app development platform
  • AnythingLLM - All-in-one AI app for Mac, Windows, and Linux
  • Maid - Cross-platform mobile and desktop client
  • Witsy - AI desktop app for Mac, Windows, and Linux
  • Cherry Studio - Multi-provider desktop client
  • Ollama App - Multi-platform client for desktop and mobile
  • PyGPT - AI desktop assistant for Linux, Windows, and Mac
  • Alpaca - GTK4 client for Linux and macOS
  • SwiftChat - Cross-platform including iOS, Android, and Apple Vision Pro
  • Enchanted - Native macOS and iOS client
  • RWKV-Runner - Multi-model desktop runner
  • Ollama Grid Search - Evaluate and compare models
  • macai - macOS client for Ollama and ChatGPT
  • AI Studio - Multi-provider desktop IDE
  • Reins - Parameter tuning and reasoning model support
  • ConfiChat - Privacy-focused with optional encryption
  • LLocal.in - Electron desktop client
  • MindMac - AI chat client for Mac
  • Msty - Multi-model desktop client
  • BoltAI for Mac - AI chat client for Mac
  • IntelliBar - AI-powered assistant for macOS
  • Kerlig AI - AI writing assistant for macOS
  • Hillnote - Markdown-first AI workspace
  • Perfect Memory AI - Productivity AI personalized by screen and meeting history
Mobile

SwiftChat, Enchanted, Maid, Ollama App, Reins, and ConfiChat listed above also support mobile platforms.

Code Editors & Development
Libraries & SDKs
Frameworks & Agents
RAG & Knowledge Bases
  • RAGFlow - RAG engine based on deep document understanding
  • R2R - Open-source RAG engine
  • MaxKB - Ready-to-use RAG chatbot
  • Minima - On-premises or fully local RAG
  • Chipper - AI interface with Haystack RAG
  • ARGO - RAG and deep research on Mac/Windows/Linux
  • Archyve - RAG-enabling document library
  • Casibase - AI knowledge base with RAG and SSO
  • BrainSoup - Native client with RAG and multi-agent automation
Bots & Messaging
Terminal & CLI
Productivity & Apps
Observability & Monitoring
  • Opik - Debug, evaluate, and monitor LLM applications
  • OpenLIT - OpenTelemetry-native monitoring for Ollama and GPUs
  • Lunary - LLM observability with analytics and PII masking
  • Langfuse - Open source LLM observability
  • HoneyHive - AI observability and evaluation for agents
  • MLflow Tracing - Open source LLM observability
Database & Embeddings
Infrastructure & Deployment
Cloud
Package Managers

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
Package api implements the client-side API for code wishing to interact with the ollama service.
Package api implements the client-side API for code wishing to interact with the ollama service.
examples/chat command
app
cmd/app command
dialog
Package dialog provides a simple cross-platform common dialog API.
Package dialog provides a simple cross-platform common dialog API.
logrotate
package logrotate provides utilities for rotating logs TODO (jmorgan): this most likely doesn't need it's own package and can be moved to app where log files are created
package logrotate provides utilities for rotating logs TODO (jmorgan): this most likely doesn't need it's own package and can be moved to app where log files are created
store
Package store provides a simple JSON file store for the desktop application to save and load data such as ollama server configuration, messages, login information and more.
Package store provides a simple JSON file store for the desktop application to save and load data such as ollama server configuration, messages, login information and more.
ui
package ui implements a chat interface for Ollama
package ui implements a chat interface for Ollama
webview
* MIT License * * Copyright (c) 2017 Serge Zaitsev * Copyright (c) 2022 Steffen André Langnes * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* MIT License * * Copyright (c) 2017 Serge Zaitsev * Copyright (c) 2022 Steffen André Langnes * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
cmd
bench command
config
Package config provides integration configuration for external coding tools (Claude Code, Codex, Droid, OpenCode) to use Ollama models.
Package config provides integration configuration for external coding tools (Claude Code, Codex, Droid, OpenCode) to use Ollama models.
runner command
tui
docs
fs
internal
orderedmap
Package orderedmap provides a generic ordered map that maintains insertion order.
Package orderedmap provides a generic ordered map that maintains insertion order.
ml
nn
nn/rope
Package rope provides options for RoPE
Package rope provides options for RoPE
openai package provides core transformation logic for partial compatibility with the OpenAI REST API
openai package provides core transformation logic for partial compatibility with the OpenAI REST API
internal/cache/blob
Package blob implements a content-addressable disk cache for blobs and manifests.
Package blob implements a content-addressable disk cache for blobs and manifests.
internal/client/ollama
Package ollama provides a client for interacting with an Ollama registry which pushes and pulls model manifests and layers as defined by the ollama.com/manifest.
Package ollama provides a client for interacting with an Ollama registry which pushes and pulls model manifests and layers as defined by the ollama.com/manifest.
internal/internal/stringsx
Package stringsx provides additional string manipulation functions that aren't in the standard library's strings package or go4.org/mem.
Package stringsx provides additional string manipulation functions that aren't in the standard library's strings package or go4.org/mem.
internal/internal/syncs
Package syncs provides synchronization primitives.
Package syncs provides synchronization primitives.
internal/manifest
Package manifest provides documentation for the Ollama manifest format.
Package manifest provides documentation for the Ollama manifest format.
internal/registry
Package registry implements an http.Handler for handling local Ollama API model management requests.
Package registry implements an http.Handler for handling local Ollama API model management requests.
types
errtypes
Package errtypes contains custom error types
Package errtypes contains custom error types
model
Package model contains types and utilities for parsing, validating, and working with model names and digests.
Package model contains types and utilities for parsing, validating, and working with model names and digests.
x
agent
Package agent provides agent loop orchestration and tool approval.
Package agent provides agent loop orchestration and tool approval.
cmd
create/client
Package client provides client-side model creation for safetensors-based models.
Package client provides client-side model creation for safetensors-based models.
imagegen
Package imagegen provides experimental image generation capabilities for Ollama.
Package imagegen provides experimental image generation capabilities for Ollama.
imagegen/transfer
Package transfer provides minimal, fast blob transfer for tensor-based models.
Package transfer provides minimal, fast blob transfer for tensor-based models.
tools
Package tools provides built-in tool implementations for the agent loop.
Package tools provides built-in tool implementations for the agent loop.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL