← 返回
未分类 中文

Local AI Stack

Transform your Mac into an offline AI workstation with Ollama and OpenCode, running curated local models for coding and reasoning without internet or API costs.
将Mac改造成离线AI工作站,使用Ollama和OpenCode运行本地模型进行编程和推理,无需网络或API费用。
jaysclawd-cloud jaysclawd-cloud 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 301
下载
💾 0
安装
1
版本
#latest

概述

SKILL.md — Local AI Stack

Purpose

Transform any Mac into a powerful offline AI workstation. Installs Ollama (local model runner) + OpenCode (terminal coding agent) with the best pre-selected models. Fully offline — no API costs, no internet required.

What You Get

  • Ollama — Local model runner (14GB models, ~$0 to run)
  • OpenCode — Terminal coding agent with free built-in models
  • 4 curated models — qwen2.5-coder, mistral, gemma3, llama3.2
  • Bi-weekly auto-updates — New models pulled automatically
  • OpenClaw integration — Works with your existing agent

Requirements

  • macOS (Apple Silicon recommended)
  • 24GB+ RAM (for larger models)
  • 50GB+ free disk space
  • Homebrew installed

Installation

Step 1: Install Ollama

curl -fsSL https://ollama.com/install.sh | sh

Or download from: https://ollama.com/download

Step 2: Pull Models

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: Install OpenCode

brew install opencode

Step 4: Configure OpenCode

# Test free built-in model
opencode run "Hello" --model opencode/big-pickle

Usage

Ollama Commands

# Run a local model
ollama run qwen2.5-coder "Write a Python function..."

# List installed models
ollama list

# Pull latest model version
ollama pull qwen2.5-coder

# Remove a model
ollama rm mistral

OpenCode Commands

# Interactive coding session
opencode

# Single command
opencode run "Write a React component" --model opencode/big-pickle

# List available models
opencode models

# Help
opencode --help

Model Selection Guide

ModelSizeBest For
-----------------------
qwen2.5-coder4.7GBCoding (primary)
mistral4.4GBFast responses
gemma33.3GBReasoning
llama3.22.0GBGeneral purpose

When to Use Local vs Cloud

Use Local When:

  • Offline (no internet)
  • Privacy-sensitive work
  • Quick coding tasks
  • Cost-sensitive (zero API fees)
  • Simple to medium complexity tasks

Use Cloud When:

  • Complex multi-step reasoning
  • Web search required
  • Long creative writing
  • Image generation
  • Advanced AI capabilities

Bi-Weekly Auto-Update

Add to cron for automatic model updates:

# Edit crontab
crontab -e

# Add this line (1st and 15th of each month at 9 AM)
0 9 1,15 * * /path/to/update-models.sh

Troubleshooting

Ollama won't start

# Check if running
ps aux | grep ollama

# Start manually
ollama serve

# Check logs
cat ~/.ollama/ollama.log

Model runs out of memory

  • Close other apps
  • Use smaller model (llama3.2 instead of qwen2.5-coder)
  • Check available RAM: top | head -20

OpenCode not found

# Find installation
which opencode

# Reinstall if needed
brew reinstall opencode

Files

  • Models stored: ~/.ollama/models/
  • Config: ~/.ollama/config.json
  • Logs: ~/.ollama/ollama.log

License

Ollama: MIT

OpenCode: MIT

Author

Built with ❤️ for the OpenClaw community

Notes

  • Models load into RAM when used, unload when idle
  • Only one model runs at a time by default
  • For best performance, use Apple Silicon Mac with 24GB+ RAM

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 22:22 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,924
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 197 📥 68,004
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 78 📥 182,567