Skip to content

Releases: kardolus/chatgpt-cli

ChatGPT CLI v1.8.10

15 Sep 18:41
Compare
Choose a tag to compare

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.

ChatGPT CLI v1.8.9

14 Sep 15:04
Compare
Choose a tag to compare

New Features:
• Configurable User-Agent header:
• You can now set a custom User-Agent for all outgoing requests via config (user_agent), CLI flag (set-user-agent), or environment overrides.
• Default value: chatgpt-cli.
• Code reference: config/config.go, cmd/chatgpt/main.go, api/http/http.go, api/client/client.go, internal/constants.go.
• Admin API docs:
• Added documentation for OpenAI Admin endpoints to check organization info and cost reports using OPENAI_ADMIN_KEY.
• Code reference: docs/chatgpt_api.md.

Improvements:
• Standardized HTTP headers:
• Centralized common header keys and values (Content-Type, Authorization, User-Agent) into internal constants to reduce duplication and ensure consistency.
• Code reference: internal/constants.go; api/http/http.go; api/client/client.go.
• Enhanced request debug output:
• Debug logging now reflects the actual auth header name and token prefix from configuration and includes the User-Agent header for easier troubleshooting.
• Code reference: api/client/client.go (printRequestDebugInfo).
• Perplexity configuration simplification:
• Updated README to use model: sonar instead of the long model identifier.
• Code reference: README.md.
• Dependency updates:
• Upgraded several libraries for stability, features, and security:
– cobra 1.10.1, pflag 1.0.10, viper 1.21.0
– ginkgo 2.25.1, gomega 1.38.2, testify 1.11.1
– go-logr 1.4.3, golang.org/x/text 0.29.0, golang.org/x/net 0.44.0, golang.org/x/sys 0.36.0, golang.org/x/tools 0.36.0
– afero 1.15.0, cast 1.10.0, locafero 0.11.0
– Added go.yaml.in/yaml/v3 3.0.4 and Masterminds/semver/v3 3.4.0
• Code reference: go.mod, go.sum.

Bug Fixes:
• Correct Authorization header handling in debug and MCP requests:
• Debug output now uses the configured AuthHeader and AuthTokenPrefix instead of a hard-coded “Authorization: Bearer …”.
• MCP (Apify) requests now set Authorization and Content-Type via standardized constants.
• Code reference: api/client/client.go (printRequestDebugInfo, buildMCPRequest).

Other Changes:
• Tests updated to verify User-Agent header is present in debug output.
• Code reference: test/integration/integration_test.go.
• Minor import/order cleanups.
• Code reference: api/http/http.go, cmd/chatgpt/main.go.

Upgrade Notes:
• Homebrew: brew upgrade chatgpt-cli
• Direct download: Download the latest binaries for your operating system from the releases page and replace your existing binary.

ChatGPT CLI v1.8.8

21 Aug 10:23
Compare
Choose a tag to compare

New Features

  • Expanded model compatibility for --effort:
    • The --effort flag is now supported for gpt-5 models in addition to o1-pro.
    • Code reference: cmd/chatgpt/utils/utils.go, cmd/chatgpt/utils/utils_test.go
  • 302.AI support (documented and tested):
    • Added configuration guidance and environment variable (AI302_API_KEY) for using 302.AI.
    • Code reference: README.md

Improvements

  • Simplified provider configuration docs:
    • Azure and Perplexity examples streamlined to essential values with clearer API key guidance.
    • Added 302.AI configuration section and API reference link.
    • Code reference: README.md
  • Robust history parsing:
    • Gracefully returns an empty list when a history thread file does not exist.
    • Safely handles non-string content entries to avoid type assertion errors.
    • Code reference: history/manager.go, history/manager_test.go

Bug Fixes

  • History manager stability:
    • Treats missing history files as empty threads instead of failing.
    • Prevents potential panics by checking content types before appending user messages.
    • Code reference: history/manager.go, history/manager_test.go

