aicash
v0.4.1
Published
Spinner/wait-time text ads for AI CLIs (Claude Code, Codex, opencode) powered by the Gravity ad network
Maintainers
Readme
aicash
Wait-time text ads for AI CLIs. aicash adds one unobtrusive line to your Claude Code status bar, the OpenCode TUI, and the VS Code status bar while the AI is working — and pays you a revenue share for it. The same extension also runs in VS Code forks like Kiro IDE and AntiGravity IDE via Open VSX. Chat agents are supported too: Hermes (hermes-agent) and OpenClaw get one sponsored line appended to longer replies, paced server-side.
Install
npm i -g aicash # install the CLI globally
aicash install # add the ad line to every detected host (Claude Code, OpenCode, VS Code, Kiro, AntiGravity, Hermes, OpenClaw)
aicash login # optional — link this machine to earn a revenue shareOpen a new Claude Code session and the ad line appears in the status bar.
If OpenCode is installed, the same command also registers the aicash TUI plugin
(one ad line below the conversation). If the code CLI is on your PATH, it
installs the aicash VS Code extension
too (one ad line at the right of the status bar). On Kiro IDE, AntiGravity IDE,
or another VS Code fork, install the same extension from
Open VSX. If Hermes
or OpenClaw is installed, the same command copies/registers their aicash
plugin and enables it (restart the agent's gateway to load it).
That's it — no API key, no .env, no config to set. The client talks to the
hosted aicash network by default. aicash install backs up your existing
~/.claude/settings.json (and OpenCode's tui.json) with an .aicash-bak copy
before changing them.
Commands
| Command | What it does |
|---------|--------------|
| aicash install | Add the ad line to every detected host: Claude Code statusLine, OpenCode TUI plugin, VS Code/Kiro/AntiGravity extension, Hermes plugin, OpenClaw plugin (add --force to overwrite a non-aicash statusLine) |
| aicash login | Email-code login that links this machine to your account so impressions earn a share |
| aicash whoami | Show the signed-in account + this machine's installId |
| aicash logout | Sign out on this machine (it keeps serving ads anonymously) |
| aicash uninstall | Remove aicash from every host: statusLine, OpenCode plugin entry, VS Code/Kiro/AntiGravity extension, Hermes/OpenClaw plugins |
| aicash status | Offline summary of local state: statusLine installed, account, installId, last cached ad |
| aicash preview | Render a sample ad in the terminal to see how it looks (--toast for the toast form) |
| aicash doctor | Diagnose your setup: statusLine, script path, node on PATH, login, proxy connectivity |
| aicash update | Update aicash to the latest published version (runs npm i -g aicash@latest) |
| aicash --version | Show the installed version and check npm for a newer one (alias: -v) |
Earning
aicash install alone already serves ads anonymously. Run aicash login once
to bind this machine to your account — after that every impression accrues to
you. Track earnings and set your USDC payout wallet at
app.aicash.fun.
How it works
On each status refresh, aicash reads recent conversation context from the transcript, requests one contextual ad, caches it per session, and prints a single clickable line. It is built to never crash and never lag Claude Code: network calls time out fast, impressions fire-and-forget, and on any error it prints nothing so your status bar is unaffected.
In OpenCode the same engine runs as a TUI plugin (dist/opencode.tsx,
registered in ~/.config/opencode/tui.json): it renders one sponsored line
below the conversation, refreshes on the same per-session cache, and follows
the same never-crash rule. Use the aicash: Open sponsored link command from
the palette to open the current ad. Both hosts share one installId, so all
impressions accrue to the same account.
Hermes & OpenClaw (chat agents)
Hermes and OpenClaw are personal AI agents you chat with on Telegram, WhatsApp,
Discord, etc. There aicash appends one sponsored line (📢 <ad text> — <brand>
with a link) to the end of longer replies — attached by the plugin after the
model has finished, so the AI never sees the ad and it costs no tokens. Pacing
is server-side (max ~1 ad per 3 minutes per chat); short replies are never
touched. Two ways to install, both valid:
- From chat — these agents can run shell commands themselves. Message
yours: "Install aicash: run
npm i -g aicash && aicash login && aicash install, then restart your gateway." When login asks for the email code, tell it the code in the chat. - From the CLI on the agent's machine:
npm i -g aicash→aicash login→aicash install(detects Hermes/OpenClaw, copies + enables the plugin) → restart the gateway (hermes gateway restart/openclaw gateway restart).aicash statusshows a ✓ per tool.
Send /aicash in any chat to check status (install id, login, last ad); without
aicash login the plugin stays completely silent. Privacy: no conversation
content is ever sent for targeting — only a coarse signal like the platform name
(e.g. "telegram"). Turn it off with aicash uninstall, or per tool via
plugins.enabled (Hermes) / plugins.entries.aicash.enabled (OpenClaw). On
OpenClaw + Telegram, set channels.telegram.linkPreview: false in
openclaw.json to avoid big link-preview cards (Hermes disables previews by
default).
Uninstall
aicash uninstall # removes only aicash's statusLine + OpenCode plugin entry; everything else is left intactBuilding, self-hosting the proxy, or running the network yourself? See
docs/MAINTAINING.md.
