{"_id":"@adtention/kimicode","name":"@adtention/kimicode","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@adtention/kimicode","version":"0.1.1","description":"ADtention for Kimi Code: one quiet sponsor line under the Kimi Code TUI that pays you while your agent works.","type":"module","scripts":{"test":"node --test","sync-version":"node scripts/sync-version.mjs","check-version":"node scripts/sync-version.mjs --check"},"license":"MIT","homepage":"https://adtention.ai","repository":{"type":"git","url":"git+https://github.com/adtention-ai/kimi.git"},"bugs":{"url":"https://github.com/adtention-ai/kimi/issues"},"publishConfig":{"access":"public"},"bin":{"adtention-kimi":"npm/launcher.mjs"},"engines":{"node":">=18"},"keywords":["kimi-code","kimi","adtention","sponsor","statusline"],"gitHead":"4b89e3ead17ab3b2bf14b652df3ccc4259db7322","_id":"@adtention/kimicode@0.1.1","_nodeVersion":"22.21.1","_npmVersion":"11.13.0","dist":{"integrity":"sha512-3z5t8u/coGeCnxQO1HbwMApw9WWcsRFwfnCfxjugZ9g7nAWgaLuP6nwwtQbeaRCa5e2W+9JKKiP4idkqtFNCXg==","shasum":"ff924aedea52a3fd153bd98f00f13c6e8874a41a","tarball":"https://registry.npmjs.org/@adtention/kimicode/-/kimicode-0.1.1.tgz","fileCount":9,"unpackedSize":21492669,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDrDQ2/fsEQ7nK8iDxWFPQLR9hu7hHDaxJ+9shbYWGjHgIgCVKWWumKpI7oTsg/k8ShhpxHPj+AIS1Yl0lulNofI0k="}]},"_npmUser":{"name":"jpche","email":"jp@adtention.ai"},"directories":{},"maintainers":[{"name":"moonman421","email":"team@adtention.ai"},{"name":"jpche","email":"jp@adtention.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kimicode_0.1.1_1784973241223_0.09439723167627201"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-25T09:54:01.073Z","0.1.1":"2026-07-25T09:54:01.523Z","modified":"2026-07-25T09:54:01.783Z"},"maintainers":[{"name":"moonman421","email":"team@adtention.ai"},{"name":"jpche","email":"jp@adtention.ai"}],"description":"ADtention for Kimi Code: one quiet sponsor line under the Kimi Code TUI that pays you while your agent works.","homepage":"https://adtention.ai","keywords":["kimi-code","kimi","adtention","sponsor","statusline"],"repository":{"type":"git","url":"git+https://github.com/adtention-ai/kimi.git"},"bugs":{"url":"https://github.com/adtention-ai/kimi/issues"},"license":"MIT","readme":"# ADtention for Kimi Code\n\n[![npm](https://img.shields.io/npm/v/@adtention/kimicode?color=cb3837&logo=npm)](https://www.npmjs.com/package/@adtention/kimicode)\n[![CI](https://github.com/adtention-ai/kimi/actions/workflows/ci.yml/badge.svg)](https://github.com/adtention-ai/kimi/actions/workflows/ci.yml)\n[![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n\nOne quiet sponsor line under the Kimi Code TUI that pays you while your agent works.\n\n```\n⊕ $0.16  Tailscale: VPN with 0 config\n```\n\nKimi Code has no statusline or plugin-UI API, so this surface works differently from our\nother integrations: a **PTY wrapper** owns the terminal's real bottom row and Kimi never\nknows it exists.\n\n## How it works\n\nThe wrapper spawns the real `kimi` binary inside a PTY that reports **one row fewer** than\nthe terminal, confines scrolling to those rows with a DECSTBM scroll region, and paints the\nsponsor line on the reserved last row. Display is decoupled from billing:\n\n- A **serve** (`POST /v1/serve`, the billable impression) happens only on a real prompt\n  (Enter in the chatbox), at most once per 15 s dwell window. Idle terminals earn nothing.\n- The line always renders from a local cache — instant, offline-safe.\n- Every 10th slot is a rotating **house unit** (connect / refer / cash out) rendered\n  locally with **zero** serve calls.\n- The ad line never enters the model context: zero token cost, the model never sees it.\n\nHotkeys (intercepted by the wrapper before Kimi sees them, collision-free):\n\n- **ctrl+g** — open the sponsor link (attributed via `/v1/click/<impression_id>`).\n  The ad text is also an OSC 8 hyperlink (cmd+click in iTerm2/Ghostty/Kitty/WezTerm).\n- **ctrl+e** — connect your earnings: opens the portal with your install identity in the\n  URL *fragment* (`/earn#pub=..&secret=..`); the earn page prefills the claim form.\n  Fragments never reach server logs or Referer headers.\n\n## Install\n\n```sh\ncurl -fsSL https://raw.githubusercontent.com/adtention-ai/kimi/main/install.sh | bash\n```\n\nInstalls a prebuilt, checksum-verified binary (macOS/Linux, arm64/amd64; python3\nfallback elsewhere). Requires an existing\n[Kimi Code](https://moonshotai.github.io/kimi-code/) install at `~/.kimi-code/bin/kimi` —\nset `KIMI_BIN=/path/to/kimi` if yours lives elsewhere. Open a new terminal afterwards and\njust type `kimi`.\n\nOr via npm (installs the `adtention-kimi` command; run it in place of `kimi`):\n\n```sh\nnpm i -g @adtention/kimicode\n```\n\nNon-interactive use (pipes, scripts, `kimi -p` with redirection) passes straight through to\nthe real binary. Escape hatch: `ADTENTION_DISABLE=1 kimi`. To uninstall, drop the\n`~/.adtention/bin` line from your shell rc and `rm -rf ~/.adtention`.\n\n## Configuration (env)\n\n| Var | Purpose |\n| --- | --- |\n| `ADTENTION_DISABLE=1` | run bare kimi, no sponsor line |\n| `ADTENTION_REF` | referral code sent on first register |\n| `ADTENTION_KIMI_BIN` | path to the real kimi binary (default `~/.kimi-code/bin/kimi`) |\n\n(Test-harness overrides — API/portal endpoints, dwell, cadence, paths — are\ndocumented in `test/e2e.py`.)\n\n## Development\n\nBuilding, the two-wrapper test contract, and hard-won terminal details live in\n[DEVELOPMENT.md](DEVELOPMENT.md). The `dev` → `main` release flow (versioning, npm trusted\npublishing, tags, GitHub Releases) is in [RELEASING.md](RELEASING.md).\n\n---\n\nBuilt by [ADtention](https://adtention.ai). Same network as the\n[Claude Code status line](https://github.com/adtention-ai/claude) and the\n[OpenCode line](https://github.com/adtention-ai/opencode). MIT — see [LICENSE](LICENSE).\n","readmeFilename":"README.md","_rev":"1-9e81a32acf44f4c9f65b2e6d24970825"}