Skip to content

Improve command groups and add task shortcuts - #379

Merged
saioai merged 13 commits into
mainfrom
codex/command-experience
Oct 7, 2026
Merged

saioai merged 13 commits into
mainfrom
codex/command-experience

Conversation

@saioai

@saioai saioai commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Finding a command can require reading long API paths and incomplete help lists. This PR makes groups easier to browse and adds shorter names for common tasks. For example, openai audio transcriptions create also works as openai audio transcribe or openai transcribe.

What changes

  • Help explains each command group and lists all its immediate actions and subgroups.
  • Audio gets transcribe, translate, and speak, with matching shortcuts at the root. Files gets upload.
  • Organization resources appear directly under admin. The projects shortcut opens admin projects.
  • Existing nested and colon commands still work. Their flags, defaults, output formats, and exit statuses stay the same.
  • Shortcut help says what each command does. For example, translate converts audio into English text.
  • Tab completion follows help ordering and supports nested help topics and file paths, including --file=path.
  • Older completion scripts keep their previous behavior after binary updates.
  • Bash completion no longer aborts on commands such as openai models l when set -u is enabled.
  • Command errors suggest nearby commands using the invoked executable. Image commands keep their existing order.

Commands

These shorter paths reuse existing functionality. Audio support already existed; this PR changes how users find and invoke it. No new flags are added.

openai audio transcribe --help  # grouped action
openai transcribe --help        # shortcut for the same action
openai audio translate --help   # translate audio to English
openai translate --help         # matching shortcut
openai audio speak --help       # generate speech
openai speak --help             # matching shortcut
openai files upload --help      # existing file upload
openai admin projects list      # organization administration
openai projects list            # matching shortcut
openai admin audit-logs list    # shorter administration path

Project and administration requests still require an admin key. The root --project option keeps its existing scope.

These existing commands show the help changes:

openai --help                       # groups and shortcuts
openai help --all                   # groups and global options
openai projects --help              # project actions and subgroups
openai help --all responses create  # complete action options

Help and completion need no API key or network connection. After upgrading, reload shell completion to load the fixes and enable file-path completion.

Code

pkg/custom adds shorter routes and descriptions using the existing request handlers. Existing commands keep their names when a shortcut would conflict.

internal/clihelp supplies shared help ordering. internal/autocomplete handles shell completion and checks whether the loaded script supports the new file-path behavior. The small main.go change skips request setup during completion.

Generated handlers and dependencies are unchanged. This adds no package. Demo tools remain in scripts/demos.

Tested

Current source: 0eae357. Hosted CI passed: 21 checks passed and two conditional checks were skipped.

  • Command and file completion passed on macOS with Bash 3.2 and 5.3, with set -u enabled and disabled.
  • The documented Bash setup command also passed on both versions, with set -u enabled and disabled.
  • The new regression test failed before the fix. Independent review passed 30 interactive Tab-completion checks.
  • Completion, request, error, and cancellation tests passed after merging current main. go vet, dependency verification, and the build passed.

Earlier checks at 19a06bf cover unchanged help, request handling, and completion in zsh, fish, and PowerShell.

Automated code review found no major issues. Automated security review found no issues on 0eae357.

Interactive completion on Windows/Linux remains unverified. No live API calls or paid generation ran.

Demo

Real binaries run in matching macOS Bash terminals, captured as terminal replays. Before uses main e433bd2. Audio recordings use b5b2a73; their output matches 19a06bf. The root After screenshot uses 19a06bf. These help demos make no API requests and do not demonstrate shell completion.

Audio actions after the change:

Audio actions after

Before:

Audio before

After:

Audio after

Root help excerpts show the first 32 lines of openai --help.

Before:

Root before

After:

Root after

Recording recipe · Recorder

@saioai
saioai requested a review from a team as a code owner October 6, 2026 20:47
@saioai

