{"record":{"id":"a61b90b338d3a05f","repo":"basecamp/kamal","slug":"bitwarden-secrets-manager-cli-is-not-installed","errorCode":null,"errorMessage":"Bitwarden Secrets Manager CLI is not installed","messagePattern":"Bitwarden Secrets Manager CLI is not installed","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/kamal/secrets/adapters/bitwarden_secrets_manager.rb","lineNumber":59,"sourceCode":"        elsif secrets[0].end_with?(LIST_ALL_FROM_PROJECT_SUFFIX)\n          project = secrets[0].split(LIST_ALL_FROM_PROJECT_SUFFIX).first\n          [ \"#{LIST_COMMAND} #{project.shellescape}\", project ]\n        end\n      end\n    end\n\n    def run_command(command, session: nil)\n      full_command = [ \"bws\", command ].join(\" \")\n      `#{full_command}`\n    end\n\n    def login(account)\n      run_command(\"project list\")\n      raise RuntimeError, \"Could not authenticate to Bitwarden Secrets Manager. Did you set a valid access token?\" unless $?.success?\n    end\n\n    def check_dependencies!\n      raise RuntimeError, \"Bitwarden Secrets Manager CLI is not installed\" unless cli_installed?\n    end\n\n    def cli_installed?\n      `bws --version 2> /dev/null`\n      $?.success?\n    end\nend\n","sourceCodeStart":41,"sourceCodeEnd":67,"githubUrl":"https://github.com/basecamp/kamal/blob/eee0083b38661c3707c6b6052cc89e85038a096c/lib/kamal/secrets/adapters/bitwarden_secrets_manager.rb#L41-L67","documentation":"Raised by check_dependencies! in Kamal::Secrets::Adapters::BitwardenSecretsManager after `bws --version 2> /dev/null` exits non-zero ($?.success? false). It is the adapter's pre-flight guard: before any login or fetch attempt, kamal verifies the Bitwarden Secrets Manager CLI binary exists on PATH. Because stderr is discarded, any failure (command not found, broken install, wrong arch binary) collapses into this single message.","triggerScenarios":"adapter.fetch(...) is called (Base#fetch line 7 runs check_dependencies!) on a machine where `bws` is not on PATH: never installed, installed only for another user/shell (nvm-style PATH issue), installed after the current shell started, or a non-executable/corrupted binary in PATH.","commonSituations":"Fresh deploy box or Docker/CI image without the bws package; installing bws via npm globally in a node env manager that kamal's shell does not source; macOS where the CLI was installed under a different Homebrew prefix; renamed binary (e.g. installed as bitwarden-secrets-manager) with no bws symlink.","solutions":["Install the CLI: `npm install -g @bitwarden/secrets-manager` (provides `bws`), then run `bws --version` to confirm it resolves in the same shell that runs kamal.","If installed but not found, fix PATH (echo $PATH, add the global npm bin dir or /usr/local/bin symlink) and restart the terminal/CI job.","For repeatable environments, add the install step to your Dockerfile/CI script before `kamal secrets pull`."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"require \"open3\"\n\ndef bws_installed?\n  _out, _err, status = Open3.capture3(\"bws\", \"--version\")\n  status.success?\nend\n\nabort \"Install @bitwarden/secrets-manager (provides bws) first\" unless bws_installed?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install the bws CLI in the same Dockerfile/CI image that runs kamal.","Add a boot check (`which bws`) to deploy scripts so the failure names the missing binary.","Pin the npm package version to avoid PATH/name drift across environments."],"tags":["ruby","kamal","bitwarden","cli","dependency","path","secrets"],"backgroundTag":"cli-not-installed","analyzedSha":"eee0083b38661c3707c6b6052cc89e85038a096c","analyzedAt":"2026-08-21T15:17:22.045Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}