CLI commands

The binary is rebate. Running it with no subcommand starts the interactive onboarding.
CommandWhat it does
rebateInteractive onboarding: detect Claude Code, get consent, back up settings, patch, and show the line. -y/--yes skips prompts.
rebate onSame as rebate. Also accepts -y/--yes.
rebate statusShow on/off state, your device id, the cached ad, and your live earnings URL.
rebate openOpen the current sponsor in your browser.
rebate offRestore Claude Code to its original state from the byte-exact backup.
Two hidden subcommands exist for the integration itself: rebate statusline (Claude Code invokes it on each status refresh) and rebate refresh (fetches the next ad into the cache in the background). You never need to run them yourself.

The /ad slash command

Onboarding installs one Claude Code command file at ~/.claude/commands/ad.md. Typing /ad inside a Claude Code session runs rebate open, which opens the current sponsor link in your browser. This works from any terminal, including ones that do not render status-bar hyperlinks. rebate off removes the file.

What gets written to Claude Code settings

Exactly three keys in ~/.claude/settings.json:
{
  "statusLine": { "type": "command", "command": "rebate statusline", "padding": 0 },
  "spinnerVerbs": { "mode": "replace", "verbs": ["<current ad text>"] },
  "env": { "FORCE_HYPERLINK": "1" }
}
FORCE_HYPERLINK is the documented override for the supports-hyperlinks package, whose terminal allowlist misses several hyperlink-capable terminals; without it the sponsored line’s links would not reach the terminal. A byte-exact backup is written to settings.json.rebate-backup before the first patch.

Local files

PathContents
~/.rebate/deviceYour anonymous device id (a random UUID)
~/.rebate/ad.jsonThe cached ad currently being rendered
~/.claude/settings.json.rebate-backupByte-exact backup of your original settings
~/.claude/commands/ad.mdThe /ad slash command

Environment overrides

VariablePurpose
REBATE_API_URLWhere to fetch ads (default production, https://selltraces.com)
REBATE_SETTINGS_PATHThe settings file to patch (for claude --settings <file>)
REBATE_CLAUDE_DIRClaude Code’s config dir (default ~/.claude)
REBATE_DIRRebates state dir (default ~/.rebate)
REBATE_STATUSLINE_CMDThe command string written into statusLine
REBATE_AD_COMMAND_PATHWhere the /ad command file is written
REBATE_HTTP_TIMEOUT_MSAd-fetch timeout in milliseconds (default 4000)

Testing without Claude Code

The status line is just a command Claude Code pipes JSON to, so you can exercise it directly:
echo '{"session_id":"x","model":{"display_name":"Opus"}}' | rebate statusline
The output is byte-identical to what Claude Code displays.