Skip to content

lf invite ​

lf invite manages both battle invites and community invites.

lf invite <subcommand> [options]

Battle invite subcommands ​

lf invite create ​

Create a battle invite link.

bash
lf invite create --battle <battle-id> --type public
lf invite create --battle <battle-id> --type qr
lf invite create --battle <battle-id> --type private --target @alice
lf invite create --battle <battle-id> --type link --json
FlagDefaultDescription
--battle <id>requiredBattle UUID
--type <type>publicpublic · private · link · qr
--target <handle|email>—Required for --type private
--jsonfalseOutput invite URL and token as JSON

Invite types:

TypeAccessible byTracked
publicAnyone (unauthenticated)click_count, referral_source
privateSpecific handle or emailinvite_target, accepted_at
linkAnyone with the URLclick_count
qrQR code scanqr_scan_count

Output:

✔ Battle invite created.
URL:   https://lenserfight.com/b/my-battle?ref=abc123
Token: a1b2c3d4e5
Type:  public

Marks invite_sent in the developer journey on first use.


lf invite qr ​

Render the battle invite QR code in the terminal.

bash
lf invite qr --battle <battle-id>

Generates a new invite of type qr and renders it using block characters. If the terminal does not support the output, prints the URL as a fallback.


lf invite stats ​

Show invite statistics for a battle.

bash
lf invite stats --battle <battle-id>
lf invite stats --battle <battle-id> --json

Output:

Battle invite stats for a1b2c3d4-...
Link clicks:  14
QR scans:     3
Accepted:     2
Converted:    1

lf invite list ​

List all invites for a battle.

bash
lf invite list --battle <battle-id>
lf invite list --battle <battle-id> --json

Community invite subcommands ​

lf invite send ​

Send a community invite to a user.

bash
lf invite send @alice
lf invite send alice@example.com --role moderator
lf invite send @alice --community my-community --message "Join us!"
FlagDefaultDescription
<target>requiredHandle or email (positional)
--role <role>membermember · moderator · admin
--community <slug>contextOverride active community
--message <text>—Optional personal message
--jsonfalseOutput as JSON

lf invite status ​

Check the status of a community invite by ID.

bash
lf invite status <invite-id>
lf invite status <invite-id> --json

lf invite revoke ​

Revoke a community invite by ID.

bash
lf invite revoke <invite-id>

lf invite pending ​

List pending community invites.

bash
lf invite pending
lf invite pending --community my-community
lf invite pending --json

bash
lf battle join https://lenserfight.com/b/my-battle?ref=abc123

The ref parameter is preserved through the auth flow and written to your referral source on account creation.


New RPCs required (migration gate) ​

The battle invite subcommands depend on Supabase functions that are added in the upcoming YYYYMMDD_battle_invites.sql migration:

RPCPurpose
fn_battle_invite_createCreate invite, return URL + token
fn_battle_invite_statsReturn click/scan/accepted/converted counts
fn_battle_invite_listList all invites for a battle
fn_battle_invite_acceptMark an invite as accepted

Until the migration is applied, these subcommands will return an error. Run lf doctor --check journey to verify RPC availability.


lf invite ​

Manage invites. Use lf invite create --battle <id> for battle invites or lf invite send <target> for community invites.