OpenCode plugin
The Inkbox OpenCode plugin (@inkbox/opencode-plugin) is a standalone plugin for OpenCode. It connects an OpenCode agent to an Inkbox identity and exposes configured email, SMS/MMS, voice-call, iMessage, contact, note, and encrypted-vault capabilities as native OpenCode tools.
This is a plugin, not an Inkbox SDK skill or an OpenCode fork. It ships as source you build locally and loads through OpenCode's plugin system, with an optional gateway that turns configured inbound email, SMS/MMS, iMessage, and calls into OpenCode sessions.
Prerequisites
- OpenCode installed and logged in to a model provider
- Node.js 20 or newer and Git
- macOS or Linux
You do not need to create an Inkbox identity first. The setup wizard can sign up a new agent or connect an existing API key.
Install
The fastest path is the one-command installer. It builds the plugin from source, wires it into your global OpenCode config, and runs the setup wizard:
The wizard creates or connects an Inkbox agent, offers to provision a phone number, offers to connect iMessage, configures signed inbound messaging, asks which project directory OpenCode should use, and offers to keep the gateway running in the background and after restarts.
Re-running the installer or inkbox-opencode setup is safe. Check the wiring anytime with inkbox-opencode doctor.
Manual install
To install per-project or without the installer, clone and build the plugin:
From your OpenCode project, install the packed build and add a wrapper that OpenCode auto-loads from .opencode/plugins/:
Create .opencode/plugins/inkbox.ts. All plugin options — tool gating, the recipient allowlist, the gateway — go inside the InkboxPlugin(input, { ... }) call here:
Provide credentials with environment variables (they also fall back to ~/.inkbox/config). Get both from the Inkbox Console:
Then point OpenCode at the bundled skills so the agent knows Inkbox etiquette, and ask it to run inkbox_doctor to confirm the setup:
Available capabilities
Depending on your setup choices, enabled tools, and account availability, your OpenCode agent can have:
- An email address - send, receive, and reply from an Inkbox mailbox
- A phone number, when available - SMS/MMS, call history and transcripts, and outbound calling when the call tool is enabled
- iMessage, when connected - each person who messages the agent gets their own ongoing thread to reply on
- Contacts and notes - persistent Inkbox records the agent can create and read
- An encrypted vault - opt-in credential storage whose plaintext tools require explicit enablement and an unlock key
- An inbound gateway - configured email, SMS/MMS, iMessage, and calls can open OpenCode sessions that reply on the same channel
Outbound email, SMS, iMessage, and calls request approval through OpenCode's native permission prompts, or you can set a recipient allowlist in the wrapper.
What Inkbox adds
| Capability | OpenCode alone | With Inkbox plugin |
|---|---|---|
| Agent-owned mailbox | Bring your own integration | Built in |
| SMS/MMS and voice calls | Bring your own integration | Available when configured |
| iMessage | Bring your own integration | Available when configured |
| Contacts and notes | Agent memory or external tools | Built in |
| Encrypted vault | Bring your own integration | Available when enabled and unlocked |
| Approval-gated outbound sends | Custom guardrails | OpenCode permission prompts |
OpenCode itself stays upstream. The plugin registers Inkbox tools, routes outbound sends through OpenCode's permission prompts, bundles task skills, and can run an inbound gateway, without requiring an OpenCode fork.
Inbound gateway
The plugin can run a long-lived inbound gateway that receives email, SMS/MMS, iMessage, and calls to the agent's identity and turns each into an OpenCode session that replies on the same channel. The setup wizard configures and offers to start the sidecar. For a manual install, enable it with gateway: { enabled: true, projectDirectory } in the wrapper and set a webhook signing key (INKBOX_SIGNING_KEY). The sidecar finds or launches its own OpenCode server:
After install
Use any channels you configured. If the agent has a phone number, text START to it from every phone the agent needs to text. This opts that phone number in to SMS from the agent. You can also email the agent mailbox, use iMessage when connected, or call the agent phone number when available.