Skip to content

Ollama CLI for Local Models

Lets an agent manage local Ollama models and run text generation, chat and embeddings from the command line.

Stars
58,084
Licence
Apache-2.0
Files
1 file

What it does

This skill teaches an AI agent to operate a command-line tool that controls Ollama, a program for running large language models on your own computer. Once installed, the agent can list, download, inspect and delete local models, generate text, hold chat conversations, and create text embeddings, returning machine-readable JSON output it can parse. It works against a local Ollama server, so prompts stay on your machine unless you point it at a remote host.

Great for

  • Developers who want an agent to script local model management and inference
  • Data users who need embeddings from local models without a GUI
  • Power users running Ollama on a separate machine on their network

Skip it if

  • Anyone without Ollama installed and running, since the CLI cannot work without a server (the skill requires it)
  • Users who want a cloud-hosted model API; this only talks to a local or self-chosen Ollama server
  • Situations where pulling or deleting models unattended is risky, because model pull and rm commands change local storage

Try asking

  • “List the models I have installed in Ollama and show details for llama3.2”
  • “Pull the nomic-embed-text model and generate embeddings for these three sentences”
  • “Ask the local llama3.2 model to summarise this text, returning JSON output”
  • “Check whether the Ollama server is running before running any other commands”
Step-by-step guide: how to use Ollama CLI for Local ModelsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    cli-anything-ollama.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip cli-anything-ollama.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip cli-anything-ollama.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Always pass --json and --no-stream when an agent needs parseable, complete responses
  • Run server status first to confirm Ollama is reachable before other commands
  • Use --host only with servers you trust, since prompts and model data are sent to that address

What's inside

  • SKILL.md

Redistributed unmodified from HKUDS/CLI-Anything under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.