Repository navigation
ChatGPT CLI v1.6.7
Key Updates
1. Refactor to Support Custom Config and Data Directories
In this release, we've introduced support for overriding the default paths for configuration and data directories using environment variables. This is particularly useful for users who prefer to manage their settings and data in non-default locations. The following environment variables are now supported:
OPENAI_CONFIG_HOME: Defines a custom path for configuration files (e.g.,config.yaml). Default is~/.chatgpt-cli.OPENAI_DATA_HOME: Defines a custom path for storing data, including chat history. Default is~/.chatgpt-cli/history.
2. Enhanced Directory Management
The internal logic for retrieving default directories has been refactored. The previous methods such as GetHistoryDir and GetChatGPTDirectory have been replaced with clearer naming and paths:
GetConfigHome: Retrieves the configuration home directory.GetDataHome: Retrieves the data home directory (for history storage).
3. Improved Integration Test Setup
We've improved the integration testing setup by ensuring that any pre-existing environment variables related to config and data directories (OPENAI_CONFIG_HOME, OPENAI_DATA_HOME) are unset before running tests. This guarantees a clean and isolated test environment, making the tests more reliable and predictable.
4. Migration Handling
The legacy history migration logic has been enhanced to ensure smooth transitions when moving from older versions of the CLI to v1.6.7. If the legacy history file exists, it will be migrated to the new directory structure, ensuring all your existing conversation history is preserved.
How to Update
Using Homebrew (macOS)
brew upgrade chatgpt-cliDirect Download
For a quick and easy installation without compiling, you can directly download the pre-built binary for your operating system and architecture.