Other Changes

  • Test enhancements:
    • Added coverage for gpt-5 effort compatibility and missing-thread behavior.
    • Minor test readability improvements.
    • Code reference: cmd/chatgpt/utils/utils_test.go, history/manager_test.go
  • Documentation updates:
    • Updated compatibility statement to include 302.AI and added API reference link.
    • Code reference: README.md

Upgrade Notes

  • 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. Existing configurations continue to work. If using 302.AI, set AI302_API_KEY or add api_key to your config as documented.

ChatGPT CLI v1.8.7

11 Aug 21:24
Compare
Choose a tag to compare

New Features:

  • Support for GPT-5 Models:
    • Added support for the new GPT-5 model, enhancing the system's capabilities with improved language understanding and response generation.
    • Integrated into the response-fetching mechanism for efficient data handling.
    • Code references: api/client/client.go, api/http/http.go, api/responses.go.

Improvements:

  • Functionality Update in Client Module:

    • Enhanced the CreateResponsesRequest function to handle streaming and additional parameters like temperature and top_p for customizable outputs.
    • Improved the GetCapabilities function to recognize features supported by different models.
    • Code reference: api/client/client.go.
  • Streamlined HTTP Response Processing:

    • Introduced a specialized handler for different streaming endpoints, enabling better management of Server-Sent Events (SSE).
    • Legacy and new streams are now processed according to endpoint specifics, enhancing system reliability.
    • Code reference: api/http/http.go.

Bug Fixes:

  • Resolved Function Consistency Issues:

    • Corrected the case inconsistency in function calls related to model capabilities (getCapabilities to GetCapabilities).
    • Code reference: api/client/client.go.
  • Improvement in Test Stability:

    • Revised test cases to accommodate the addition of the GPT-5 model, ensuring tests are model-agnostic.
    • Fixed potential test failures due to hardcoded model checks.
    • Code reference: api/client/client_test.go, api/http/http_test.go.

Other Changes:

  • Code Refactoring:
    • Deprecated old capability function to promote the new GetCapabilities, aligning with the updated model handling architecture.
    • General code cleanup to remove deprecated model handling variables and improve readability.
    • Improved documentation for API usage in chatgpt_api.md.
    • Code reference: api/client/client.go, docs/chatgpt_api.md.

Upgrade Notes:

  • Users can upgrade to this version using the following methods:
    • Homebrew Users: Run brew upgrade chatgpt-cli.
    • Direct Download: Visit the release page to download binaries compatible with your operating system.

ChatGPT CLI v1.8.6

05 Aug 12:26
Compare
Choose a tag to compare

Improvements:

  • Update Default Model Configuration:

    • Updated the default model configuration and integration to utilize GPT-4o, ensuring improved AI model interaction.
    • Adjustments made in: cmd/chatgpt/main.go, api/client/client_test.go.
  • CLI Resource Enhancements:

    • Altered visual settings of the CLI demonstration resources to improve user experience, such as font size, width, and theme.
    • Code reference: cmd/chatgpt/resources/chatgpt-cli.tape.

Bug Fixes:

  • Corrected Model Handling in Tests:
    • Updated the expected results in integration tests to match the new default model selections, ensuring test validity and stability.
    • Code references: test/integration/integration_test.go, api/client/client_test.go.

Other Changes:

  • Resource File Updates:
    • Minor changes applied to binary resource files.
    • Code reference: cmd/chatgpt/resources/vhs.gif.

Upgrade Notes:

To upgrade to version v1.8.6, you can use one of the following methods:

  • Using Homebrew: Run the command brew upgrade chatgpt-cli in your terminal.
  • Direct Download: Download the appropriate binary for your operating system from our release page.

Please update your configurations to accommodate any changes, especially if you utilize custom model settings. Enjoy the enhanced capabilities of the GPT-4o model in this release!

ChatGPT CLI v1.8.5

30 Jul 13:35
Compare
Choose a tag to compare

We are pleased to announce the release of v1.8.5, which brings significant improvements to history management alongside other enhancements and fixes. Below are the highlights of this release.

