Conversation
bananabot9000
left a comment
There was a problem hiding this comment.
Review
Clean, well-structured. Proper CLI behaviour for a package that's about to be published.
What's good
-
Shared
Logtype —(msg: string) => voidcallback meansprintVersion/printHelpwork both pre-startup (console.log) and in-session (term.info). No duplication, same functions used in both contexts. Nice pattern. -
help.tsextraction — All help/version text in one file. Easy to maintain, easy to find, no string literals scattered acrossmain.tsandClaudeCli.ts. -
node:utilparseArgs — Using the built-in instead of pulling incommanderoryargsfor two flags. Right call for something this simple. -
strict: false— Allows unknown args without throwing. Smart since the CLI might want to pass-through args to the SDK later. -
-?manual check —parseArgsdoesn't support?in short options, soprocess.argv.includes('-?')is the pragmatic workaround. Windows/DOS users will appreciate it. -
Version info is rich — branch, sha, shortSha, commitDate, buildDate. Useful for debugging which build someone is running.
-
versionCalculator: 'git'— Dropped the gitversion dependency in favour of pure git-based version calculation. One less external tool requirement for contributors.
Minor
-
/helpin-session shows commands and controls, but--helpfrom CLI shows usage/options. Different content for different contexts — that's correct, but worth noting they're intentionally distinct (one is for using the CLI binary, the other is for using the interactive session). -
The biome-ignore comments for
console.loginmain.tsare sensible — app hasn't started yet, no terminal abstraction available.
Nothing to change. 🍌
Summary
Co-Authored-By: Claude noreply@anthropic.com