Skip to content

feat(cli): add --help and --version output #33

Description

@afurm

The packaged draftmora command currently starts the server for every invocation. New CLI users should be able to inspect usage and the installed version without starting the app.

Suggested scope:

  • Update bin/draftmora.mjs so draftmora --help and draftmora -h print concise usage and exit 0 before importing the server bundle.
  • Update draftmora --version and draftmora -v to print the package version and exit 0 before importing the server bundle.
  • Keep plain draftmora behavior unchanged.
  • Include default ports and the main environment variables in the help text: API_PORT, PORT, WEB_PORT, BOARD_DB_PATH, and OPENAI_API_KEY.

Acceptance criteria:

  • node bin/draftmora.mjs --help prints usage and does not start the Fastify server.
  • node bin/draftmora.mjs --version prints the current package version.
  • The packaged CLI path still starts the app when run without flags.
  • Add the smallest practical test or documented verification command.
  • npm run typecheck, npm test, and npm pack --dry-run pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededsetupInstallation, startup, or local configuration help

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions