cli-anything-ollama
できること
このスキルは、AIエージェントがOllamaを使い、自分のコンピューター上で直接AIモデルを動かせるようにします。文章を自分のコンピューター内に留めたい人向けです。
使う場面
- ✓オンラインサービスに文章を送らずに、AIモデルに質問に答えてもらいたいとき。
- ✓インストール済みのモデルと、その設定を確認したいとき。
- ✓検索やマッチングのための埋め込みを作りたいとき。
スキルのリンク
https://github.com/HKUDS/CLI-Anything/blob/main/ollama/agent-harness/cli_anything/ollama/skills/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ローカルのOllamaモデルに、この非公開の会議メモを要約してもらってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、お使いのコンピューター上のOllamaサーバーにリクエストを送り、回答を受け取ります。スキルが動く前に、Ollamaが実行されている必要があります。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
よくある質問
Ollamaを起動しておく必要がありますか?
はい。ollama serveコマンドで起動するOllamaサーバーが動いている必要があります。
新しいモデルをダウンロードできますか?
はい。pullコマンドで、Ollamaライブラリからモデルをダウンロードできます。
読み込まれているモデルを確認できますか?
はい。現在メモリに読み込まれているモデルを一覧表示するコマンドがあります。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 58k
- ランキング
- #3234
- ライセンス
- Apache-2.0
- 更新日
- 2026/9/21
コメント
- …
このリポジトリの他のスキル
cli-anything-3mf
58kエージェントが3Dプリントのファイルを調べて直せるようにします。丸い穴を見つける、そのサイズを変える、メッシュを修復する、2つのファイルを比べることができます。
cli-anything-qgis
58kエージェントがターミナルからQGISのマッププロジェクトを開き、編集し、書き出せるようにします。レイヤー、フィーチャー、印刷レイアウト、処理ツールを含みます。
cli-anything-adguardhome
58kエージェントがAdGuard Homeを管理できるようにします。AdGuard Homeはネットワーク全体で広告を遮断するツールで、フィルター、DNSの書き換え、クライアント、クエリのログを扱います。
cli-anything-anygen
58kエージェントが、AnyGenのサービスを使って、書かれたプロンプトからスライド、文書、ウェブサイト、図を生成できるようにします。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。