All guides

Set up DoneCorner in OpenCode

Connect DoneCorner to OpenCode 1.x or 2.x with the dcorner command line tool. It configures the right format for the version you run and saves your key through OpenCode’s authentication system, outside the provider configuration.

Before you start

  1. Install OpenCode and Node.js 18 or later.
  2. Sign in to DoneCorner. New accounts need email verification and approval before they can create an API key.
  3. In your account, create a key and keep it ready to paste. The CLI asks for it without showing it on screen.

Option 1: use npm

Run the current published CLI with Node.js and npm:

npx dcorner@latest setup

Paste your DoneCorner key at the hidden prompt. When setup finishes, start or restart OpenCode:

opencode

Option 2: use Python

The PyPI package installs the same CLI. Python 3.9 or later and Node.js 18 or later are required. Create and activate a virtual environment first.

macOS and Linux

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade dcorner
dcorner setup

Windows PowerShell

py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade dcorner
dcorner setup

Enter your key at the hidden prompt, then run opencode.

Using a specific OpenCode installation

If you have more than one OpenCode installation, point setup at the exact executable you use. Use that same executable when you start OpenCode.

macOS and Linux

DC_OPENCODE_BIN=/absolute/path/to/opencode npx dcorner@latest setup

Windows PowerShell

$env:DC_OPENCODE_BIN = "C:\path\to\opencode.exe"
npx dcorner@latest setup

Setup detects OpenCode 1.x and 2.x and writes that version’s configuration format. It keeps other provider settings and credentials, saves a backup of the configuration, and restores it if credential setup fails. On macOS and Linux, config and backup files are restricted to your user account.

Check the connection

The status command shows the saved endpoint and selected credential without printing your key. With npm, run:

npx dcorner@latest status

With the Python virtual environment still active, run:

dcorner status

If setup cannot find OpenCode, set DC_OPENCODE_BIN to its full path and try again.

Need an account key?

Sign in to create one after your account is approved. New here? Join the waitlist to get started.

Open your account Join the waitlist