cli-anything-ollama
Skill này làm gì
Skill này giúp agent AI dùng Ollama để chạy các mô hình AI ngay trên máy của bạn. Skill phù hợp với người muốn giữ văn bản của mình trên chính máy tính.
Khi nào nên dùng
- ✓Khi bạn muốn một mô hình AI trả lời câu hỏi mà không gửi văn bản của bạn tới dịch vụ trực tuyến.
- ✓Khi bạn cần xem những mô hình nào đã được cài và chúng được thiết lập ra sao.
- ✓Khi bạn muốn tạo embedding cho một tác vụ tìm kiếm hoặc so khớp.
Liên kết skill
https://github.com/HKUDS/CLI-Anything/blob/main/ollama/agent-harness/cli_anything/ollama/skills/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn mô hình Ollama trên máy tôi tóm tắt các ghi chú họp riêng tư này.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent gửi yêu cầu đến máy chủ Ollama trên máy tính của bạn và nhận câu trả lời về. Ollama phải đang chạy trước khi skill có thể hoạt động.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Tôi có cần Ollama đang chạy không?
Có. Skill cần máy chủ Ollama đang chạy, bạn khởi động nó bằng lệnh ollama serve.
Nó có tải được mô hình mới không?
Có. Lệnh pull tải một mô hình từ thư viện Ollama.
Nó có cho biết mô hình nào đang được nạp không?
Có. Một lệnh liệt kê các mô hình hiện đang được nạp trong bộ nhớ.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 58k
- Vị trí xếp hạng
- #3234
- Giấy phép
- Apache-2.0
- Cập nhật
- 21/9/2026
Bình luận
- …
Thêm skill từ kho mã này
cli-anything-3mf
58kCho phép agent của bạn kiểm tra và sửa file in 3D, gồm tìm lỗ tròn, đổi kích thước chúng, sửa lưới và so sánh hai file.
cli-anything-qgis
58kCho phép agent của bạn mở, sửa và xuất dự án bản đồ QGIS từ terminal, gồm các lớp, đối tượng, bố cục in và công cụ xử lý.
cli-anything-adguardhome
58kCho phép agent của bạn quản lý AdGuard Home, một bộ chặn quảng cáo toàn mạng, gồm bộ lọc, DNS rewrite, thiết bị và nhật ký truy vấn.
cli-anything-anygen
58kCho phép agent của bạn tạo slide, tài liệu, website và sơ đồ từ một prompt bằng dịch vụ AnyGen.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.