bitwarden

Configure Bitwarden CLI with API key authentication to retrieve vault credentials.

10|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/benjaminshafii/digital-empire --skill bitwarden
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bitwarden
Source: https://github.com/benjaminshafii/digital-empire/tree/main/.opencode/skill/bitwarden
Command: npx skills add https://github.com/benjaminshafii/digital-empire --skill bitwarden

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing credentials securely and efficiently across development and automation workflows often leads to insecure practices or manual overhead. The Bitwarden CLI with API-key authentication provides a centralized, auditable vault that can be accessed from scripts and CI without exposing secrets.

Core Features & Use Cases

  • Secure vault access: Authenticate with Bitwarden using API keys and unlock sessions to retrieve credentials on demand.
  • Automation-ready: Scripted login, item retrieval, and storage of service credentials for local development, CI pipelines, and automation tasks.
  • Use Case: A developer uses a CI job to fetch a service's API key and inject it into the build environment without hard-coding secrets.

Quick Start

Install the Bitwarden CLI, configure BW_CLIENTID and BW_CLIENTSECRET in a local .env file or environment, then login and unlock the vault:

  • npm install -g @bitwarden/cli
  • source .env
  • bw login --apikey
  • export BW_SESSION=$(bw unlock --raw)
  • bw list items --search "SERVICE"

Frequently Asked Questions about bitwarden

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely automate Bitwarden CLI vault access in a CI pipeline?

Secure Bitwarden CLI vault access in CI by configuring BW_CLIENTID and BW_CLIENTSECRET environment variables to authenticate via API key, unlocking the vault to generate a session token, and retrieving credentials dynamically during builds.

Can I use Bitwarden API keys to fetch credentials without manual password entry?

Yes, Bitwarden API keys allow automated authentication without manual password entry by using BW_CLIENTID and BW_CLIENTSECRET environment variables to login and unlock vaults, enabling automated retrieval of stored credentials.

What do I need to configure before using the Bitwarden CLI for credential automation?

Before automating credential management with the Bitwarden CLI, install the npm package globally and configure BW_CLIENTID and BW_CLIENTSECRET as environment variables or in a local .env file for API key authentication.

How does retrieving API keys from a vault improve local development security?

Retrieving API keys from a vault improves local development security by centralizing secrets in an auditable location, allowing scripts to fetch credentials on demand instead of hard-coding sensitive information directly into application source code.

What is the best way to inject service credentials into a CI environment without hard-coding secrets?

The best way to inject service credentials into a CI environment is using Bitwarden CLI to login via API key, unlock the vault to establish a session, and fetch the required items dynamically to populate the build environment.

What limitations exist when using Bitwarden CLI for credential management in automation?

A limitation of using Bitwarden CLI for automation is the strict dependency on having the CLI installed and correctly configured API key environment variables, requiring a valid session token to be maintained for successful vault unlocking and item retrieval.