project create: dynamic platform auto-complete from release registry

Open
#345 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
cli

Research direction

Start in src/commands/project/create.ts and read the linked PR discussion, then inspect the release registry response at the referenced URL. Verify the stated slug transformation and determine how interactive completion differs from non-interactive output. Done means platforms come from the registry, valid identifiers are suggested interactively, and invalid or missing input produces the specified grouped tree view.

Written by the indexing model from the issue text.

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/sdks at 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

Dominant language
TypeScript
Stars
121
Forks
14
Avg merge
22h 3m
Merged PRs (30d)
94

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/cli

All issues in getsentry/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.