Skip to content

ChatGPT CLI v1.7.0

Choose a tag to compare

@kardolus kardolus released this 08 Oct 20:25
· 313 commits to main since this release

We're excited to announce the release of ChatGPT CLI v1.7.0! This update introduces significant improvements in configuration handling, enhances flexibility in user input, and includes a few important bug fixes and enhancements.

🚀 Key Changes & Improvements

Enhanced Configuration Handling with Viper & Cobra
  • Command-Line Setters & Runtime Flags for Configuration:
    • Each configuration value now has a dedicated command-line setter and a corresponding runtime flag. This means you can easily update settings like the model, max tokens, or API key on the fly, either persistently or temporarily.
    • For example, use --set-model <model-name> to update the default model permanently, or --model <model-name> to apply the change only for the current session.
  • Improved Flag Syncing:
    • We've refactored how the CLI handles flag configuration using viper and cobra. The new approach ensures that changes to command-line flags are properly synced with viper's internal state.
    • The CLI now consistently respects the configuration precedence order of Environment Variables > Config File > Default Values.
    • This overhaul simplifies configuration management, reducing the need for custom parsing logic and making the code more maintainable.
  • More Robust Flag Management:
    • The CLI now defines flags dynamically based on a configuration metadata structure, making it easier to add new configurable options in the future.
    • Improved handling of command aliases ensures that both full and short versions of flags are correctly interpreted.
Enhanced Input Handling
  • Support for Piped Input:
    • This release improves the behavior of the CLI when handling piped input without explicitly specifying a query. Previously, if you provided input through a pipe but did not set a query, the CLI would error out.
    • With the new changes, the CLI now correctly detects non-empty piped input and uses it as context without requiring a direct query. If no context or query is provided, an error is returned, maintaining user feedback clarity.

How to Update

Using Homebrew (macOS)

brew upgrade chatgpt-cli

Direct Download

For a quick and easy installation without compiling, you can directly download the pre-built binary for your operating system and architecture.