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-kilocode-auth

v1.0.18

Published

OpenCode plugin for Kilo Code authentication with support for various models including Giga Potato

Readme

OpenCode Kilo Code Auth Plugin

An OpenCode plugin for authenticating with Kilo Code and accessing various AI models, including the Giga Potato model - a stealth model optimized for agentic programming.

Features

  • Kilo Code Authentication: Login via browser-based device auth or manual token entry
  • 300+ AI Models: Access to Claude, GPT, Gemini, DeepSeek, Llama, and more
  • Giga Potato Model: Free stealth model optimized for agentic programming with vision support
  • Model Selection: Browse and select from available models
  • Zero Configuration: Automatic request routing through Kilo Code API

Installation

Method 1: Add to opencode.json (Recommended)

Add the plugin to your OpenCode configuration file (~/.config/opencode/opencode.json):

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    "opencode-kilocode-auth"
  ],
  "provider": {
    "kilocode": {
      "models": {
        "giga-potato": {}
      }
    }
  },
  "model": "kilocode/giga-potato"
}

Method 2: Local Plugin Directory

  1. Copy the plugin to your OpenCode plugins directory:
# Create plugins directory
mkdir -p ~/.config/opencode/plugins

# Copy plugin file
cp path/to/opencode-kilocode-auth/src/plugin.ts ~/.config/opencode/plugins/kilocode.ts
  1. OpenCode will automatically load plugins from the ~/.config/opencode/plugins/ directory.

Method 3: Install via npm/bun

# Navigate to your opencode config directory
cd ~/.config/opencode

# Install the plugin
bun add opencode-kilocode-auth

# Or using npm
npm install opencode-kilocode-auth

Then add to your opencode.json:

{
  "plugin": ["opencode-kilocode-auth"]
}

Authentication

When you run OpenCode, you'll see "kilocode" as an available provider. Select it and choose an auth method:

  1. Login with Kilo Code (OAuth): Opens browser for secure device auth
  2. Enter Kilo Code API Token: Enter your API token directly

Getting a Kilo Code Token

  1. Go to https://kilo.ai
  2. Sign up or log in
  3. Navigate to Settings → API Keys
  4. Generate a new API key

Giga Potato Model

The Giga Potato model is a stealth model deeply optimized for agentic programming:

| Feature | Value | |---------|-------| | Model ID | giga-potato | | Context Window | 256K tokens | | Max Output | 32K tokens | | Vision Support | Yes (can analyze images) | | Tool Support | Yes (write_file, edit_file) | | Reasoning | Yes | | Price | FREE |

Using Giga Potato

Set it as your default model in opencode.json:

{
  "model": "kilocode/giga-potato"
}

Or select it interactively when prompted for a model.

Available Models

Free Models

| Model | Description | |-------|-------------| | giga-potato | Stealth model for agentic programming (256K context, vision) | | x-ai/grok-code-fast-1 | xAI Grok optimized for fast code generation | | mistralai/devstral-2512:free | Mistral's development model | | corethink:free | CoreThink reasoning model |

Premium Models (via Kilo Code subscription)

| Model | Description | |-------|-------------| | anthropic/claude-opus-4.5 | Latest Claude Opus | | anthropic/claude-sonnet-4.5 | Latest Claude Sonnet | | openai/gpt-5.2 | Latest GPT model | | google/gemini-3-pro-preview | Gemini 3 Pro | | deepseek/deepseek-r1 | DeepSeek reasoning model |

Configuration Example

Full opencode.json example:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    "opencode-kilocode-auth"
  ],
  "provider": {
    "kilocode": {
      "models": {
        "giga-potato": {
          "name": "Giga Potato",
          "contextLength": 256000,
          "maxTokens": 32000
        },
        "anthropic/claude-sonnet-4": {},
        "openai/gpt-4o": {}
      }
    }
  },
  "model": "kilocode/giga-potato",
  "agent": {
    "build": {
      "model": "kilocode/giga-potato"
    }
  }
}

Environment Variables

| Variable | Description | |----------|-------------| | KILOCODE_TOKEN | Pre-set your Kilo Code API token | | KILOCODE_BACKEND_BASE_URL | Custom backend URL (for development) |

How It Works

  1. Authentication: Uses device auth flow (like GitHub CLI) or direct token entry
  2. Request Routing: Intercepts AI requests and routes them through Kilo Code's OpenRouter-compatible API
  3. Model Access: Provides access to 300+ models through a single authentication
  4. Cost Tracking: Billing is handled by Kilo Code, costs show as $0 in OpenCode

Troubleshooting

Plugin not loading

Make sure the plugin is properly installed:

# Check if plugin is in node_modules
ls ~/.config/opencode/node_modules/opencode-kilocode-auth

# Or check plugins directory
ls ~/.config/opencode/plugins/

Authentication failing

  1. Check your internet connection
  2. Try logging in at https://kilo.ai first
  3. Generate a new API token if the old one expired

Model not found

Make sure you're using the correct model ID format: kilocode/model-name

For example:

  • kilocode/giga-potato
  • kilocode/anthropic/claude-sonnet-4

Development

# Clone the repo
git clone <repo-url>
cd opencode-kilocode-auth

# Install dependencies
bun install

# Test the API
bun run test/api-test.ts

# Build
bun run build

License

MIT

Credits

Ported from Kilo Code for OpenCode integration.