Add referral commands and a referral-code sign-in flag#35
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
goodeye referral statusshows 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.--referral-codeoption ongoodeye login,goodeye login-verify, andgoodeye register-verifyredeems 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.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-filescleanuv run pytestgreen (743 passed)🤖 Generated with Claude Code