Skip to content

Commit

Permalink
feat: Add builtin mode for gopass
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Jan 7, 2025
1 parent 0e31a5d commit d012ecf
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ sections:
command:
default: '`gopass`'
description: gopass CLI command
mode:
description: See [gopass functions](../templates/gopass-functions/index.md)
gpg:
args:
type: '[]string'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# gopass functions

The `gopass*` template functions return data stored in
[gopass](https://www.gopass.pw/) using the gopass CLI (`gopass`).
[gopass](https://www.gopass.pw/) using the gopass CLI (`gopass`) or builtin
code.

By default, chezmoi will use the gopass CLI (`gopass`). Depending on your gopass
configuration, you may have to enter your passphrase once for each secret.

When setting `gopass.mode` to `builtin`, chezmoi use builtin code to access the
goapass database and caches your passphrase in plaintext in memory until chezmoi
terminates.

!!! warning

Using the builtin code is experimental and may be removed.
15 changes: 15 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ require (
github.com/go-git/go-git/v5 v5.13.1
github.com/google/go-github/v68 v68.0.0
github.com/google/renameio/v2 v2.0.0
github.com/gopasspw/gopass v1.15.15
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/itchyny/gojq v0.12.17
github.com/klauspost/compress v1.17.11
Expand Down Expand Up @@ -64,6 +65,7 @@ require (
require (
al.essio.dev/pkg/shellescape v1.5.1 // indirect
dario.cat/mergo v1.0.1 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.1.0 // indirect
Expand All @@ -89,21 +91,26 @@ require (
github.com/aws/smithy-go v1.22.1 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bradenhilton/cityhash v1.0.0 // indirect
github.com/caspr-io/yamlpath v0.0.0-20200722075116-502e8d113a9b // indirect
github.com/charmbracelet/harmonica v0.2.0 // indirect
github.com/charmbracelet/lipgloss v1.0.0 // indirect
github.com/charmbracelet/x/ansi v0.6.0 // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/cloudflare/circl v1.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/creack/pty/v2 v2.0.0-20231209135443-03db72c7b76c // indirect
github.com/cyphar/filepath-securejoin v0.3.6 // indirect
github.com/danieljoos/wincred v1.2.2 // indirect
github.com/dlclark/regexp2 v1.11.4 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dustin/gojson v0.0.0-20160307161227-2e71ec9dd5ad // indirect
github.com/dylibso/observe-sdk/go v0.0.0-20240828172851-9145d8ad07e1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/extism/go-sdk v1.6.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fatih/semgroup v1.3.0 // indirect
github.com/gitleaks/go-gitdiff v0.9.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
Expand All @@ -113,10 +120,13 @@ require (
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v61 v61.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/h2non/filetype v1.1.3 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
Expand All @@ -137,10 +147,12 @@ require (
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pjbgf/sha1cd v0.3.1 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
Expand All @@ -153,9 +165,12 @@ require (
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/twpayne/go-pinentry v0.3.0 // indirect
github.com/urfave/cli/v2 v2.27.5 // 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
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/yuin/goldmark v1.7.8 // indirect
github.com/yuin/goldmark-emoji v1.0.4 // indirect
go.opentelemetry.io/proto/otlp v1.4.0 // indirect
Expand Down
Loading

0 comments on commit d012ecf

Please sign in to comment.