← Selected work

OpenCode Evict / Published CLI · developer tooling

Keep OpenCode's model catalog
in step with providers.

A CLI that reconciles OpenCode's cached model catalog with models.dev and live provider data, then exports upstream contributions.

Status
Published on npm · release binaries available
Stack
TypeScript / Bun / provider APIs
CLI usage · preview before writing
bunx @mikthatguy/opencode-evict --dry-run
bunx @mikthatguy/opencode-evict --export-contrib
  1. Local cache
  2. models.dev
  3. Provider APIs

Merge catalog entries → refresh cache → export missing models as TOML.

01 / Problem

Provider lists change;
the cache lags.

My model list kept falling behind provider APIs. I built a CLI that combines the local OpenCode cache, the models.dev baseline and live provider responses.

It produces a merged catalog that keeps local entries, and it can write missing models as TOML files for upstream contributions.

02 / My build

From discovery
to an upstream contribution.

The tool locates the OS-native cache, reads the upstream catalog, requests provider data and reconciles the results. A dry run previews the operation; contribution export writes TOML for review.

Kilo is the first-class integration. Generic OpenAI-compatible endpoints are an explicit best-effort option, with bearer retry when needed.

INSTALL

$ bunx @mikthatguy/opencode-evict

03 / Decisions

Keep user-added data.

The tool keeps existing catalog entries, so it does not silently delete models you added by hand. I keep provider-specific discovery separate from the generic probing path.

The tool has no hosted interface. You get it through the npm package or the release binaries, with the README as the guide. Try a dry run to see how your own catalog compares.

04 / Current limits

Reliability work
comes next.

The published CLI works for a focused workflow. The repository still needs regression tests for merging, provider responses and export control flow. I would also strengthen external payload validation, apply timeouts consistently and make cache writes atomic.

I plan to make these improvements before broadening first-class provider support.

Tell me what you're working on.

Let's talk ↗Next case study: BancarioFaccia →More work →