← back to Waitline

README.md

40 lines

# Waitline

Clone of the Kickbacks.ai idea (github.com/andrewmccalip/kickbacks.ai): monetize
AI-agent wait states. While Claude Code is busy, the status line shows one
sponsored line; 50% of the ad dollar accrues to the user.

Key difference from upstream: **no binary patching.** Upstream injects into
Claude Code's `index.js` and re-patches after every self-update. Waitline uses
Claude Code's sanctioned `statusLine` hook — a script Claude Code runs on every
render — so nothing Anthropic ships is ever modified.

## Pieces

- `server.js` — zero-dependency Node ad server on `127.0.0.1:9718`.
  Weighted CPM rotation, append-only `data/ledger.jsonl` (impressions/clicks,
  gross + 50% user share), `/api/ad`, `/api/click`, `/api/stats`,
  `/healthz` (open), `/admin` dashboard (basic auth `admin`/`DW2024!`).
- `statusline.sh` — Claude Code statusLine command. Polls `/api/ad` (60s cache
  so repaints don't inflate impressions), prints
  `💰 Sponsor: line · $0.0042 earned | Opus`.
- `data/ads.json` — inventory. Seeded with 5 house ads (own-portfolio
  cross-promo, same bootstrap play upstream used before real advertisers).

## Enable in Claude Code (Steve-gated: settings.json edit)

```json
"statusLine": { "type": "command", "command": "~/Projects/waitline/statusline.sh" }
```

## Run

```sh
node server.js            # or: pm2 start server.js --name waitline
```

## Not built yet (deliberately)

Advertiser self-serve/bidding portal, Stripe payouts, multi-user accounts,
public deploy (would go to waitline.agentabrams.com per standing rule — gated).