Skip to content

fix: read cli version from package.json instead of hardcoding#54

Open
0xAxiom wants to merge 1 commit intomainfrom
fix/cli-version-from-package-json
Open

fix: read cli version from package.json instead of hardcoding#54
0xAxiom wants to merge 1 commit intomainfrom
fix/cli-version-from-package-json

Conversation

@0xAxiom
Copy link
Owner

@0xAxiom 0xAxiom commented Feb 27, 2026

What

  • CLI --version flag now reads from CLI/package.json instead of hardcoding '1.0.0'

Why

The CLI version was hardcoded as '1.0.0' in the commander .version() call on line 46 of CLI/src/index.ts. This means appfactory --version would always report 1.0.0 regardless of the actual version in package.json (currently 1.0.0, but would drift on any version bump).

Reading from package.json at startup is the standard pattern (used by commander's own docs) and ensures the reported version always matches the package.

Tested

  • npx tsc --noEmit passes (CLI type-checks clean)
  • All 252 vitest tests passing
  • Lint-staged + commitlint hooks pass

the cli version was hardcoded as '1.0.0' in the commander .version() call,
which would always report 1.0.0 regardless of the actual package version.
now reads from CLI/package.json at startup for accurate version reporting.
@0xAxiom 0xAxiom requested a review from MeltedMindz as a code owner February 27, 2026 19:02
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