New Features

  • Enhanced History Management: This version introduces robust handling of command history in interactive mode. Users can now enjoy better tracking of their inputs and outputs, allowing for more accurate and efficient use of command history during sessions.

Improvements

  • Config Section Update: The "Configuration" section has been renamed to "Config" in the documentation for easier navigation.
  • Dependency Updates: Various dependencies have been updated to their latest versions for improved performance and stability, including:
    • Upgraded github.com/onsi/gomega to v1.38.0.
    • Upgraded to the latest versions of go.uber.org/zap and github.com/go-viper/mapstructure/v2.

Bug Fixes

  • Interactive Mode Fixes: Fixed issues related to command history not saving correctly in interactive mode. This makes it seamless to resume sessions with previously used commands readily available.
  • Corrected History Parsing: Resolved inaccuracies in parsing user command history, ensuring that only relevant user entries are returned.

Other Changes

  • Codebase Refactoring: Performed code clean-up for better organization, enhancing maintainability and future development processes.
  • Testing Improvements: Introduced new unit tests for better validation of the history management system, ensuring reliability and accuracy in history handling.

Upgrade Notes

To update to this latest version, you can use brew upgrade chatgpt-cli if it was installed via Homebrew. Alternatively, you can download the appropriate binaries for your operating system directly from our release page.

We thank you for your support and welcome your feedback on these improvements!

ChatGPT CLI v1.8.4

02 May 14:45
Compare
Choose a tag to compare

New Features:

  • Image Generation and Editing:
    • Added the capability to generate images based on text prompts using image-capable models like gpt-image-1.
      • Code Reference: api/client/client.go, cmd/chatgpt/main.go
    • Enabled editing of images with text prompts to modify the input image.
      • Code Reference: api/client/client.go, cmd/chatgpt/main.go
    • New API endpoints introduced for image generation and editing.
      • Code Reference: config/config.go, config/store.go

Improvements:

  • Command Line Interface (CLI) Enhancements:

    • Updated command-line flags to support new image generation and editing features.
      • Added --draw flag to initiate image creation.
      • Code Reference: cmd/chatgpt/main.go
  • Configuration Enhancements:

    • Added image_generations_path and image_edits_path to the configuration.
      • Code Reference: config/config.go, cmd/chatgpt/main.go

Bug Fixes:

  • Validation Improvements:
    • Fixed erroneous behavior when using CLI flags to ensure appropriate usage.
      • The --output flag now requires --draw or --speak flags.
      • Code Reference: cmd/chatgpt/utils/utils.go

Other Changes:

  • Documentation Updates:

    • Updated API documentation to reflect new image generation and editing capabilities.
      • Code Reference: docs/chatgpt_api.md
  • Test Coverage Enhancement:

    • Expanded test cases to cover new image processing functionalities.
      • Code Reference: api/client/client_test.go, cmd/chatgpt/utils/utils_test.go

Upgrade Notes:

To upgrade to this release, you can use Homebrew or download the appropriate binary directly:

  • With Homebrew:
    brew upgrade chatgpt-cli
  • Direct Download:
    Visit the release page on GitHub and download the binary for your specific operating system.

This release focuses on expanding the ChatGPT CLI capabilities to include image manipulation, enhancing user interaction through visual outputs, and ensuring CLI functionality remains robust and intuitive.

ChatGPT CLI v1.8.3

01 May 18:26
Compare
Choose a tag to compare

New Features:

  • Model Context Protocol (MCP) Support:
    • Introduced MCP support allowing structured, live data injection into chat sessions, initially supporting only Apify integrations.
    • Key functionalities include fetching real-time information like weather and injecting it into the chat context.
    • Added command-line flags --mcp, --param, and --params for specifying MCP plugin and parameters.
    • Code Reference: README.md, api/client/client.go, cmd/chatgpt/main.go

