feat: add CLI –version flag (#492)

Adds a new flag to cli `--version` that prints the current version and
exits

---------

Co-authored-by: Thibault Sottiaux <tibo@openai.com>
This commit is contained in:
narenoai
2025-04-22 09:28:21 -07:00
committed by GitHub
parent ee6e1765fa
commit dd330646d2

View File

@@ -52,6 +52,8 @@ const cli = meow(
$ codex completion <bash|zsh|fish>
Options
--version Print version and exit
-h, --help Show usage and exit
-m, --model <model> Model to use for completions (default: o4-mini)
-p, --provider <provider> Provider to use for completions (default: openai)
@@ -97,6 +99,7 @@ const cli = meow(
flags: {
// misc
help: { type: "boolean", aliases: ["h"] },
version: { type: "boolean", description: "Print version and exit" },
view: { type: "string" },
model: { type: "string", aliases: ["m"] },
provider: { type: "string", aliases: ["p"] },