summaryrefslogtreecommitdiff
path: root/internal/appconfig/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/appconfig/config.go')
-rw-r--r--internal/appconfig/config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/appconfig/config.go b/internal/appconfig/config.go
index 1b134ee..96ac300 100644
--- a/internal/appconfig/config.go
+++ b/internal/appconfig/config.go
@@ -1046,6 +1046,11 @@ func (a *App) mergeProviderFields(other *App) {
}
func getConfigPath() (string, error) {
+ return ConfigPath()
+}
+
+// ConfigPath returns the default config file path ($XDG_CONFIG_HOME/hexai/config.toml or ~/.config/hexai/config.toml).
+func ConfigPath() (string, error) {
var configPath string
if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" {
configPath = filepath.Join(xdgConfigHome, "hexai", "config.toml")