CLI commands
The binary isrebate. Running it with no subcommand starts the interactive onboarding.
| Command | What it does |
|---|---|
rebate | Interactive onboarding: detect Claude Code, get consent, back up settings, patch, and show the line. -y/--yes skips prompts. |
rebate on | Same as rebate. Also accepts -y/--yes. |
rebate status | Show on/off state, your device id, the cached ad, and your live earnings URL. |
rebate open | Open the current sponsor in your browser. |
rebate off | Restore Claude Code to its original state from the byte-exact backup. |
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:
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
| Path | Contents |
|---|---|
~/.rebate/device | Your anonymous device id (a random UUID) |
~/.rebate/ad.json | The cached ad currently being rendered |
~/.claude/settings.json.rebate-backup | Byte-exact backup of your original settings |
~/.claude/commands/ad.md | The /ad slash command |
Environment overrides
| Variable | Purpose |
|---|---|
REBATE_API_URL | Where to fetch ads (default production, https://selltraces.com) |
REBATE_SETTINGS_PATH | The settings file to patch (for claude --settings <file>) |
REBATE_CLAUDE_DIR | Claude Code’s config dir (default ~/.claude) |
REBATE_DIR | Rebates state dir (default ~/.rebate) |
REBATE_STATUSLINE_CMD | The command string written into statusLine |
REBATE_AD_COMMAND_PATH | Where the /ad command file is written |
REBATE_HTTP_TIMEOUT_MS | Ad-fetch timeout in milliseconds (default 4000) |