Skip to content

PROD-2195 / PROD-2196: Fix hidden CLI flags in --help and correct README#162

Closed
5PK wants to merge 1 commit into
mainfrom
PROD-2195-2196
Closed

PROD-2195 / PROD-2196: Fix hidden CLI flags in --help and correct README#162
5PK wants to merge 1 commit into
mainfrom
PROD-2195-2196

Conversation

@5PK

@5PK 5PK commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes PROD-2195 (CLI --help omits real flags) and PROD-2196 (README inaccurate/outdated for several pull & sync flags).

PROD-2195 — hidden flags in --help

Root cause: yargs silently hides any option whose alias array contains the option's own key. sourceGuid, targetGuid, overwrite, force, and autoPublish all listed their own name as an alias, so they never rendered in pull/push/sync help.

Additionally, update declared "reset" as an alias, colliding with the separate reset option — this hid --reset from help and overwrote --update's description with reset's text.

  • Removed the self-referencing aliases (all other case/dash variants are kept and still work)
  • Decoupled --reset from --update; moved the Reset/RESET case variants onto the reset option. Note: previously --reset also implied --update=true via the alias collision; they are now independent flags (pull and sync force update=true in their handlers anyway)
  • Removed the dead targetGuid override in the push builder — it was defined before the ...systemArgs spread, which silently reverted its demandOption: true. The requirement is enforced in auth.validateCommand() after .env priming, so the documented AGILITY_TARGET_GUID fallback keeps working
  • targetGuid help text now mentions the AGILITY_TARGET_GUID fallback

All systemArgs options (--sourceGuid, --targetGuid, --overwrite, --force, --reset, --autoPublish, etc.) now appear in pull/push/sync --help — verified against a local build.

PROD-2196 — README corrections (all 5 reported items)

  1. --overwrite now documented as conflict-scoped (only overwrites target items in conflict with the source), matching the implementation in the model/content pushers
  2. --models-with-deps now documented as including pages (plus templates), matching the CLI behavior and help text
  3. pull --sourceGuid marked optional with AGILITY_GUID .env fallback
  4. Documented previously missing flags: --channel, --preview, --dryRun, --contentIDs, --pageIDs, --insecure, --legacyFolders, --baseUrl, --token, --force, --reset, plus a note on developer modes (--dev, --local, --preprod, --test)
  5. --elements default list now includes Sitemaps

🤖 Generated with Claude Code

- Remove self-referencing yargs aliases (sourceGuid, targetGuid, overwrite,
  force, autoPublish) which caused yargs to hide those options from --help
- Decouple --reset from --update: "reset" was declared as an alias of update,
  colliding with the separate reset option, hiding it from help and
  overwriting update's description
- Remove dead targetGuid override in push builder (it was silently reverted
  by the ...systemArgs spread; requirement is enforced in validateCommand
  after .env priming so AGILITY_TARGET_GUID keeps working)
- README: document conflict-scoped --overwrite behavior, correct
  --models-with-deps to include pages, mark pull --sourceGuid optional with
  AGILITY_GUID fallback, add Sitemaps to --elements default, and document
  missing flags (--channel, --preview, --dryRun, --contentIDs, --pageIDs,
  --insecure, --legacyFolders, --baseUrl, --token, --force, --reset, dev modes)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@5PK 5PK requested a review from jules-exel June 12, 2026 15:24
@5PK 5PK marked this pull request as ready for review June 15, 2026 14:15
@5PK 5PK marked this pull request as draft June 15, 2026 14:16
@5PK

5PK commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #163. This PR was based on the older PROD-2195-2196 branch and documented several flags that #163 removes as part of the PROD-2195 system-args cleanup. Closing in favor of #163, which reconciles the README with the removed flags.

@5PK 5PK closed this Jun 15, 2026
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