Skip to content

About

Kilo-maintained Pi provider extension for the Kilo Gateway

Resources

Stars

12 stars

Watchers

0 watching

Forks

Repository files navigation

Kilo Provider for Pi

Official Kilo-maintained provider extension for Pi. Access Kilo Gateway models with free-model support, browser authentication, and organization accounts.

Features

  • Use free Kilo Gateway models without signing in
  • Sign in to access the full model catalog and select a personal or organization account
  • Expose Kilo reasoning variants through Pi thinking levels
  • Route responses-only OpenAI models through the compatible Kilo endpoint

Prerequisites

Install Pi, the coding agent CLI:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

Installation

Install the latest version:

pi install git:github.com/Kilo-Org/kilo-pi-provider

For a reproducible installation, pin a release tag:

pi install git:github.com/Kilo-Org/kilo-pi-provider@v2026.08.0

Usage

Start Pi as usual:

pi

Free models are available immediately. To access all models, sign in with your Kilo account:

/login kilo

This opens your browser for device authorization. When your account belongs to organizations, Pi lets you choose which Kilo account to use.

You can also set KILO_API_KEY directly instead of using the login flow. Set KILO_ORG_ID or KILOCODE_ORGANIZATION_ID to bill and filter models for an organization account.

Usage popup

Run /kilo-usage in the interactive TUI after signing in to inspect usage for your personal account or the selected organization. It makes one on-demand yearly grouped request—there is no polling—and summarizes UTC day, week, month, and calendar-year periods.

The Usage tab shows USD spend plus input, output, cache-read, and cache-write tokens. Press Tab, Shift+Tab, or the arrow keys to switch to Models, which aggregates the current UTC year by model. Press Esc or Ctrl+C to close the popup.

Footer

When a Kilo model is selected, Kilo replaces Pi's footer by default to show usage and credits. Selecting a model from another provider restores Pi's footer and hides Kilo's ambient statuses. To keep Kilo's footer and statuses visible for models from other providers, set:

KILO_PI_SHOW_FOR_OTHER_PROVIDERS=1 pi

This setting controls only automatic footer and status presentation. It does not disable Kilo API access or explicitly invoked extension UI.

To keep another extension's custom footer, disable Kilo's footer:

KILO_PI_CUSTOM_FOOTER=0 pi

Kilo credits are shown by default and remain available as the kilo-credits footer status. To hide them and avoid balance requests, set KILO_PI_SHOW_CREDITS=0:

KILO_PI_SHOW_CREDITS=0 pi

Preferences

Set non-secret preferences globally in ~/.pi/agent/extensions/kilo-pi-provider/config.json, or per trusted project in .pi/extensions/kilo-pi-provider/config.json:

{
  "display": { "showForOtherProviders": false },
  "footer": { "custom": false },
  "credits": { "enabled": true },
  "usage": { "periods": ["day", "week"] }
}

A trusted project file overrides the global file, and environment variables override both. Project preferences are ignored until Pi trusts the project. Keep API keys and OAuth credentials out of these files.

The display.showForOtherProviders preference defaults to false and is overridden by KILO_PI_SHOW_FOR_OTHER_PROVIDERS.

Environment overrides are useful for one-off sessions:

KILO_PI_USAGE=day,week pi

KILO_PI_USAGE accepts comma-separated periods; 1, true, and yes remain shorthand for day. Usage refreshes at session start and after completed turns.

Development

Source modules are under src/; src/index.ts is the Pi extension entry point.

Install dependencies:

npm ci

Install Prek's pre-commit hook locally:

npx prek install

Before each commit it runs Biome and TypeScript typechecking. Biome applies safe formatting and lint fixes; if it changes files, review and stage those changes before committing again. The hook is not installed automatically so Pi package installation, which omits development dependencies, succeeds.

Run the checks and tests directly with:

npm run check
npm run typecheck
npm test
npm run test:coverage

typecheck runs TypeScript in strict, no-emit mode against source, tests, and TypeScript configuration. It checks the extension against the pinned Pi API types and runs in CI and the installed Prek pre-commit hook.

When changing TypeScript, run npm run typecheck and resolve every type error in the files you touch. Fix the underlying types or implementation; do not silence errors with any, unsafe casts, @ts-ignore, or weaker compiler settings.

test:coverage reports V8 coverage for src/ and writes HTML and LCOV reports to coverage/.

To run the pre-commit hook against every tracked file:

npx prek run --all-files

License and attribution

This repository is a Kilo-maintained derivative of mrexodia/kilo-pi-provider. The original source and Kilo modifications are distributed under the Boost Software License 1.0.

About

Kilo-maintained Pi provider extension for the Kilo Gateway

Resources

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages