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

@itssimplereally/opencode-kimicode-auth

v0.2.1

Published

Kimi Code OAuth auth plugin for OpenCode - access Kimi models using Moonshot AI credentials

Readme

OpenCode Kimi Code Auth

OpenCode plugin for Kimi Code OAuth under the Moonshot AI provider.

Authenticates via device-code OAuth (same flow as kimi-cli), manages multi-account rotation, and routes requests to the Kimi Code API.

Models

| OpenCode model | Mode | Kimi API model | |---|---|---| | moonshotai/kimicode-kimi-k2.5 | Thinking off | kimi-for-coding | | moonshotai/kimicode-kimi-k2.5-thinking | Thinking on | kimi-for-coding |

Both models use 262k context and 32k output. Existing moonshotai/* API-key models are unaffected.

Install

Add the plugin to ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    "@itssimplereally/opencode-kimicode-auth@latest"
  ]
}

Then authenticate:

opencode auth login

In the picker, select Moonshot AIOAuth (Kimi Code / kimi-cli).

A browser window opens for Kimi device authorization. After approval, the plugin stores your tokens locally. You can add multiple accounts for rotation.

Verify:

opencode models moonshotai

Troubleshooting

  • Only seeing "Enter your API key" — Ensure "@itssimplereally/opencode-kimicode-auth@latest" is in your plugin array, then re-run opencode auth login.
  • Auth errors after working setup — Your refresh token may have expired. Re-run opencode auth login.

For LLMs

Copy this prompt into your coding agent to set up the plugin:

Configure OpenCode on this machine to use Kimi Code OAuth via the published plugin.

Goal:
- Use Kimi Code OAuth in OpenCode for moonshotai/kimicode-* models.

Rules:
- Never print credential values.
- Only modify config fields required for this setup.

Steps:
1. Validate tools:
   - Run: opencode --version
2. Update OpenCode config:
   - File: ~/.config/opencode/opencode.json or ~/.config/opencode/opencode.jsonc
   - Ensure the plugin array includes: "@itssimplereally/opencode-kimicode-auth@latest"
     - If no plugin array exists, create it under `$schema` key as `"plugin": ["@itssimplereally/opencode-kimicode-auth@latest"]`
   - Preserve all other existing plugin entries.
3. Verify OpenCode starts cleanly:
   - Run: opencode auth list
   - If plugin install/import errors occur, fix the plugin entry first.
4. **Do not attempt interactive auth in this session.**
   - Ask the human to run, cleanly formatted: `opencode auth login` then select "Moonshot AI" then "OAuth (Kimi Code / kimi-cli)" and they can add multiple accounts for rotation. **Logout in the browser after authorization of each account before adding the next.**
   - Wait for the human to confirm they completed authorization.
5. After human confirmation, verify:
   - Run: opencode auth list
   - Run: opencode models moonshotai
   - Confirm output includes `moonshotai/kimicode-kimi-k2.5` and `moonshotai/kimicode-kimi-k2.5-thinking`.
6. Return a concise report of changes and verification results.

License

MIT