CLI: add --version flag #32

Closed
opened 2026-06-02 00:37:20 +00:00 by xingyue · 0 comments
Owner

What

ocas --version should print the current CLI version (e.g. 0.1.1-rc.1).

Why

  • Standard CLI convention — users expect --version / -v to report the installed version
  • Helps debug version mismatch issues (e.g. npm global vs bun global shadowing)
  • ocas prompt setup references version but there's no way to query it from the CLI itself

Suggested behavior

$ ocas --version
0.1.1-rc.1

Read from package.json version field at build/runtime.

## What `ocas --version` should print the current CLI version (e.g. `0.1.1-rc.1`). ## Why - Standard CLI convention — users expect `--version` / `-v` to report the installed version - Helps debug version mismatch issues (e.g. npm global vs bun global shadowing) - `ocas prompt setup` references version but there's no way to query it from the CLI itself ## Suggested behavior ```bash $ ocas --version 0.1.1-rc.1 ``` Read from `package.json` version field at build/runtime.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/ocas#32