Skip to content

ChatGPT CLI v1.8.10

Choose a tag to compare

@kardolus kardolus released this 15 Sep 18:41
· 99 commits to main since this release

New Features:

  • Configuration targeting via --target:
    • Quickly switch between multiple configurations by loading config..yaml (e.g., config.perplexity.yaml, config.azure.yaml).
    • Useful for managing different providers or workflows without editing your default config.
    • Code reference: cmd/chatgpt/main.go, README.md
  • Configurable user agent header:
    • New user_agent option lets you customize the User-Agent header for API requests (default: chatgpt-cli).
    • Code reference: README.md

Improvements:

  • Early flag parsing:
    • Flags are parsed earlier to ensure the selected --target is applied before configuration initialization.
    • Code reference: cmd/chatgpt/main.go
  • CLI help updates:
    • --target documented in the custom help output for easy discovery.
    • Code reference: cmd/chatgpt/main.go
  • Documentation enhancements:
    • New README section: “Switching Between Configurations with --target,” including examples, directory structure, and environment variable interaction details.
    • TOC updated and configuration table expanded (target, user_agent).
    • Code reference: README.md

Bug Fixes:

  • None in this release.

Other Changes:

  • Integration tests for targeted configuration:
    • Tests verify that config..yaml is used when --target is provided and that the CLI falls back to config.yaml otherwise.
    • Code reference: test/integration/integration_test.go
  • General flag handling:
    • --target recognized as a general flag.
    • Code reference: cmd/chatgpt/main.go

Upgrade Notes:

  • How to update:
    • Homebrew: brew upgrade chatgpt-cli
    • Direct download: Download the latest binaries for your OS from the releases page and replace your existing binary.
  • No breaking changes. To take advantage of --target:
    • Create additional config files alongside your default config.yaml (e.g., config.perplexity.yaml, config.azure.yaml).
    • Use --target to load the corresponding file. The flag is not persisted; pass it each time.
    • Environment variable overrides still apply after the targeted config is loaded and follow the name field within that config.