Skip to content

chore(store): drop spf13/cobra dependency and the keychain example CLI - #720

Merged
Benehiko merged 1 commit into
mainfrom
chore/drop-cobra-from-store
Oct 29, 2026
Merged

Benehiko merged 1 commit into
mainfrom
chore/drop-cobra-from-store

Conversation

@Benehiko

@Benehiko Benehiko commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

spf13/cobra was only used by the example CLI in store/keychain/cmd, yet it put cobra, pflag and mousetrap in the store module's go.mod.

The example duplicated what the docker pass commands already show, so this removes it instead of rewriting it:

  • Delete store/keychain/cmd and drop cobra, pflag and mousetrap from store/go.mod and store/go.sum.
  • Point the Example section of store/keychain/README.md to plugins/pass/commands, a real application built on the keychain store.
  • Add plugins/pass/README.md: using the docker pass CLI (set, ls, get, rm, run, se:// references), troubleshooting the keychain, and embedding the commands with PassStore and WithStore. The embedding snippet was compiled to check it.

go.mod/go.sum were edited by hand; make mod may adjust go.sum.

AI disclosure: I used alki, an AI coding agent running Claude, for most of this change: the rebase, removing the example, writing both README changes, and drafting this description. I reviewed the result.

@Benehiko
Benehiko requested a review from a team as a code owner October 29, 2026 15:33
Comment thread store/keychain/cmd/main.go Fixed

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟡 NEEDS ATTENTION

Lower-confidence findings (not posted inline)

  • [low] store/keychain/cmd/main.go:114 — parse error from store/set/save FlagSet printed twice (confidence: not scored — low severity, not verified)
  • [low] store/keychain/cmd/main.go:119 — store with no flags silently accepts empty username/password (confidence: not scored — low severity, not verified)

Comment thread store/keychain/cmd/main.go Resolved
@Benehiko
Benehiko force-pushed the chore/drop-cobra-from-store branch from 611f4b2 to 3d2d218 Compare October 29, 2026 15:56
@Benehiko
Benehiko requested a review from docker-agent October 29, 2026 15:57
Comment thread store/keychain/cmd/main.go Fixed

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

Lower-confidence findings (not posted inline)

  • [low] store/keychain/cmd/main.go:137 — store --help prints global usage instead of subcommand-specific flag help (unverified; low severity)
  • [low] store/keychain/cmd/main.go:140 — return value of fs.Parse silently discarded with flag.ExitOnError (unverified; low severity, safe for now but fragile if error-handling mode changes)

Comment thread store/keychain/cmd/main.go Resolved
cobra was only used by the example CLI in store/keychain/cmd. Remove the example and point the keychain README to the docker pass commands in plugins/pass/commands, which use the keychain store. Add a README under plugins/pass on using the pass CLI and embedding its commands. This removes cobra, pflag, and mousetrap from the store module.

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
@Benehiko
Benehiko force-pushed the chore/drop-cobra-from-store branch from 3d2d218 to 77f97e7 Compare October 29, 2026 16:03
@Benehiko Benehiko changed the title chore(store): drop spf13/cobra dependency chore(store): drop spf13/cobra dependency and the keychain example CLI Oct 29, 2026
@Benehiko
Benehiko merged commit e6f5fef into main Oct 29, 2026
23 checks passed
@Benehiko
Benehiko deleted the chore/drop-cobra-from-store branch October 29, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants