Files
2026-02-03 13:22:03 +00:00
..
2026-02-03 08:23:35 +01:00
2026-02-03 13:22:03 +00:00
2026-01-26 17:49:53 +01:00

@kilocode/kilo-gateway

Unified Kilo Gateway package for OpenCode providing authentication, AI provider integration, and API access.

Features

  • Authentication: Device authorization flow for Kilo Gateway
  • AI Provider: OpenRouter-based provider with Kilo Gateway integration
  • API Integration: Profile, balance, and model management
  • TUI Helpers: Utilities for terminal UI components

Installation

bun add @kilocode/kilo-gateway

Usage

Plugin Registration

import { KiloAuthPlugin } from "@kilocode/kilo-gateway"

// Register with OpenCode
const plugins = [KiloAuthPlugin]

Provider Usage

import { createKilo } from "@kilocode/kilo-gateway"

const provider = createKilo({
  kilocodeToken: process.env.KILOCODE_API_KEY,
  kilocodeOrganizationId: "org-123",
})

const model = provider.languageModel("anthropic/claude-sonnet-4")

API Access

import { fetchProfile, fetchBalance } from "@kilocode/kilo-gateway"

const profile = await fetchProfile(token)
const balance = await fetchBalance(token)

License

MIT