@ramarivera/pi-kimi-for-coding
Pi extension that adds Kimi For Coding OAuth support using the official device flow and Kimi-specific request behavior.
Package details
Install @ramarivera/pi-kimi-for-coding from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ramarivera/pi-kimi-for-coding- Package
@ramarivera/pi-kimi-for-coding- Version
0.1.5- Published
- May 2, 2026
- Downloads
- 578/mo · 52/wk
- Author
- ramarivera
- License
- MIT
- Types
- extension
- Size
- 19.4 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@ramarivera/pi-kimi-for-coding
A Pi extension that adds a dedicated Kimi For Coding OAuth provider using the official Kimi device flow plus Kimi-specific request shaping.
What it does
- uses the official device flow at
https://auth.kimi.com - targets
https://api.kimi.com/coding/v1 - sends the Kimi CLI fingerprint headers (
User-Agent+X-Msh-*) - reuses
~/.kimi/device_idfor stable device identity - injects
prompt_cache_key - maps Pi thinking levels onto Kimi
thinking+reasoning_effort - refreshes OAuth tokens and re-discovers model metadata
Install
From npm
pi install npm:@ramarivera/pi-kimi-for-coding
From GitHub
pi install git:github.com/ramarivera/pi-kimi-for-coding
From a local checkout
pi install /absolute/path/to/pi-kimi-for-coding
Authenticate
Start Pi and run:
/login
Then choose Kimi For Coding.
Use
After login, select the provider/model:
- provider:
kimi-for-coding-oauth - model:
kimi-for-coding
Development
bun install
bun test
bunx tsc --noEmit
Notes
This package is meant to be installed as a Pi package, so it declares its extension entry under the pi key in package.json.
License
MIT