Skip to content

refactor(cli): Centralize target syntax and lint free-text help examples - #1652

Merged
BYK merged 3 commits into
mainfrom
byk/cli-help-target-specs
Oct 24, 2026
Merged

BYK merged 3 commits into
mainfrom
byk/cli-help-target-specs

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Fixes #1649.

Many command fullDescription strings still had hand-aligned blocks of indented sentry … lines (Target patterns:, Target specification:, Usage:, Pagination:, Filtering and output: and others). They restated the target syntax for each command, and they showed up in --help next to the Examples: section that docs.examples already renders.

  • Removed those blocks from 43 command and route fullDescriptions. If a block had an example that docs.examples didn't, I moved it into docs.examples (auto-detect, project search, explicit org/trace, pagination, and a few missing flags). A few one-line hints are now inline prose instead.
  • Added ORG_ALL_TARGET_BRIEF and PROJECT_TARGET_BRIEF to list-command.ts. They now describe the target forms for the list positionals, plus the feedback, replay, explore, trace list and project view positionals, whose wording had drifted. The explanation of how the trailing slash works still comes from targetPatternExplanation() / TARGET_PATTERN_NOTE.
  • Skill references now include the same Arguments table as the generated command docs, so the target syntax appears in --help, the docs and the skills from that one positional brief.
  • no-examples-in-full-description now also flags indented lines that start with sentry , whatever label sits above them. The rule tests cover a Target patterns: block and a template-literal case. Both fail against the old rule.
  • Updated packages/cli/AGENTS.md to match.

via BYK.

--

View Junior Session in Sentry

Command fullDescription strings carried hand-aligned 'Target patterns:',
'Usage:', 'Pagination:' and similar blocks of indented sentry lines. They
restated target syntax per command and duplicated docs.examples in --help.

Remove those blocks and move any example they had that docs.examples lacked
into docs.examples. Describe [<org>/][<project>] target forms once, in
ORG_ALL_TARGET_BRIEF and PROJECT_TARGET_BRIEF, and use them for the list
positionals that had drifted. Render positional arguments in the skill
references so the target syntax appears in --help, the docs and the skills.

Extend no-examples-in-full-description to flag indented sentry lines under
any label.

Fixes #1649

Co-Authored-By: BYK <burak.kaya@sentry.io>
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Oct 24, 2026 3:48pm UTC

Request Review

The propose-version footer goes to stdout, so an unquoted command
substitution passed it to release create as extra arguments. Read the
version from --json instead. Update the log list e2e help assertion for
the reworded trace-filter text.
…pecs

# Conflicts:
#	packages/cli/src/commands/explore.ts

Co-Authored-By: BYK <burak.kaya@sentry.io>
@BYK
BYK merged commit f6fbc82 into main Oct 24, 2026
34 of 35 checks passed
@BYK
BYK deleted the byk/cli-help-target-specs branch October 24, 2026 18:52

This branch was previously deployed

1 inactive deployment
Preview — 9a486978 Deployed Oct 24, 2026 by vercel[bot]
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.

CLI: Centralize target specs and lint free-text examples in fullDescription

1 participant