Ollama CLI
Ollama runs open models on your own machine and serves them to agents through a local API compatible with OpenAI and Anthropic.
- 183,028 ★ on the repository
- Last commit
Extended access
Why this level
- The install script downloads and runs code as the user
- The local API has no key: exposing it through OLLAMA_HOST lets anyone on that network use the model
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/ollamaDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The install script downloads and runs code as the user
- The local API has no key: exposing it through OLLAMA_HOST lets anyone on that network use the model
This is third-party code. Review the repository files before installing.
What it does
Ollama downloads an open model with one command and runs it on your machine: `ollama run gpt-oss:20b` opens a chat right in the terminal. The library includes gpt-oss, Qwen, Gemma, DeepSeek and Llama in several sizes. A running Ollama listens on 127.0.0.1:11434 and serves an OpenAI-style API (`/v1/chat/completions`, `/v1/responses`) and an Anthropic-style one (`/v1/messages`), so the model plugs into Claude Code, Codex, OpenCode and Cline without a separate proxy. `ollama launch` configures an agent for the local model by itself: `ollama launch claude`, `ollama launch codex`, `ollama launch opencode`.
Who it is for. Developers who need a model without a cloud account or per-token billing, and anyone who does not want code to leave the machine.
Good fit when
- You want Claude Code, Codex or OpenCode on a local model
- You need to work without a foreign account and without per-token billing
- You want to try an open model on your own tasks
- You need one local model server for several agents
Not a fit when
- You need the quality of large cloud models on hard tasks
- The machine has 8–16 GB of memory and the tasks need code and tool calls: small models handle that worse
Example request
Run Claude Code on the local qwen3.5 model through Ollama and check that tool calls workLimitations
The default context depends on video memory: below 24 GiB it is 4K tokens, while agents need 64K or more. Raise it with `OLLAMA_CONTEXT_LENGTH` or the slider in the app.
An agent needs a model with tool support, which the model page marks as tools.
Cloud models tagged `:cloud` are not downloaded and run through an Ollama account; the free plan allows one concurrent request there.
How to disable. Stop the server (`ollama stop` for a model or quit the app) and remove models you no longer need with `ollama rm`. On macOS models live in `~/.ollama/models`.
FAQ
How much memory does Ollama need?
It depends on the model: gpt-oss:20b is 14 GB and targets systems with 16 GB of memory, qwen3-coder:30b is 19 GB. Small models such as gemma4 e4b take 6–10 GB.
How do I connect Ollama to Claude Code?
Run `ollama launch claude`, or set ANTHROPIC_BASE_URL=http://localhost:11434, ANTHROPIC_AUTH_TOKEN=ollama, an empty ANTHROPIC_API_KEY and run `claude --model qwen3.5`.
How do I connect Ollama to Codex?
Run `ollama launch codex`, or use `codex --oss`, which picks Ollama as the local provider.
Why does an agent on Ollama not call tools?
Usually the context is too small or the model lacks tool support. Raise the context to 64K tokens and pick a model marked tools.
Is Ollama paid?
Running locally is free and unlimited. The paid Pro and Max plans only cover cloud models.
Discussion
No questions or reviews yet.
Related
CLI toolsLM Studio is a desktop app for running open models locally, with a chat, a local server in OpenAI and Anthropic formats, and MCP support.
A CLI and Python library for OpenAI, Claude, Gemini, local and other models: prompts, chats, tools, embeddings and a SQLite log
A terminal MCP client for local Ollama models: MCP tools, prompts and resources, an agent mode and model switching
A personal AI agent for the terminal with shell, Python, web and local models, one of the earliest agent CLIs
A self-hosted control center for coding agents: OpenHands, Claude Code, Codex and Gemini on local and remote backends
A local proxy exposing GigaChat through OpenAI- and Anthropic-compatible APIs so it can drive Claude Code, aider and other agents
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Repository stars | Main difference |
|---|---|---|---|
| Ollama (this entry) | yes | 183,028 | |
| LM Studio | yes | LM Studio is a closed desktop app, Ollama is an open command-line project | |
| MCP Client for Ollama (ollmcp) | no | 830 | ollmcp is a client that connects MCP servers to Ollama models, not Ollama itself |
README in short
The README covers installation on macOS, Linux and Windows, the Docker image, the model library, the REST API and `ollama launch` for Claude Code, Codex, OpenCode, Copilot CLI and OpenClaw.