Skip to content

docs(B-0845): TS CLI arg-parser library evaluation — citty/commander/clipanion/manual#5377

Merged
AceHack merged 1 commit into
mainfrom
docs-b0845-ts-cli-arg-parser-library-evaluation-citty-vs-commander-vs-clipanion-aaron-2026-05-26
May 27, 2026
Merged

docs(B-0845): TS CLI arg-parser library evaluation — citty/commander/clipanion/manual#5377
AceHack merged 1 commit into
mainfrom
docs-b0845-ts-cli-arg-parser-library-evaluation-citty-vs-commander-vs-clipanion-aaron-2026-05-26

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 27, 2026

What

Operator 2026-05-26: "is there some cli package we should use for ts for the --parameter helpers and such? we have a lot of ts scripts that function similar to shell script"

Recognizes bandwidth-engineering inefficiency in Zeta TS substrate. zflash.ts / flash-usb.ts / poll-pr-gate-batch.ts / audit-installer-substrate.ts each have ~80-150 LOC of manual arg-parsing boilerplate.

3-phase target

  • Phase 1: evaluation doc (citty vs commander vs clipanion vs cmd-ts vs manual)
  • Phase 2: pilot migrate ONE non-destructive script (poll-pr-gate-batch.ts candidate)
  • Phase 3: per-script sub-rows for remaining migrations

Otto-CLI first-pass recommendation

citty for new scripts (ESM-native + TypeScript-native + ~5KB bundle + UnJS-ecosystem alignment + Bun-friendly). Tradeoff vs commander: commander has 15+ years maturity; for destructive tools that maturity might be worth the bundle-size cost.

Phase 1 evaluation doc lands the substrate-honest comparison.

Composes with

  • B-0844 (zflash --agent flag — would benefit from cleaner arg-parsing on next iteration)
  • `.claude/rules/bandwidth-served-falsifier.md` (canonical lib IS bandwidth-engineering)
  • `.claude/rules/dep-pin-search-first-authority.md` (Phase 1 MUST WebSearch current latest stable)
  • `.claude/rules/rule-0-no-sh-files.md` (TS-over-bash discipline; this makes TS more ergonomic)

🤖 Generated with Claude Code

…er vs clipanion vs manual; operator-explicit substrate-engineering question 2026-05-26

Operator 2026-05-26 substrate-honest observation:
'is there some cli package we should use for ts for the --parameter
helpers and such? we have a lot of ts scripts that function similar
to shell script'

Recognizes bandwidth-engineering inefficiency in Zeta TS substrate:
zflash.ts, flash-usb.ts, poll-pr-gate-batch.ts, audit-installer-
substrate.ts etc. each have ~80-150 LOC of manual arg-parsing
boilerplate (ALLOWED_FLAGS Set + manual loop + inline help-text +
manual unknown-flag rejection).

3 phases:
- Phase 1: evaluation doc at docs/research/ comparing citty +
  commander + clipanion + cmd-ts + manual; concrete code samples;
  bundle-size + Bun startup measurements; recommendation
- Phase 2: pilot migrate ONE non-destructive script (poll-pr-gate-
  batch.ts candidate); verify LOC reduction + tests pass + cold-start
  perf
- Phase 3: per-script sub-rows for remaining migrations; prioritize
  by high-boilerplate + high-churn + low-risk; defer destructive-
  tool migration

Otto-CLI first-pass recommendation: citty for new scripts (ESM-native +
TypeScript-native + lightweight + UnJS-ecosystem-alignment + Bun-friendly).
Tradeoff vs commander: maturity for destructive tools. Phase 1
evaluation doc lands the substrate-honest comparison.

P2 priority — substrate-engineering hygiene; not blocking current work;
current manual pattern works; library choice has long-term lock-in worth
deliberating.

Per 'backlog rows land immediately; decompose later' discipline.
Copilot AI review requested due to automatic review settings May 27, 2026 01:59
@AceHack AceHack enabled auto-merge (squash) May 27, 2026 01:59
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack AceHack merged commit dc133b4 into main May 27, 2026
29 of 30 checks passed
@AceHack AceHack deleted the docs-b0845-ts-cli-arg-parser-library-evaluation-citty-vs-commander-vs-clipanion-aaron-2026-05-26 branch May 27, 2026 02:01
@AceHack AceHack review requested due to automatic review settings May 27, 2026 02:24
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.

1 participant