You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As more CLI apps are adopting the path conventions laid out by the XDG Base Directory Specification, it would be nice if config.yaml and other generated files like thread history are placed in these standard paths—or at least look for them in these paths before using ~/.chatgpt-cli/:
config.yaml — use $XDG_CONFIG_HOME/chatgpt-cli/config.yaml (if XDG_CONFIG_HOME is NOT explicitly defined, use ~/.config/chatgpt-cli/config.yaml)
history/default.json etc. — use $XDG_DATA_HOME/chatgpt-cli/history/default.json (if XDG_DATA_HOME is NOT explicitly defined, use ~/.local/share/chatgpt-cli/history/default.json)
The text was updated successfully, but these errors were encountered:
Hi @erhhung, I think this makes a lot of sense. I did not know about the XDG standard paths concept when I created the CLI.
It will take me a minute to implement this feature: I will need to create a migration script that moves your current config over to the appropriate directory. However, this migration should work from any version of the CLI (there is a migration script that runs already to account for an earlier change). So it's a little tricky :).
There are also some complications around the case in which the config or data directory does not exist. It seems like most other CLIs try to create the directory in that case.
As more CLI apps are adopting the path conventions laid out by the XDG Base Directory Specification, it would be nice if
config.yaml
and other generated files like thread history are placed in these standard paths—or at least look for them in these paths before using~/.chatgpt-cli/
:config.yaml
— use$XDG_CONFIG_HOME/chatgpt-cli/config.yaml
(ifXDG_CONFIG_HOME
is NOT explicitly defined, use~/.config/chatgpt-cli/config.yaml
)history/default.json
etc. — use$XDG_DATA_HOME/chatgpt-cli/history/default.json
(ifXDG_DATA_HOME
is NOT explicitly defined, use~/.local/share/chatgpt-cli/history/default.json
)The text was updated successfully, but these errors were encountered: