giggle-ad
v0.3.0
Published
Giggle CLI (giggle.ad) — advertisers manage campaigns and publishers earn USDC for one sponsored line in their Claude Code status bar.
Readme
giggle-ad
The CLI for Giggle — a crypto-native ad network for AI coding tools. Two audiences, one command:
- Publishers / devs render one tasteful sponsored line in their Claude Code status bar and earn USDC (90%, settled on Base, no payout floor).
- Advertisers manage campaigns from the terminal and fund them with USDC via x402.
npx giggle-ad install # publishers: wire the status-line renderer + register
npx giggle-ad login # advertisers: browser wallet auth → manage campaignsThe installed command is giggle. Self-contained bundle, no runtime deps. Talks to
https://giggle.ad/api/v1 by default (override with GIGGLE_API / GIGGLE_API_BASE).
Publisher (earn)
giggle install # copy the renderer + wire ~/.claude/settings.json (backs up + merges)
giggle register # one-time: device key + payout wallet bind
giggle balance # today / month / lifetime / pending (withdrawable) / held / paid
giggle withdraw # withdraw pending USDC (omit amount = full balance)
giggle payouts # payout history with on-chain tx linksThat's the whole setup — no daemon to run. The status-line renderer is fast (cache-only,
no network) so it never blocks; while you're actively working it fires the network tick as a
detached, throttled (~30s) background child that fetches the next serve and submits the previous
impression receipt. It runs only while Claude Code is open and you're active — which is exactly
when an impression is billable — and bills nothing when you're idle. (giggle daemon still
exists as an optional foreground poller for debugging.)
Advertiser (campaigns)
Auth is a gh/vercel-style device flow — the CLI never holds a funding key; funding
always signs in your browser.
giggle login # opens giggle.ad, connect wallet + authorize
giggle whoami / logout
giggle campaign create --name <n> --bid <usdc> # bid is per-impression (CPM = bid × 1000; $1 CPM floor)
giggle campaign ls
giggle campaign show <id> # status + point-in-time stats
giggle campaign launch | pause | resume <id>
giggle creative add <id> --body "<text>" --url <url>
giggle campaign fund <id> [amount] # opens giggle.ad/fund to sign the x402 paymentEnv
GIGGLE_API/GIGGLE_API_BASE— API base (defaulthttps://giggle.ad/api/v1)GIGGLE_HOME— config/cache dir (default~/.giggle)GIGGLE_CLAUDE_SETTINGS— settings.json pathinstallwires (default~/.claude/settings.json)
Build from source (dev)
cd client && npm run build # esbuild → dist/giggle.mjs (single bundled bin)Notes
- Money is always in USDC base units (6dp) on the wire; the CLI formats for display.
installmerges into~/.claude/settings.json(backs the prior file up tosettings.json.giggle-bak); to compose with your own status line, pointstatusLine.commandat~/.giggle/giggle-statusline.shyourself instead.- Publishers exist only via device-bind (
giggle register/giggle install); the web cannot create a publisher.
