-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Summary
sentry project create currently accepts a <platform> argument but provides no guidance on valid values beyond a static docs link (recently removed). Sourcing the platform list dynamically from the release registry would enable shell auto-complete in interactive sessions and a formatted tree-view in non-interactive ones.
Current behavior
The platform argument for sentry project create is a free-form string. The error message for invalid input lists available platforms but has no shell completion support. The platform list is hardcoded/static and not sourced from a live registry.
// src/commands/project/create.ts
"Run 'sentry project create <name> <platform>' with any valid Sentry platform identifier."Gap
Users have no discoverability for valid platform identifiers at the CLI level. They must look up values externally, and the CLI cannot validate or suggest values at input time.
Options
Option A — Dynamic auto-complete + interactive tree-view
- Fetch platform slugs from
https://release-registry.services.sentry.io/sdksat runtime. - Derive platform identifiers by stripping the
sentry.prefix and converting.to-(matching the slugification logic in the Sentry monorepo). - In interactive shells: register completions so the user gets tab-completion suggestions.
- In non-interactive mode (e.g., CI, pipes): print a formatted tree-view grouped by language/category when an invalid or missing platform is supplied.
Option B — Cached static list baked at build time
- Snapshot the platform list from the registry at release time and embed it in the binary.
- Simpler implementation but goes stale between releases.
Recommendation
Option A. The release registry is the authoritative source and is already used by other Sentry tooling. Dynamic fetching keeps the list accurate without re-releases, and the interactive/non-interactive split gives the best UX in both contexts.
References
- Source comment: feat(project): add
project createcommand #237 (comment) - Release registry: https://release-registry.services.sentry.io/sdks