npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-trae-cli-auth

v0.1.1

Published

opencode provider plugin that proxies models through the local Trae CLI

Readme

opencode-trae-cli-auth

An opencode provider plugin that proxies model calls through your local traecli login.

It is useful when Trae CLI already works locally and you want to use the same account/models from opencode.

Features

  • Adds a trae provider to opencode.
  • Uses the local traecli binary and existing Trae login; no API key is stored by this package.
  • Exposes common Trae cloud models, including GLM-5.1, Doubao-Seed-2.0-Code, DeepSeek-V3.2, Qwen3-Coder-Next, and more.
  • Reads the current model from ~/.trae/trae_cli.yaml / ~/.trae/traecli.yaml when available.
  • Supports local file:// plugin installs for development.

Prerequisites

  • Node.js >= 20
  • opencode >= 1.14
  • traecli installed and logged in

Verify Trae CLI first:

traecli "reply with 'ok'" -p --json

If this command fails, fix Trae CLI login/config before using this plugin.

Install

From npm:

opencode plugin opencode-trae-cli-auth

For local development from this repository:

npm install
npm run build
opencode plugin file:///absolute/path/to/opencode-trae-cli-auth/dist/index.js

You can also add it manually to an opencode config:

{
  "plugin": [
    "opencode-trae-cli-auth"
  ],
  "model": "trae/GLM-5.1"
}

Local file example:

{
  "plugin": [
    "file:///Users/you/dev/opencode-trae-cli-auth/dist/index.js"
  ],
  "model": "trae/GLM-5.1"
}

Models

List models after installing:

opencode models trae

Built-in model ids currently include:

  • trae/default
  • trae/Doubao-Seed-2.0-Code
  • trae/Doubao-Seed-Code
  • trae/GLM-5.1
  • trae/GLM-5
  • trae/GLM-4.7
  • trae/MiniMax-M2.7
  • trae/MiniMax-M2.5
  • trae/Qwen3-Coder-Next
  • trae/Kimi-K2.6
  • trae/Kimi-K2.5
  • trae/DeepSeek-V3.2
  • trae/DeepSeek-V3.1-Terminus

trae/default does not pass model.name and uses the default model selected in Trae CLI.

Other model ids are passed to Trae CLI as:

--config model.name=<model-id>

Usage

opencode run --model trae/GLM-5.1 "reply with 'ok'"

Options

When loading the plugin programmatically, the plugin accepts:

type TraePluginOptions = {
  cliPath?: string
  modelName?: string
  queryTimeout?: number
  extraArgs?: string[]
  sessionId?: string
}
  • cliPath: override the traecli binary path.
  • modelName: force a Trae model.name regardless of opencode model id.
  • queryTimeout: timeout in seconds for traecli --query-timeout.
  • extraArgs: extra arguments appended to traecli.
  • sessionId: optional session id; not passed by default because some Trae CLI versions crash with explicit session ids.

Known limitations

  • Tool calls are not supported yet; models are advertised with tool_call: false.
  • Usage/token counts may be zero when Trae CLI does not emit usage metadata.
  • Trae CLI may print keyring is not supported on this system; this is a Trae CLI environment warning and usually does not prevent responses.

Development

npm install
npm test
npm run build
npm pack --dry-run

License

MIT