Skip to content

Commit

Permalink
feat: Implement builtin mode for keepassxc
Browse files Browse the repository at this point in the history
Signed-off-by: bakito <[email protected]>
  • Loading branch information
bakito authored and twpayne committed Dec 29, 2024
1 parent dbd73fa commit 8f6fea6
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 174 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ file. You will be prompted for the database password the first time
`keepassxc-cli` is run, and the password is cached, in plain text, in memory
until chezmoi terminates.

The command used can by changed by setting the `keepassxc.command` configuration
The command used can be changed by setting the `keepassxc.command` configuration
variable, and extra arguments can be added by setting `keepassxc.args`. The
password prompt can be disabled by setting `keepassxc.prompt` to `false`.

Expand All @@ -18,3 +18,8 @@ cache it for the duration of chezmoi's execution. Setting `keepassxc.mode` to
`open` will tell chezmoi to instead open KeePassXC's console with `keepassxc-cli
open` followed by `keepassxc.args`. chezmoi will use this console to request
values from KeePassXC.

When setting `keepassxc.mode` to `builtin`, chezmoi uses a builtin library to
access a keepassxc database, which can be handy if `keepassxc-cli` is not
available. Some KeePassXC features (such as Yubikey-enhanced
encryption) may not be available with builtin support.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/tailscale/hujson v0.0.0-20241010212012-29efb4a0184b
github.com/tobischo/gokeepasslib/v3 v3.6.1
github.com/twpayne/go-expect v0.0.2-0.20241130000624-916db2914efd
github.com/twpayne/go-pinentry/v4 v4.0.0
github.com/twpayne/go-shell v0.5.0
Expand Down Expand Up @@ -153,6 +154,7 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect
github.com/tetratelabs/wazero v1.8.2 // indirect
github.com/tobischo/argon2 v0.1.0 // indirect
github.com/wasilibs/go-re2 v1.8.0 // indirect
github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
Expand Down
Loading

0 comments on commit 8f6fea6

Please sign in to comment.