Skip to content

feat(cli): flag standardization with deprecation aliases#282

Merged
cdot65 merged 4 commits into
mainfrom
cdot65/feat/flag-standardization
Jul 7, 2026
Merged

feat(cli): flag standardization with deprecation aliases#282
cdot65 merged 4 commits into
mainfrom
cdot65/feat/flag-standardization

Conversation

@cdot65

@cdot65 cdot65 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Canonical flag scheme applied repo-wide; every old spelling keeps working through v2 via hidden aliases with a one-line stderr deprecation notice (removal in v3, per user decision).

Scheme

  • --output = format everywhere (--format deprecated on topics create/apply/eval/revert, targets backup)
  • File destinations → --output-file (bulk-scan, resume-poll, topics sample, prompt-sets download, targets init)
  • Input files → --file (bulk-scan --input deprecated)
  • Pagination → --limit/--offset (DLP --page/--size, scan-logs --page/--page-size deprecated; page-based APIs round offset to page boundary)
  • --force canonical (eula --confirm deprecated)
  • Added: --output on redteam prompts list/get, instances get, registry-credentials; client-side --limit/--offset on redteam prompt-sets/properties/targets list

Infrastructure

  • src/cli/deprecated-flags.ts — alias registration + resolution helper (TDD'd)
  • src/cli/pagination.ts — page↔offset conversion for page-based APIs
  • Docs: new Flag Migration page (sidebar-registered)

Testing

  • 33 new tests (helper contract, structural sweep over 16 renamed commands via buildProgram() tree walk, parse behavior, pagination math)
  • 690/690; lint + tsc + build + docs-build clean
  • Smokes: renamed helps show canonical only; deprecated run warns on stderr and still works

Checklist

  • TDD
  • Gates green
  • Docs + changeset (minor)

Closes #270

@cdot65 cdot65 merged commit 8ba36c7 into main Jul 7, 2026
4 checks passed
@cdot65 cdot65 deleted the cdot65/feat/flag-standardization branch July 7, 2026 02:05
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.

feat(cli): flag standardization with deprecation aliases

1 participant