basecamp/kamal · error · RuntimeError
Bitwarden CLI is not installed
Error message
Bitwarden CLI is not installed
What it means
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.
Source
Thrown at lib/kamal/secrets/adapters/bitwarden.rb:74
item, field = secret.split("/")
items[item] ||= []
items[item] << field
end
end
end
def signedin?(account)
run_command("status")["status"] != "unauthenticated"
end
def run_command(command, session: nil, raw: false)
full_command = [ *("BW_SESSION=#{session.shellescape}" if session), "bw", command ].join(" ")
result = `#{full_command}`.strip
raw ? result : JSON.parse(result)
end
def check_dependencies!
raise RuntimeError, "Bitwarden CLI is not installed" unless cli_installed?
end
def cli_installed?
`bw --version 2> /dev/null`
$?.success?
end
end
View on GitHub (pinned to eee0083b38)
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
Example fix
# before kamal secrets fetch -a bitwarden --account me@example.com RAILS_MASTER_KEY # => RuntimeError: Bitwarden CLI is not installed # fix (terminal) npm install -g @bitwarden/cli bw --version kamal secrets fetch -a bitwarden --account me@example.com RAILS_MASTER_KEY
Defensive patterns
Strategy: validation
Validate before calling
abort "Bitwarden CLI missing — npm install -g @bitwarden/cli" unless system("bw --version > /dev/null 2>&1") Type guard
def bw_installed?
system("bw --version > /dev/null 2>&1")
end Prevention
- 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
When it happens
Trigger: 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.
Common situations: Fresh workstations; slim CI containers; installing the desktop app (which bundles no CLI) and assuming bw is available; node-based installs failing silently.
Related errors
- Bitwarden Secrets Manager CLI is not installed
- AWS CLI is not installed
- Failed to login to and unlock Bitwarden
- You must specify what to retrieve from Bitwarden Secrets Man
- Doppler CLI is not installed
AI-assisted analysis of basecamp/kamal@eee0083b38 (2026-08-21).
Data as JSON: /api/errors/f8f5fae3e21cc711.
Report an issue: GitHub.