Shareable OpenCode setup with:
- runtime config in
opencode.json - TUI config in
tui.json - reusable project rules in
AGENTS.md - custom slash commands in
commands/
This repo keeps the existing config as-is (including Ollama and model/provider choices).
Use both env vars so users get JSON config and directory-based assets:
export OPENCODE_CONFIG=/absolute/path/to/opencode/opencode.json
export OPENCODE_CONFIG_DIR=/absolute/path/to/opencodeThen run OpenCode from any project:
opencodeOPENCODE_CONFIGloadsopencode.json(models, providers, permissions, mcp, tools, agents)OPENCODE_CONFIG_DIRloads directory assets (commands/,agents/,skills/,plugins/, etc.)- both are needed for full portability of this repo
/investigate- feature investigation workflow/pin-dep- pin/update a dependency with lockfile focus/upgrade-dep- safer dependency upgrade flow, including major checks/validate-investigation- validate and revise an investigation doc
- OpenCode installed
- access to the configured models/providers in
opencode.json - optional local Ollama at
http://localhost:11434/v1for local agents - optional env vars for configured integrations (for example
CONTEXT7_API_KEY)
Use the scripts in scripts/ to install OpenCode and Claude config with backups.
./scripts/install-opencode.sh --dry-run
./scripts/install-opencode.sh --copyOptions:
--copy(default) copies files into~/.config/opencode--symlinksymlinks from this repo--forcereplaces existing targets in symlink mode--no-envskips writing~/.config/opencode/env.sh
Behavior:
- Installs
opencode.json,tui.json,AGENTS.md, andcommands/ - Backs up existing files/directories before replacing (
*.bak-YYYYmmdd-HHMMSS) - Writes
~/.config/opencode/env.shwithOPENCODE_CONFIGandOPENCODE_CONFIG_DIR
./scripts/install-all.sh --dry-runRuns both OpenCode and Claude installers with the same flags.
This repo also includes a Claude Code-compatible setup under claude/, plus CLAUDE.md and .claude.json.
CLAUDE.md- Claude memory/instructions equivalent ofAGENTS.md.claude.json- user-level Claude config template (MCP servers)claude/settings.json- settings template (model, status line, permissions, and desktop notification hooks)claude/agents/- custom subagents (deep,fast,tiny)claude/skills/- migrated command workflows as Claude skills
This template already includes your preferred defaults:
model: "opus"- powerline status line via
@owloops/claude-powerline
Use the helper script to install everything into ~/.claude:
./scripts/install-claude.sh --dry-run
./scripts/install-claude.sh --copyOptions:
--copy(default) copies files into~/.claude--symlinksymlinksCLAUDE.md,agents/, andskills/from this repo--forcereplaces existing targets in symlink mode--no-claude-jsonskips install/merge of~/.claude.json
Behavior:
- Backs up existing files before replacing/merging (
*.bak-YYYYmmdd-HHMMSS) - Merges
claude/settings.jsoninto~/.claude/settings.jsonwhenjqis installed - Merges
.claude.jsoninto~/.claude.jsonwhenjqis installed
mkdir -p ~/.claude
cp /absolute/path/to/opencode/CLAUDE.md ~/.claude/CLAUDE.md
cp /absolute/path/to/opencode/claude/settings.json ~/.claude/settings.jsonInstall user-level MCP/template config:
cp /absolute/path/to/opencode/.claude.json ~/.claude.jsonFor reusable agents/skills across all repos:
mkdir -p ~/.claude/agents ~/.claude/skills
cp -R /absolute/path/to/opencode/claude/agents/. ~/.claude/agents/
cp -R /absolute/path/to/opencode/claude/skills/. ~/.claude/skills/You can run Claude Code against Ollama's Anthropic-compatible endpoint:
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL=http://localhost:11434
claude --model qwen3.5Or use the launcher:
ollama launch claude --model kimi-k2.5:cloudNotes:
- Subagents are supported with Ollama integration.
- Subagent behavior is model-dependent; Ollama cloud models generally work best.
- Per-subagent model routing like OpenCode JSON agents is not a direct 1:1 mapping.
.
├── AGENTS.md
├── CLAUDE.md
├── commands/
├── claude/
├── .claude.json
├── opencode.json
├── README.md
├── scripts/
└── tui.json