Improvements:

  • Code Refactoring and Enhancements:

    • Added informative error messages for MCP-related operations, improving error handling and user feedback.
    • Updated request header management in the HTTP client for better security and extensibility.
    • Code Reference: api/client/client.go, api/http/http.go
  • Documentation and Configuration:

    • New documentation for Apify MCP usage includes example API requests and configuration options.
    • Separated MCP-related configuration in the command-line interface, enhancing user experience.
    • Code Reference: docs/apify_api.md

Bug Fixes:

  • Resolved Header Management Issues:

    • Fixed issues with missing or incorrect HTTP headers during network requests, ensuring successful API communication.
    • Code Reference: api/http/http.go
  • Corrected Error Handling in Test Cases:

Other Changes:

  • Code Clean-Up and Test Improvements:

Upgrade Notes:

  • You can upgrade to the new version using Homebrew by executing brew upgrade chatgpt-cli.
  • Alternatively, download the binaries directly for your specific operating system from the release page.
  • Ensure you update your configuration with the new APIFY_API_KEY by setting it as an environment variable or in your configuration files.

ChatGPT CLI v1.8.2

22 Apr 16:18
Compare
Choose a tag to compare

New Features

  • Enhanced History Feature:
    • Implemented a mechanism for storing and appending transcriptions to the history log to improve user interaction tracking.
    • Code Reference: api/client/client.go

Improvements

  • Refined Synthesize Speech Command:

    • Adjusted the concatenation logic to use chatContext for more accurate text-to-speech synthesis from piped content.
    • Code Reference: cmd/chatgpt/main.go
  • Command-Line Interface Commands:

    • Added specific flag help for the --speak option to enhance user guidance.
    • Code Reference: cmd/chatgpt/main.go

Bug Fixes

  • No specific bug fixes were included in this release.

Other Changes

  • Readme Update:

    • Corrected sample command to reflect the removal of obsolete prefixes for better clarity.
    • Code Reference: README.md
  • Test Enhancements:

    • Expanded test cases in client_test.go to validate changes in history handling and ensure robustness against failed operations.
    • Code Reference: api/client/client_test.go

Upgrade Notes

To upgrade to this release, you can either:

  • Use Homebrew to upgrade: brew upgrade chatgpt-cli
  • Directly download the binaries for your specific OS from the releases page.

ChatGPT CLI v1.8.1

21 Apr 20:20
Compare
Choose a tag to compare

New Features:

  • Transcription Support:

    • Introduced the --transcribe flag to generate transcripts from audio files.
    • Supports a variety of audio formats, including .mp3, .mp4, .mpeg, .mpga, .m4a, .wav, and .webm.
    • API endpoint used: /v1/audio/transcriptions.
    • Appropriate CLI usage will allow users to extract text content from audio files.
  • Text-to-Speech Support:

    • Added the --speak and --output flags for converting text into speech with TTS model gpt-4o-mini-tts.
    • Output can be played back directly if afplay is installed (macOS), enhancing accessibility.
    • API endpoint used: /v1/audio/speech.

Improvements:

  • Expanded CLI Capabilities:

    • The command-line interface now supports more flexible configuration options using a layered system (default values, config.yaml, environment variables).
    • Enhanced debug options for better visibility into API interactions.
  • Model Capabilities:

    • Introduction of a getCapabilities() method to dynamically determine model features such as support for temperature and TTS capabilities.
  • Modular Endpoints:

    • API paths are now more customizable with additions for specific model types, improving integration flexibility.

Bug Fixes:

  • Addressed issues in API endpoint selection logic which previously led to incorrect routing.
  • Fixed condition checks related to the new-thread flag for the command-line interface.

Other Changes:

  • Added significant refactoring in the codebase for better readability and maintainability of various modules, including the client, api, and cmd packages.
  • New mock interfaces and test enhancements using gomock for robust unit testing and improved CI/CD performance.

Upgrade Notes:

  • Update Methods:
    • Homebrew Users: Run brew upgrade chatgpt-cli to get the latest update.
    • Direct Download: You may download available binaries specific to your OS directly from the repository or website.
  • Configuration Modification:
    • Ensure to update your config.yaml to leverage new features and flags introduced in this release.