From ebd3a645222825bc0f747ac1fce42ba12320f508 Mon Sep 17 00:00:00 2001 From: thibaud-lclr Date: Mon, 11 May 2026 11:36:12 +0200 Subject: [PATCH] feat: wire login hook for Bitwarden unlock The framework v1.9.0 added a Login command/hook to authenticate and unlock Bitwarden. App.runBootstrap was not registering it, causing "command not configured: login". Co-Authored-By: Claude Sonnet 4.6 --- internal/cli/app.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/cli/app.go b/internal/cli/app.go index 38d535e..92d4fe1 100644 --- a/internal/cli/app.go +++ b/internal/cli/app.go @@ -137,6 +137,9 @@ func (a *App) runBootstrap(ctx context.Context, args []string) error { Setup: func(ctx context.Context, inv frameworkbootstrap.Invocation) error { return a.runConfig(ctx, frameworkbootstrap.CommandSetup, inv.Args) }, + Login: func(ctx context.Context, inv frameworkbootstrap.Invocation) error { + return a.runLogin(ctx, inv.Args) + }, MCP: func(ctx context.Context, inv frameworkbootstrap.Invocation) error { return a.runMCP(ctx, inv.Args) }, @@ -238,6 +241,16 @@ func (a *App) runConfig(ctx context.Context, command string, args []string) erro return nil } +func (a *App) runLogin(_ context.Context, _ []string) error { + _, err := frameworksecretstore.LoginBitwarden(frameworksecretstore.BitwardenLoginOptions{ + ServiceName: a.runtimeMetadata().BinaryName, + Stdin: a.stdin, + Stdout: a.stdout, + Stderr: a.stderr, + }) + return err +} + func (a *App) runConfigShow(ctx context.Context, args []string) error { if a.configStore == nil { return fmt.Errorf("config store is not configured")