add-opencode

Featured

Use OpenCode as an agent provider. OpenRouter, OpenAI, Google, DeepSeek, etc. via OpenCode config — not the Anthropic Agent SDK. Per group via `ncl groups config update --provider opencode`; host passes OPENCODE_* and XDG mount when spawning containers.

AI & Automation 30,381 stars 12877 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# OpenCode agent provider NanoClaw runs agents in a long-lived **poll loop** inside the container. The backend is selected per agent group by the **`provider`** key in that group's `container.json` (materialized from the `container_configs` table) — set it with `ncl groups config update --provider opencode`. Default is `claude`. Trunk ships with only the `claude` provider baked in. This skill copies the OpenCode provider files in from the `providers` branch, wires them into the host and container barrels, installs dependencies, and rebuilds the image. ## Install ### Pre-flight If all of the following are already present, skip to **Configuration**: - `src/providers/opencode.ts` - `container/agent-runner/src/providers/opencode.ts` - `src/providers/opencode-registration.test.ts` - `container/agent-runner/src/providers/opencode-registration.test.ts` - `import './opencode.js';` line in `src/providers/index.ts` - `import './opencode.js';` line in `container/agent-runner/src/providers/index.ts` - `@opencode-ai/sdk` in `container/agent-runner/package.json` - `ARG OPENCODE_VERSION` and `"opencode-ai@${OPENCODE_VERSION}"` in `container/Dockerfile` - `src/opencode-dockerfile.test.ts` (the Dockerfile install guard) Missing pieces — continue below. All steps are idempotent; re-running is safe. ### 1. Fetch the providers branch ```bash git fetch origin providers ``` ### 2. Copy the OpenCode source files Wholesale copies (owned entirely by this skill — user edits to these files w...

Details

Author
nanocoai
Repository
nanocoai/nanoclaw
Created
5 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category