chatgpt-cli
chatgpt-cli copied to clipboard
Read `config.yaml` from XDG standard paths
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
)