cli-anything-ollama
What it does
This skill lets an AI agent use Ollama to run AI models directly on your own machine. It suits people who want to keep their text on their own computer.
When to use it
- ✓When you want an AI model to answer questions without sending your text to an online service.
- ✓When you need to see which models are installed and how they are set up.
- ✓When you want to create embeddings for a search or matching task.
Skill link
https://github.com/HKUDS/CLI-Anything/blob/main/ollama/agent-harness/cli_anything/ollama/skills/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“I want my local Ollama model to summarize these private meeting notes.”
5 new skills a week. 1 minute to read.
How it works
The agent sends requests to the Ollama server on your computer and gets the answers back. Ollama must be running before the skill can work.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
cli-anything-ollama
Local LLM inference and model management via the Ollama REST API. Designed for AI agents and power users who need to manage models, generate text, chat, and create embeddings without a GUI.
Installation
This CLI is installed as part of the cli-anything-ollama package:
pip install cli-anything-ollama
Prerequisites:
- Python 3.10+
- Ollama must be installed and running (
ollama serve)
Usage
Basic Commands
# Show help
cli-anything-ollama --help
# Start interactive REPL mode
cli-anything-ollama
# List available models
cli-anything-ollama model list
# Run with JSON output (for agent consumption)
cli-anything-ollama --json model list
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-ollama
# Enter commands interactively with tab-completion and history
Command Groups
Model
Model management commands.
| Command | Description |
|---|---|
list |
List locally available models |
show |
Show model details (parameters, template, license) |
pull |
Download a model from the Ollama library |
rm |
Delete a model from local storage |
copy |
Copy a model to a new name |
ps |
List models currently loaded in memory |
Generate
Text generation and chat commands.
| Command | Description |
|---|---|
text |
Generate text from a prompt |
chat |
Send a chat completion request |
Embed
Embedding generation commands.
| Command | Description |
|---|---|
text |
Generate embeddings for text |
Server
Server status and info commands.
| Command | Description |
|---|---|
status |
Check if Ollama server is running |
version |
Show Ollama server version |
Session
Session state commands.
| Command | Description |
|---|---|
status |
Show current session state |
history |
Show chat history for current session |
Examples
List and Pull Models
# List available models
cli-anything-ollama model list
# Pull a model
cli-anything-ollama model pull llama3.2
# Show model details
cli-anything-ollama model show llama3.2
Generate Text
# Stream text (default)
cli-anything-ollama generate text --model llama3.2 --prompt "Explain quantum computing in one sentence"
# Non-streaming with JSON output (for agents)
cli-anything-ollama --json generate text --model llama3.2 --prompt "Hello" --no-stream
Chat
# Single-turn chat
cli-anything-ollama generate chat --model llama3.2 --message "user:What is Python?"
# Multi-turn chat
cli-anything-ollama generate chat --model llama3.2 \
--message "user:What is Python?" \
--message "user:How does it compare to JavaScript?"
# Chat from JSON file
cli-anything-ollama generate chat --model llama3.2 --file messages.json
Embeddings
cli-anything-ollama embed text --model nomic-embed-text --input "Hello world"
cli-anything-ollama embed text --model nomic-embed-text --input "Hello" --input "World"
Interactive REPL Session
Start an interactive session for exploratory use.
cli-anything-ollama
# Enter commands interactively
# Use 'help' to see available commands
Connect to Remote Host
cli-anything-ollama --host http://192.168.1.100:11434 model list
State Management
The CLI maintains lightweight session state:
- Current host URL: Configurable via
--host - Chat history: Tracked for multi-turn conversations in REPL
- Last used model: Shown in REPL prompt
Output Formats
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (
--jsonflag): Structured JSON for agent consumption
# Human output
cli-anything-ollama model list
# JSON output for agents
cli-anything-ollama --json model list
For AI Agents
When using this CLI programmatically:
- Always use
--jsonflag for parseable output - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Use
--no-streamfor generate/chat to get complete responses - Verify Ollama is running with
server statusbefore other commands
More Information
- Full documentation: See README.md in the package
- Test coverage: See TEST.md in the package
- Methodology: See HARNESS.md in the cli-anything
FAQ
Do I need Ollama running?
Yes. The skill needs the Ollama server running, which you start with the ollama serve command.
Can it download new models?
Yes. A pull command downloads a model from the Ollama library.
Can it show which models are loaded?
Yes. A command lists the models currently loaded in memory.
Details
Original description by the author
Command-line interface for Ollama - Local LLM inference and model management via Ollama REST API. Designed for AI agents and power users who need to manage models, generate text, chat, and create embeddings without a GUI.
repo: HKUDS/CLI-Anything
Popularity
- GitHub stars
- 58k
- Ranking position
- #3234
- License
- Apache-2.0
- Updated
- 9/21/2026
Comments
- …
More skills from this repository
cli-anything-3mf
58kLets your agent inspect and fix 3D printing files, including finding round holes, resizing them, repairing meshes, and comparing two files.
cli-anything-qgis
58kLets your agent open, edit, and export QGIS map projects from the terminal, including layers, features, print layouts, and processing tools.
cli-anything-adguardhome
58kLets your agent manage AdGuard Home, a network-wide ad blocker, including filters, DNS rewrites, clients, and query logs.
cli-anything-anygen
58kLets your agent generate slides, documents, websites, and diagrams from a written prompt using the AnyGen service.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.