saioai commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T21:43:53.278929Z 0eae357 Manual request
🔒 Security Review ✅ Completed 2026-10-07T21:42:20.624692Z 0eae357 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Castiron custom code

Evaluated main: 60603c545087920cb9f4b68232c77f9b188f5e0d.

✅ No new custom-code files detected.

2 mixed files remain; 0 existing customizations changed.

Compared 60603c545087 → 0eae35722525. Generated baselines verified.

2 existing customizations unchanged
  • pkg/cmd/adminorganizationcertificate.go
  • pkg/cmd/audiovoice.go

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 37691735682 --repo openai/openai-cli \
  --name castiron-custom-code-37691735682-1 --dir /tmp/castiron-custom-code-37691735682-1
git apply --stat /tmp/castiron-custom-code-37691735682-1/custom-code.patch
cat /tmp/castiron-custom-code-37691735682-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin 60603c545087920cb9f4b68232c77f9b188f5e0d 0eae35722525f84c7ab03d5ba04a50ce60edc608
python3 scripts/castiron/custom_code_report.py report \
  --base 60603c545087920cb9f4b68232c77f9b188f5e0d \
  --head 0eae35722525f84c7ab03d5ba04a50ce60edc608 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-0eae35722525
cat /tmp/castiron-custom-code-0eae35722525/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: f019ed7a35

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f019ed7a35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/autocomplete/autocomplete.go Outdated
Comment thread internal/autocomplete/autocomplete.go Outdated
@saioai saioai changed the title Improve command group help and navigation Improve command groups and add task shortcuts Oct 6, 2026
@saioai

saioai commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 2223604dec

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1555b31111

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/autocomplete/autocomplete.go
@saioai

saioai commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fdc41371ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/clihelp/brief.go Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: fdc41371ad

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@saioai

saioai commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 1218025ebd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1218025ebd

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@saioai

saioai commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Please review 19a06bf, including completion compatibility with older loaded shell scripts and shortcut descriptions.

@saioai

saioai commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 19a06bff8f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 19a06bff8f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 19a06bff8f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed 19a06bff8f7654969fd015768281b5aefc679c6b. One Bash completion regression needs a fix. The new array lookup aborts normal completion when set -u is enabled.

The task shortcuts reuse decorated handlers and preserve resource identity. Help and completion share ordering without replacing parser categories. I found no further structural issue in those changes.

Validation: source inspection of all 45 changed files and supporting code. Hosted test, build, lint, platform help, and budget checks pass on this commit. I did not run local tests or interactive shell checks.

Comment thread internal/autocomplete/shellscripts/bash_autocomplete.bash Outdated
@saioai

saioai commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Please review e9eb8b3, which fixes Bash completion when set -u is enabled.

@saioai

saioai commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Please review 3b11db7, which includes the Bash set -u fix and the current-main merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 3b11db77ba

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@saioai

saioai commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

Please review 0eae357. Runtime source matches 3b11db7; the final change makes the documented completion reload command work on Bash 3.2.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0eae357225

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 0eae357225

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@saioai
saioai enabled auto-merge October 7, 2026 22:05
@saioai
saioai requested a review from markstuart-oai October 7, 2026 22:06

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rechecked 0eae35722525f84c7ab03d5ba04a50ce60edc608. The Bash set -u issue is fixed. Missing array entries now expand to an empty value, so normal command completion can continue. The tests cover root, nested, unmatched, and file completion with set -u on and off.

I checked the Bash reload instructions and compared command/help code with the previous review. No further findings.

Validation: source review only. Hosted checks on this commit show 23 passes and four skips. Tests, builds, lint, platform help, and budget checks pass. I did not run local tests or interactive shell checks. Native Bash 3.2/5.3 results are author-reported.

@saioai
saioai added this pull request to the merge queue Oct 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 7, 2026
@saioai
saioai added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit dce0616 Oct 7, 2026
27 checks passed
@saioai
saioai deleted the codex/command-experience branch October 7, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants