feat: add kp-env and kpxc-cli for KeePassXC-backed secrets - #49
Merged
Merged
Conversation
kp-env prints export lines for a KeePassXC env/<name> group, replacing per-repo .env files (eval "$(kp-env proxmox-opentofu)"). It uses kpxc-cli against the running app when available (Touch ID), otherwise keepassxc-cli on the .kdbx. kpxc-cli is installed alongside the keepassxc cask.
dot_Brewfile.tmpl renders to ~/.Brewfile, not ~/Brewfile, and apply installs it via run_onchange_brew-bundle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.local/bin/kp-env <name>. It printsexport VAR=valuefor every entry in a KeePassXCenv/<name>group, replacing the per-repo.envfiles. The infra repos call it throughjust kp <recipe|command>.kpxc-cli(browser-integration protocol), so Touch ID works. If that finds nothing, it falls back tokeepassxc-clion the.kdbx, which prompts for the master password.kp-env --selftest.kpxc-cli(mietzen/tap/keepassxc-cli) is added to the Brewfile, under the same gate as thekeepassxccask.~/.Brewfile, andrun_onchange_brew-bundleinstalls it on apply.Test plan
kp-env --selftestjust kp planin proxmox-opentofu showed no changes, with secrets loaded from KeePassXCchezmoi execute-template < dot_Brewfile.tmplrenders the tap and formula