summaryrefslogtreecommitdiff
path: root/internal/cli/cli.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-18 08:20:34 +0300
committerPaul Buetow <paul@buetow.org>2026-04-18 08:20:34 +0300
commitb3e0fad0b7e4ba02821df602d01c2275f82527d5 (patch)
tree7a176b86f556162220cb7303ec0d283162e596ce /internal/cli/cli.go
parent9cab01cc8a3ec80a9ecede8a609b7b6e0769a446 (diff)
feat: make keepass the default backend with master.kdbx default path
Change default backend from "geheim" to "keepass" and default KDBXPath from ~/Documents/Keepass/master to ~/Documents/Keepass/master.kdbx. Existing geheim users must set backend="geheim" in ~/.config/foostore.json. Update resolveBackend fallback, struct comments, and test assertions to match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/cli/cli.go')
-rw-r--r--internal/cli/cli.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/cli/cli.go b/internal/cli/cli.go
index 75ab078..1f5a736 100644
--- a/internal/cli/cli.go
+++ b/internal/cli/cli.go
@@ -187,7 +187,9 @@ func newCLI(ctx context.Context, backendName, kdbxPath string) (*CLI, error) {
}
// resolveBackend returns the effective backend name given the flag override and
-// the config value. flag takes precedence; empty strings fall back to "geheim".
+// the config value. flag takes precedence; config value is used next; the
+// last-resort default is "keepass" (matching the config.defaultConfigWithHome
+// default so that the two sources of truth stay in sync).
func resolveBackend(flagValue, cfgValue string) string {
if flagValue != "" {
return flagValue
@@ -195,7 +197,7 @@ func resolveBackend(flagValue, cfgValue string) string {
if cfgValue != "" {
return cfgValue
}
- return "geheim"
+ return "keepass"
}
// buildBackend constructs the Backend and its associated Gitter based on