Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Bitwarden for VS Code (unofficial)New to Visual Studio Code? Get it now.
Bitwarden for VS Code (unofficial)

Bitwarden for VS Code (unofficial)

RyanEwen

|
1 install
| (0) | Free
Fills logins, one-time codes and passkeys from your Bitwarden® or Vaultwarden vault into VS Code's integrated browser. Not affiliated with Bitwarden, Inc.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Bitwarden for VS Code (unofficial)

Fills logins, one-time codes and passkeys from your Bitwarden® or Vaultwarden vault into pages in VS Code's integrated browser.

An independent project, not made, endorsed or supported by Bitwarden, Inc. Bitwarden is a trademark or registered trademark of Bitwarden, Inc. in the United States and/or other countries.

The fill button inside a login field in VS Code's integrated browser

VS Code's integrated browser cannot load Chrome extensions, so the official Bitwarden browser extension cannot run there. This extension does its core jobs another way: it reaches your vault only through the official Bitwarden CLI, and pages through VS Code's browser API.

  • Logins: click the shield in a username or password field, or press Ctrl+Shift+L in a browser tab, and pick a login. Logins saved for the site come first; any other login fills after a warning.
  • One-time codes: the shield in a code field fills the current code. When a page has no code field, the code is copied for the next page and cleared after a minute.
  • Passkeys: sign in with passkeys from your vault, and save new ones to a new or existing login, in the format Bitwarden's own apps use.
  • Sync: changes arrive when you unlock, every few minutes while unlocked, and before a passkey is saved.

Requirements

  • VS Code 1.148 or later, in a local, WSL or remote window.
  • Nothing else to install: on first use the extension downloads Bitwarden's official CLI (about 45 MB, once) from Bitwarden's GitHub releases, checks it against a pinned checksum, and keeps it in its own storage. To use your own bw instead, set vaultAutofill.cliPath.
  • A bitwarden.com or self-hosted Bitwarden account, or a Vaultwarden server. One-time codes need Premium, or an organization item that allows them, as in the CLI.

Installation

  1. Install Bitwarden for VS Code (unofficial) from the Visual Studio Marketplace, or download the .vsix from Releases and run Extensions: Install from VSIX....

  2. VS Code only lets extensions you name use its browser API. Run Preferences: Configure Runtime Arguments, add the id to enable-proposed-api (to the existing list, if there is one), and restart VS Code:

    "enable-proposed-api": ["ryanewen.vault-autofill"]
    

    Without this, the vault works but nothing reaches pages.

Setup

  1. Click Bitwarden in the status bar and choose Sign in, or run Bitwarden: Sign In.
  2. Enter your server address (empty for bitwarden.com), email and master password, then a two-step code if your account uses one. Signing in also unlocks.
  3. Later, unlock from the status bar with your master password.

Two-step login works with authenticator apps, email codes and YubiKey OTP; the Bitwarden CLI does not support Duo or security keys. If bitwarden.com asks to confirm a new device, or your only method is unsupported, choose Use an API key instead and paste the key from your web vault (Settings, Security, Keys).

The extension keeps its own CLI sign-in in its storage folder, so it and bw in your terminals never affect each other.

How it keeps your vault safe

  • The CLI does the cryptography. The master password reaches the CLI through one process's environment and is never stored. The session key stays in memory until you lock or VS Code closes.
  • Pages ask; you choose in VS Code. You pick the login or passkey in VS Code's own picker, and only that one reaches the page. Background tabs and unfocused pages are refused.
  • The browser vouches for the site. Matching and passkey checks use the address VS Code's browser reports, never one a page gives. Passkeys work only for their own site, in the top-level page.
  • Nothing reaches a page that has moved on. Each answer goes to the exact document that asked; if the page navigates while you choose, nothing is filled or signed.
  • Locking means locked. The unlock key lives only in memory unless you turn on vaultAutofill.stayUnlockedAfterRestart, which keeps it in your operating system's credential store, where any program running as you could use it. Locking or signing out removes it.
  • User verification is never claimed without a check. Sites that require it get a master-password prompt (accepted for a few minutes). Items set to re-prompt always ask.
  • Edits keep the whole item. Saving a passkey syncs first and writes the full item back.

Agents and tools that drive the integrated browser can read what is filled into a page; turn their access off before filling real logins.

Settings

Setting Default What it does
vaultAutofill.cliPath bw Path to the Bitwarden CLI.
vaultAutofill.syncIntervalMinutes 5 Background sync while unlocked; 0 turns it off.
vaultAutofill.lockAfterIdleMinutes 30 Lock after this long without use; 0 keeps it unlocked until VS Code closes.
vaultAutofill.timeoutAction lock After the idle timeout, lock, or sign out (which removes the local vault copy).
vaultAutofill.stayUnlockedAfterRestart false Stay unlocked across VS Code restarts (like the official Never), by keeping the unlock key in your OS credential store.
vaultAutofill.defaultUriMatch domain Match rule for saved addresses without their own (base domain, host, starts with, regular expression, exact, never).
vaultAutofill.copyTotpAfterFill true Copy a login's code when the page has no code field.
vaultAutofill.clearClipboardSeconds 60 Clear a copied code after this many seconds; 0 leaves it.
vaultAutofill.showFillButton true Show the fill button in fields; when off, use Ctrl+Shift+L.
vaultAutofill.excludedDomains [] Sites (and their subdomains) where the extension stays out: no button, fills or passkeys.
vaultAutofill.passkeys.enabled true Answer passkey requests from the vault.
vaultAutofill.passkeys.verificationMinutes 5 How long a master-password check counts for passkeys (at most 60).
vaultAutofill.hideElectronFromSites true Show sites the browser without the Electron part of its identity; some sites (Outline, for one) otherwise send passkey sign-ins to their desktop app.

Open them from the Bitwarden status bar menu (Settings) or with Bitwarden: Open Settings. They are user settings only; a workspace cannot change them.

Limits

  • VS Code's browser API is still a proposal: it must be enabled by name, and a VS Code update can change it.
  • The CLI cannot read your account's default match setting or equivalent domains; set the default here with vaultAutofill.defaultUriMatch if you changed it.
  • One passkey per login, ES256 only, top-level pages only; no passkey suggestions in username boxes.
  • Cross-site frames are not filled. Saving new passwords, cards and identities are not included.
  • Browser automation tools that set their own browser identity (for example a browser MCP's emulation) replace the Electron-free one on that page until the setting changes or the extension reattaches.

Privacy

No telemetry. The extension talks only to the Bitwarden CLI on your machine and to pages you open; its one download is the CLI itself, from Bitwarden's GitHub releases. It stores the CLI and the CLI's encrypted vault copy, nothing else. English only.

Issues

Report bugs on GitHub Issues and security problems privately, as the security policy describes. Developers: see docs/development.md.

License

MIT. See LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft