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 committed Dec 21, 2024
1 parent 491ff52 commit f07e2a8
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 173 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,6 @@ 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 the `keepassxc.mode` to `builtin`, chezmoi uses a builtin library to
access a keepassxc database. This mode becomes handy if the keepassxc-cli is not
available.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a
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.4.0
Expand Down Expand Up @@ -152,6 +153,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/xanzy/ssh-agent v0.3.3 // indirect
github.com/yuin/goldmark v1.7.8 // indirect
github.com/yuin/goldmark-emoji v1.0.4 // indirect
Expand Down
Loading

0 comments on commit f07e2a8

Please sign in to comment.