cli-anything-ollama — скилл для Claude Code: управление локальными
Скилл для работы с локальными LLM через Ollama REST API прямо из кода. Позволяет агентам запускать модели, генерировать текст, вести чаты и создавать эмбеддинги без GUI.
npx skills add HKUDS/CLI-Anything --skill cli-anything-ollama -a claude-codeЧто делает cli-anything-ollama
cli-anything-ollama — это интерфейс командной строки для управления Ollama. Скилл добавляет в ваш редактор доступ к локальным моделям: можно скачивать модели из библиотеки Ollama, генерировать текст, вести многооборотные чаты, создавать эмбеддинги. Команды поддерживают оба формата вывода — человеческий (таблицы, цвета) и машиночитаемый JSON для агентов.
В интерактивном режиме (REPL) скилл сохраняет состояние сессии: историю чатов, текущий хост, последнюю использованную модель. Можно подключаться к удалённым серверам Ollama через флаг --host. Для работы нужны Python 3.10+ и запущенный локально Ollama (ollama serve).
Агентам советует использовать флаг --json для структурированного вывода и --no-stream для полных ответов. Полезно проверить статус сервера командой server status перед остальными операциями.
Какие задачи решает
- Запустить локальную модель и получить текст без GUI
- Управлять моделями Ollama: скачивать, удалять, смотреть параметры
- Вести многооборотный чат с сохранением истории в одной сессии
- Генерировать эмбеддинги для текстов
- Подключиться к удалённому серверу Ollama с помощью CLI
Примеры запросов агенту
- Скачай модель
cli-anything-ollama model pull llama3.2и покажи её параметры - Сгенерируй текст:
cli-anything-ollama generate text --model llama3.2 --prompt "Объясни квантовые вычисления в одной фразе" - Веди чат с моделью:
cli-anything-ollama generate chat --model llama3.2 --message "user:Что такое Python?" --message "user:Чем он отличается от JavaScript?"
Как установить cli-anything-ollama
1Через Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-ollama -a claude-code2Вручную: положить файлы
~/.claude/skills/cli-anything-ollama/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/cli-anything-ollama/
1Через Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-ollama -a codex2Вручную: положить файлы
.agents/skills/cli-anything-ollama/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-ollama -a cursor2Вручную: положить файлы
.cursor/skills/cli-anything-ollama/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install HKUDS/CLI-Anything cli-anything-ollama2Вручную: положить файлы
.github/skills/cli-anything-ollama/SKILL.md1Через Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-ollama -a gemini-cli2Командой платформы
gemini skills install https://github.com/HKUDS/CLI-Anything --path skills/cli-anything-ollamaВручную: положить файлы
.devin/skills/cli-anything-ollama/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add HKUDS/CLI-Anything --skill cli-anything-ollama -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о cli-anything-ollama
Как установить cli-anything-ollama в Claude Code?
Выполни npx skills add HKUDS/CLI-Anything --skill cli-anything-ollama -a claude-code. Скилл загрузится в ~/.claude/skills/cli-anything-ollama/SKILL.md.
Что делает cli-anything-ollama?
Это команднострочный интерфейс для работы с Ollama. Позволяет скачивать модели, генерировать текст, вести чаты, создавать эмбеддинги и управлять сервером — всё через API без графического интерфейса.
Какие требования для работы?
Нужны Python 3.10+ и запущенный локально сервер Ollama. Подключиться к удалённому серверу можно флагом --host.
Исходный текст
SKILL.md · Apache-2.0
--- name: "cli-anything-ollama" description: >- 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. --- # 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: ```bash pip install cli-anything-ollama ``` **Prerequisites:** - Python 3.10+ - Ollama must be installed and running (`ollama serve`) ## Usage ### Basic Commands ```bash # 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: ```bash 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 ```bash # 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 ```bash # 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 ```bash # 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 ```bash 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. ```bash cli-anything-ollama # Enter commands interactively # Use 'help' to see available commands ``` ### Connect to Remote Host ```bash 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** (`--json` flag): Structured JSON for agent consumption ```bash # 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: 1. **Always use `--json` flag** for parseable output 2. **Check return codes** - 0 for success, non-zero for errors 3. **Parse stderr** for error messages on failure 4. **Use `--no-stream`** for generate/chat to get complete responses 5. **Verify Ollama is running** with `server status` before 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-plugin ## Version 1.0.1
© HKUDS · Apache-2.0 · HKUDS/CLI-Anything