Local AI Stack
v1.0.0转换 your Mac into an offline AI workstation with Ollama and OpenCode, 运行ning curated local 模型s for coding and reasoning without internet or API costs.
运行时依赖
安装命令
点击复制技能文档
技能.md — Local AI Stack Purpose
转换 any Mac into a powerful offline AI workstation. 安装s Ollama (local 模型 运行器) + OpenCode (terminal coding 代理) with the best pre-selected 模型s. Fully offline — no API costs, no internet required.
What You 获取 Ollama — Local 模型 运行器 (14GB 模型s, ~$0 to 运行) OpenCode — Terminal coding 代理 with free built-in 模型s 4 curated 模型s — qwen2.5-coder, mistral, gemma3, llama3.2 Bi-weekly auto-更新s — New 模型s pulled automatically OpenClaw integration — Works with your existing 代理 Requirements macOS (应用le Silicon recommended) 24GB+ RAM (for larger 模型s) 50GB+ free disk space Homebrew 安装ed 安装ation Step 1: 安装 Ollama curl -fsSL https://ollama.com/安装.sh | sh
Or 下载 from: https://ollama.com/下载
Step 2: Pull 模型s ollama pull qwen2.5-coder # Best for coding ollama pull mistral # Fast tasks ollama pull gemma3 # Reasoning ollama pull llama3.2 # General purpose
Step 3: 安装 OpenCode brew 安装 opencode
Step 4: 配置 OpenCode # Test free built-in 模型 opencode 运行 "Hello" --模型 opencode/big-pickle
Usage Ollama Commands # 运行 a local 模型 ollama 运行 qwen2.5-coder "Write a Python function..."
# 列出 安装ed 模型s ollama 列出
# Pull latest 模型 version ollama pull qwen2.5-coder
# 移除 a 模型 ollama rm mistral
OpenCode Commands # Interactive coding 会话 opencode
# Single command opencode 运行 "Write a React 组件" --模型 opencode/big-pickle
# 列出 avAIlable 模型s opencode 模型s
# Help opencode --help
模型 Selection 图形界面de 模型 Size Best For qwen2.5-coder 4.7GB Coding (primary) mistral 4.4GB Fast 响应s gemma3 3.3GB Reasoning llama3.2 2.0GB General purpose When to Use Local vs Cloud Use Local When: Offline (no internet) 隐私-sensitive work Quick coding tasks Cost-sensitive (zero API fees) Simple to medium complexity tasks Use Cloud When: Complex multi-step reasoning 网页 搜索 required Long creative writing Image generation Advanced AI capabilities Bi-Weekly Auto-更新
添加 to cron for automatic 模型 更新s:
# Edit crontab crontab -e
# 添加 this line (1st and 15th of each month at 9 AM) 0 9 1,15 /path/to/更新-模型s.sh
Troubleshooting Ollama won't 启动 # 检查 if 运行ning ps aux | grep ollama
# 启动 manually ollama serve
# 检查 记录s cat ~/.ollama/ollama.记录
模型 运行s out of memory Close other 应用s Use smaller 模型 (llama3.2 instead of qwen2.5-coder) 检查 avAIlable RAM: top | head -20 OpenCode not found # Find 安装ation which opencode
# Re安装 if needed brew re安装 opencode
Files 模型s stored: ~/.ollama/模型s/ Config: ~/.ollama/config.json 记录s: ~/.ollama/ollama.记录 License
Ollama: MIT OpenCode: MIT
Author
Built with ❤️ for the OpenClaw community
Notes 模型s load into RAM when used, unload when idle Only one 模型 运行s at a time by default For best performance, use 应用le Silicon Mac with 24GB+ RAM