Skip to content

Add referral commands and a referral-code sign-in flag#35

Merged
rhiever merged 5 commits into
mainfrom
referral-commands
Jun 15, 2026
Merged

Add referral commands and a referral-code sign-in flag#35
rhiever merged 5 commits into
mainfrom
referral-commands

Conversation

@rhiever

@rhiever rhiever commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • goodeye referral status shows your referral code, ready-to-paste sharing instructions, and your stats (how many redeemed, how many qualified, bonus credits earned, and reward slots remaining).
  • goodeye referral redeem <code> redeems a referral code for one-time bonus credits.
  • A --referral-code option on goodeye login, goodeye login-verify, and goodeye register-verify redeems the code right after you authenticate. A failed redeem is non-fatal: you stay signed in and the CLI explains why the code was not applied.
  • New error slugs (referral_code_not_found, self_referral, already_referred, referral_not_eligible) render with clear messages.

Consumes the referral REST routes added on the server (GET /v1/referrals/me, POST /v1/referrals/redeem).

Test plan

  • uv run pre-commit run --all-files clean
  • uv run pytest green (743 passed)
  • Commands work against a server that has the referral routes

🤖 Generated with Claude Code

rhiever and others added 5 commits June 15, 2026 01:01
Add --referral-code to register-verify, login (device-code), and
login-verify. After credentials are saved, the new _maybe_redeem_referral
helper calls the redeem endpoint with the supplied code. Failure is
non-fatal: the user stays signed in and a yellow warning is printed.
Initiation hints in register and login --email mention the flag for the
verify step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The redeem help text said bonus credits arrive after qualification, but
the invitee bonus lands immediately on a valid redeem; only the referrer
reward is paid later, once the redeemer's account is activated. Correct
the wording so the help matches actual behavior.

Also guard the human output against a blank referrer handle so the CLI no
longer prints a bare "@" when the server returns an empty referrer_handle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Aligns the subcommand group with every other group (teams, templates,
verifiers, invitations, workflows) which all use the plural form. Only the
user-typed command token changes; the --referral-code flag, prose, wire
models, and client methods stay as-is.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rename the user-facing referral status field from "qualified" to
"activated" so the CLI matches the server and the "activate your account"
language. The status response field is now activated_count across the wire
model, the JSON payload, and the human-readable label. Drop the raw
"(status: ...)" suffix from the redeem confirmation line; the status value
stays in the --json payload for programmatic consumers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rhiever rhiever merged commit c3f740a into main Jun 15, 2026
1 check passed
@rhiever rhiever deleted the referral-commands branch June 15, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant