opencode-kilo-gateway
v0.1.1
Published
Kilo Gateway provider plugin for OpenCode
Maintainers
Readme
Kilo Gateway OAuth Plugin for OpenCode
This plugin adds OAuth device login for the kilo provider in OpenCode.
Warning
The OAuth in this plugin may violate Kilo's TOS or future product restrictions. Use it at your own risk.
Using the kilo provider doesn't violate TOS, since you did not agree to it.
Without the plugin
If you only want free models, configure the provider and stop there:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"kilo": {
"name": "Kilo Gateway",
"npm": "@ai-sdk/openai-compatible",
"api": "https://api.kilo.ai/api/openrouter"
}
}
}With the plugin
If you want to use the models requiring sign in, add the plugin and keep the same provider config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"opencode-kilo-gateway@latest"
],
"provider": {
"kilo": {
"name": "Kilo Gateway",
"npm": "@ai-sdk/openai-compatible",
"api": "https://api.kilo.ai/api/openrouter"
}
}
}Login
Run:
opencode auth loginThen choose:
Kilo Gateway
You should get the same device flow shape as Kilo CLI:
- browser opens to Kilo device auth
- code is shown in the terminal
- OpenCode waits for authorization
Which models appear is controlled by the configured kilo provider and the gateway.
Dev
Build the plugin locally:
npm install
npm run buildInstall it into your OpenCode config directory:
cd C:\Users\User\.config\opencode
npm install "C:\Users\User\source\repos\plugin\opencode-kilo-gateway"Then point opencode.json at the built file:
{
"plugin": [
"file:///C:/Users/User/.config/opencode/node_modules/opencode-kilo-gateway/dist/index.js"
]
}When you change the plugin locally, rebuild it before testing:
npm run buildNote
How is this different from other Kilo plugins?
- this one knows Kilo provider setup already populates models, so you do not need it for free models
- it provides a working OAuth device login
- you do not need to choose
Other - it is based directly on Kilo CLI gateway auth code
