@adtention/kimicode
v0.1.1
Published
ADtention for Kimi Code: one quiet sponsor line under the Kimi Code TUI that pays you while your agent works.
Downloads
169
Readme
ADtention for Kimi Code
One quiet sponsor line under the Kimi Code TUI that pays you while your agent works.
⊕ $0.16 Tailscale: VPN with 0 configKimi Code has no statusline or plugin-UI API, so this surface works differently from our other integrations: a PTY wrapper owns the terminal's real bottom row and Kimi never knows it exists.
How it works
The wrapper spawns the real kimi binary inside a PTY that reports one row fewer than
the terminal, confines scrolling to those rows with a DECSTBM scroll region, and paints the
sponsor line on the reserved last row. Display is decoupled from billing:
- A serve (
POST /v1/serve, the billable impression) happens only on a real prompt (Enter in the chatbox), at most once per 15 s dwell window. Idle terminals earn nothing. - The line always renders from a local cache — instant, offline-safe.
- Every 10th slot is a rotating house unit (connect / refer / cash out) rendered locally with zero serve calls.
- The ad line never enters the model context: zero token cost, the model never sees it.
Hotkeys (intercepted by the wrapper before Kimi sees them, collision-free):
- ctrl+g — open the sponsor link (attributed via
/v1/click/<impression_id>). The ad text is also an OSC 8 hyperlink (cmd+click in iTerm2/Ghostty/Kitty/WezTerm). - ctrl+e — connect your earnings: opens the portal with your install identity in the
URL fragment (
/earn#pub=..&secret=..); the earn page prefills the claim form. Fragments never reach server logs or Referer headers.
Install
curl -fsSL https://raw.githubusercontent.com/adtention-ai/kimi/main/install.sh | bashInstalls a prebuilt, checksum-verified binary (macOS/Linux, arm64/amd64; python3
fallback elsewhere). Requires an existing
Kimi Code install at ~/.kimi-code/bin/kimi —
set KIMI_BIN=/path/to/kimi if yours lives elsewhere. Open a new terminal afterwards and
just type kimi.
Or via npm (installs the adtention-kimi command; run it in place of kimi):
npm i -g @adtention/kimicodeNon-interactive use (pipes, scripts, kimi -p with redirection) passes straight through to
the real binary. Escape hatch: ADTENTION_DISABLE=1 kimi. To uninstall, drop the
~/.adtention/bin line from your shell rc and rm -rf ~/.adtention.
Configuration (env)
| Var | Purpose |
| --- | --- |
| ADTENTION_DISABLE=1 | run bare kimi, no sponsor line |
| ADTENTION_REF | referral code sent on first register |
| ADTENTION_KIMI_BIN | path to the real kimi binary (default ~/.kimi-code/bin/kimi) |
(Test-harness overrides — API/portal endpoints, dwell, cadence, paths — are
documented in test/e2e.py.)
Development
Building, the two-wrapper test contract, and hard-won terminal details live in
DEVELOPMENT.md. The dev → main release flow (versioning, npm trusted
publishing, tags, GitHub Releases) is in RELEASING.md.
Built by ADtention. Same network as the Claude Code status line and the OpenCode line. MIT — see LICENSE.
