{"record":{"id":"f8f5fae3e21cc711","repo":"basecamp/kamal","slug":"bitwarden-cli-is-not-installed","errorCode":null,"errorMessage":"Bitwarden CLI is not installed","messagePattern":"Bitwarden CLI is not installed","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/kamal/secrets/adapters/bitwarden.rb","lineNumber":74,"sourceCode":"          item, field = secret.split(\"/\")\n          items[item] ||= []\n          items[item] << field\n        end\n      end\n    end\n\n    def signedin?(account)\n      run_command(\"status\")[\"status\"] != \"unauthenticated\"\n    end\n\n    def run_command(command, session: nil, raw: false)\n      full_command = [ *(\"BW_SESSION=#{session.shellescape}\" if session), \"bw\", command ].join(\" \")\n      result = `#{full_command}`.strip\n      raw ? result : JSON.parse(result)\n    end\n\n    def check_dependencies!\n      raise RuntimeError, \"Bitwarden CLI is not installed\" unless cli_installed?\n    end\n\n    def cli_installed?\n      `bw --version 2> /dev/null`\n      $?.success?\n    end\nend\n","sourceCodeStart":56,"sourceCodeEnd":82,"githubUrl":"https://github.com/basecamp/kamal/blob/eee0083b38661c3707c6b6052cc89e85038a096c/lib/kamal/secrets/adapters/bitwarden.rb#L56-L82","documentation":"check_dependencies! in the Bitwarden adapter runs `bw --version` and checks the exit status; if the bw executable is missing from PATH, Kamal raises RuntimeError \"Bitwarden CLI is not installed\". Like the other vault adapters, this one shells out to the vendor CLI rather than using an API client.","triggerScenarios":"kamal secrets fetch -a bitwarden on a machine without the Bitwarden CLI; broken PATH so `bw` does not resolve; minimal CI/Docker image with no @bitwarden/cli installed; unlinked brew install.","commonSituations":"Fresh workstations; slim CI containers; installing the desktop app (which bundles no CLI) and assuming bw is available; node-based installs failing silently.","solutions":["Install the Bitwarden CLI: npm install -g @bitwarden/cli or brew install bitwarden-cli","Verify in the same shell/environment: bw --version","Add the install step to your CI image/pipeline before any kamal secrets fetch -a bitwarden"],"exampleFix":"# before\nkamal secrets fetch -a bitwarden --account me@example.com RAILS_MASTER_KEY\n# => RuntimeError: Bitwarden CLI is not installed\n\n# fix (terminal)\nnpm install -g @bitwarden/cli\nbw --version\nkamal secrets fetch -a bitwarden --account me@example.com RAILS_MASTER_KEY","handlingStrategy":"validation","validationCode":"abort \"Bitwarden CLI missing — npm install -g @bitwarden/cli\" unless system(\"bw --version > /dev/null 2>&1\")","typeGuard":"def bw_installed?\n  system(\"bw --version > /dev/null 2>&1\")\nend","tryCatchPattern":null,"preventionTips":["Install @bitwarden/cli in CI images (npm install -g) as a standard provisioning step","The Bitwarden desktop app does not provide the CLI — install it explicitly"],"tags":["kamal","secrets","bitwarden","dependency","installation","cli"],"backgroundTag":"missing-cli-dependency","analyzedSha":"eee0083b38661c3707c6b6052cc89e85038a096c","analyzedAt":"2026-08-21T15:17:22.045Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}