chatgpt-cli icon indicating copy to clipboard operation
chatgpt-cli copied to clipboard

Read `config.yaml` from XDG standard paths

Open erhhung opened this issue 11 months ago • 1 comments

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)

erhhung avatar Mar 12 '24 17:03 erhhung