-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Description
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
- This is a feature request for the Python library
Describe the feature or improvement you're requesting
Feature Request: Shell Auto-Completion for OpenAI CLI
Description
Currently, the OpenAI CLI does not provide shell auto-completion for commands and options.
Adding support for shell auto-completion will improve developer productivity and reduce the need to repeatedly check documentation.
Proposed Solution
- Implement CLI auto-completion scripts for major shells:
- Bash
- Zsh
- Fish
- PowerShell
- Detect the shell environment automatically or allow the user to specify it.
- Provide instructions in the README or CLI help on how to enable completion.
Example
openai <TAB>
→ should list all available commands
openai api <TAB>
→ should list relevant subcommands and options
Benefits
- Faster CLI usage
- Fewer syntax errors
- Improved user experience for developers working frequently with the CLI
Additional Context
This feature is common in modern CLI tools (e.g., kubectl
, git
, aws-cli
) and is relatively straightforward to implement using libraries like click
or argcomplete
.
Environment
- openai-python version: Latest (as of issue date)
- OS: All major platforms
- Shells: bash, zsh, fish, powershell
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels