Skip to content

feat: add CLI –version flag - #492

Merged
tibo-openai merged 6 commits into
openai:mainfrom
narenoai:main
Apr 22, 2025
Merged

tibo-openai merged 6 commits into
openai:mainfrom
narenoai:main

Conversation

@narenoai

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Apr 21, 2025 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@narenoai

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Apr 21, 2025
@narenoai narenoai changed the title get version of codex Add CLI –version flag Apr 21, 2025
@fouad-openai

Copy link
Copy Markdown
Contributor

doesn't that already exist?

❯ codex --version
0.1.2504211509

@narenoai

Copy link
Copy Markdown
Contributor Author

Looks like meow automatically adds version. I did not realize this as the help option was not showing --version as one of the supported flags.


  Usage
    $ codex [options] <prompt>
    $ codex completion <bash|zsh|fish>

  Options
    -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)
    -i, --image <path>              Path(s) to image files to include as input
    -v, --view <rollout>            Inspect a previously saved rollout instead of starting a session
    -q, --quiet                     Non-interactive mode that only prints the assistant's final output
    -c, --config                    Open the instructions file in your editor
    -w, --writable-root <path>      Writable folder for sandbox in full-auto mode (can be specified multiple times)
    -a, --approval-mode <mode>      Override the approval policy: 'suggest', 'auto-edit', or 'full-auto'

    --auto-edit                Automatically approve file edits; still prompt for commands
    --full-auto                Automatically approve edits and commands when executed in the sandbox

    --no-project-doc           Do not automatically include the repository's 'codex.md'
    --project-doc <file>       Include an additional markdown file at <file> as context
    --full-stdout              Do not truncate stdout/stderr from command outputs
    --notify                   Enable desktop notifications for responses

    --flex-mode               Use "flex-mode" processing mode for the request (only supported
                              with models o3 and o4-mini)

  Dangerous options
    --dangerously-auto-approve-everything
                               Skip all confirmation prompts and execute commands without
                               sandboxing. Intended solely for ephemeral local testing.

  Experimental options
    -f, --full-context         Launch in "full-context" mode which loads the entire repository
                               into context and applies a batch of edits in one go. Incompatible
                               with all other flags, except for --model.

  Examples
    $ codex "Write and run a python program that prints ASCII art"
    $ codex -q "fix build issues"
    $ codex completion bash

@narenoai

Copy link
Copy Markdown
Contributor Author

new changes reflect just reflect help output:

  Usage
    $ codex [options] <prompt>
    $ codex completion <bash|zsh|fish>

  Options
    -h, --help                      Show usage and exit
    --version                       Print version and exit
....

@cosmicdreams cosmicdreams left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems consistent with the brevity of other documented flags. I applaud the exclusion of -v as that is best left unreserved and available for future use.

@tibo-openai tibo-openai changed the title Add CLI –version flag feat: add CLI –version flag Apr 22, 2025
@tibo-openai

Copy link
Copy Markdown
Collaborator

Merging just for the updated documentation, thanks!

@tibo-openai
tibo-openai merged commit dd33064 into openai:main Apr 22, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants