Skip to content

Repository files navigation

ibl.ai

opencode-iblai-auth

Use ibl.ai models in opencode.

An opencode plugin that registers ibl.ai as a provider, signs you in with opencode auth login, and lists the models your platform actually has provisioned.

opencode About Docs License: MIT


Install · Log in · Use · How it works · Development · Advanced


Install

Your opencode settings live at ~/.config/opencode/opencode.json, and plugins load from ~/.config/opencode/plugins/.

A single-line install from npm is coming shortly. Until then, point opencode at a local copy — it takes about a minute and needs no dependency.

Grab the code:

mkdir -p ~/Code
git clone https://github.com/iblai/opencode-iblai-auth.git ~/Code/opencode-iblai-auth

Then tell opencode where it is:

mkdir -p ~/.config/opencode/plugins
echo 'export { IblaiAuthPlugin } from "'"$HOME"'/Code/opencode-iblai-auth/index.ts"' \
  > ~/.config/opencode/plugins/iblai-auth.ts

That's it — opencode picks it up the next time it starts. There are no dependencies to install; opencode runs the plugin directly.

To update later, git pull in that folder. To remove it, delete ~/.config/opencode/plugins/iblai-auth.ts.

Prefer to keep this per-project? Use .opencode/plugins/ inside the repo instead of the global folder.


Log in

opencode auth login

Pick ibl.ai and enter:

Prompt Value
ibl.ai platform key your platform key, e.g. acme
ibl.ai platform token your platform token

You only do this once — opencode remembers it.


Use

opencode

Your models show up as iblai/<model>, for example iblai/openai/gpt-5.5. Pick one with /models.

How it works

Your model list comes from your platform. Rather than shipping a fixed catalogue that drifts out of date, the plugin asks ibl.ai which models your platform has and shows you exactly those. Add a model to your platform and it appears in opencode — no plugin update needed.

Your login is stored once. Your platform key and token are kept by opencode's own credential store, so they never sit in a config file you might commit.

Your own settings always win. If you've configured models yourself in opencode.json, the plugin leaves them alone. And if ibl.ai can't be reached, your existing setup keeps working instead of vanishing.

Nothing happens until you log in. Before that the plugin stays out of the way entirely.


Development

bun install
bun test
bun run typecheck
bun run build

Advanced configuration

The plugin points at ibl.ai's production endpoints.

Set these only if you run a private or staging deployment. They are host names, not full paths; the plugin appends the rest of the path itself.

Env var Default Purpose
IBLAI_CHAT_BASE_URL https://asgi.data.iblai.app chat / completions
IBLAI_MODEL_BASE_URL https://api.iblai.app/dm model listing

License

MIT

About

Use ibl.ai models in opencode.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages