Skip to content

feat: enhance claim-tokens create with cohort selection and tags#111

Merged
mobileoverlord merged 1 commit intomainfrom
enhance-claim-token-gen
Mar 25, 2026
Merged

feat: enhance claim-tokens create with cohort selection and tags#111
mobileoverlord merged 1 commit intomainfrom
enhance-claim-token-gen

Conversation

@lee-reinhardt
Copy link
Member

@lee-reinhardt lee-reinhardt commented Mar 24, 2026

Summary

Enhances avocado connect claim-tokens create with interactive project/cohort selection and tag support.

What changed

  • Interactive cohort picker: When --cohort is not provided, the CLI walks through project selection → cohort selection (same flow as connect init). Auto-selects when only one option exists. Falls back to org-scoped token if no projects or cohorts are found.
  • Tag support: New --tag / -t flag (repeatable) associates tags with devices claimed using the token. Tags are validated server-side (max 20, no spaces or commas).
  • --cohort flag: Accepts a cohort ID directly, skipping the interactive picker. No --project required — the API validates the cohort ID.
  • --project flag: Optionally pre-selects the project for the cohort picker, skipping the project prompt.

Usage examples

# Interactive: prompts for project then cohort
avocado connect claim-tokens create --name my-token

# Non-interactive: cohort ID directly
avocado connect claim-tokens create --name my-token --cohort <id>

# With tags
avocado connect claim-tokens create --name my-token -t production -t us-west -t batch-march2026

# Full non-interactive
avocado connect claim-tokens create --name my-token --cohort <id> -t production --no-expiration

@lee-reinhardt lee-reinhardt force-pushed the enhance-claim-token-gen branch from e150648 to 2021470 Compare March 24, 2026 20:53
@lee-reinhardt lee-reinhardt force-pushed the enhance-claim-token-gen branch from 2021470 to 1a9007f Compare March 25, 2026 00:32
@mobileoverlord mobileoverlord force-pushed the enhance-claim-token-gen branch from 1a9007f to 8fd9008 Compare March 25, 2026 02:29
@mobileoverlord mobileoverlord merged commit 8fd9008 into main Mar 25, 2026
3 of 4 checks passed
@mobileoverlord mobileoverlord deleted the enhance-claim-token-gen branch March 25, 2026 02:29
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.

2 participants