Skip to content

feat: add --version flag to CLI #61

@George-iam

Description

@George-iam

The CLI (src/cli.ts) currently supports serve, setup, status, and hook subcommands, but has no --version or -v flag. Running axme-code --version should print the version from package.json (injected at build time via the __VERSION__ esbuild define constant, available as AXME_CODE_VERSION from src/types.ts). This is a small addition to the argument parsing logic in cli.ts.

Relevant files:

  • src/cli.ts — add --version / -v flag handling early in the arg parsing
  • src/types.tsAXME_CODE_VERSION constant (already exists)
  • build.mjs — defines __VERSION__ at build time (no changes needed)

Acceptance criteria:

  • axme-code --version prints the version string and exits
  • axme-code -v does the same
  • npm run build succeeds

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions