SQST Docs

OpenCode setup

Use Claude as a coding assistant in your terminal with OpenCode. Your code stays inside SquareShift's Google Cloud. Setup takes about 5 minutes on a Mac or Linux machine.

Before you start

Ask an admin for your personal key. It starts with sk-. Keep it private, like a password. Keys starting with sqk_ stopped working on 17 November 2026: get a new key and redo steps 2 and 3.

Setup

1. Install OpenCode

brew install sst/tap/opencode

No Homebrew? Use npm i -g opencode-ai instead.

2. Save your key

Run this, paste your key (nothing will show), and press Enter:

mkdir -p ~/.config/sqst && read -rs K && printf '%s' "$K" > ~/.config/sqst/api-key && chmod 600 ~/.config/sqst/api-key && unset K

3. Connect OpenCode to SQST Code

Copy this whole block and run it:

mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json <<'EOF'
{
  "$schema": "https://opencode.ai/config.json",
  "share": "disabled",
  "autoupdate": false,
  "provider": {
    "sqst-code": {
      "npm": "@ai-sdk/anthropic",
      "name": "SQST Code",
      "options": {
        "baseURL": "https://llm.squareshift.dev/v1",
        "apiKey": "{file:~/.config/sqst/api-key}"
      },
      "models": {
        "claude-sonnet-5-5": { "name": "Claude Sonnet 5.5", "tool_call": true, "reasoning": true, "attachment": true, "limit": { "context": 200000, "output": 64000 } },
        "claude-opus-5-5": { "name": "Claude Opus 5.5", "tool_call": true, "reasoning": true, "attachment": true, "limit": { "context": 200000, "output": 64000 } },
        "claude-haiku-5-5": { "name": "Claude Haiku 5.5", "tool_call": true, "reasoning": true, "attachment": true, "limit": { "context": 100000, "output": 32000 } }
      }
    }
  },
  "model": "sqst-code/claude-sonnet-5-5",
  "small_model": "sqst-code/claude-haiku-5-5"
}
EOF

4. Check it works

opencode run "Reply with exactly: ready"

It should answer ready.

Using it

Open a terminal in your project folder and run opencode. Ask a question or describe a change. OpenCode asks before it edits files or runs commands.

KeyWhat it does
TabSwitch between build (can make changes) and plan (read-only)
/modelsChoose Sonnet (default), Opus (hardest problems) or Haiku (quick edits)
/newStart a fresh session
EscStop the current reply
Ctrl+CQuit

Your monthly budget

You can spend $50 of Claude each month. It resets on the 1st (UTC). Long sessions use it up faster, so start a new session (/new) for each task. To see what you've used:

curl -s https://llm.squareshift.dev/key/info -H "x-api-key: $(cat ~/.config/sqst/api-key)"

Look at spend and max_budget.

If something goes wrong

ErrorFix
401Your key is wrong or missing. Repeat step 2, or ask an admin for a new key.
422You've used this month's budget. Ask an admin if you need more.
429Too many requests. Wait a minute and try again.
Anything elseSend the admin the error message and the time. Never send your key.

Updated 17 November 2026.