Skip to main content
This page documents all available commands in the Bitwarden CLI, extracted from the commander configuration in the source code.

Authentication Commands

login

Log into a user account.
string
Email address for your Bitwarden account. If omitted, you’ll be prompted.
string
Master password. If omitted, you’ll be prompted.

Options

string
Two-step login method (0=Authenticator, 1=Email, 3=YubiKey, etc.)
string
Two-step login code
string
Log in with Single Sign-On. Optional organization identifier.
boolean
Log in with an API Key
string
Environment variable storing your password
string
Path to file containing your password as the first line
boolean
Check login status without logging in

Examples

logout

Log out of the current user account.
This command clears all local vault data and session information.

Example

unlock

Unlock the vault and return a new session key.
string
Master password to unlock the vault. If omitted, you’ll be prompted.

Options

boolean
Check vault lock status without unlocking
string
Environment variable storing your password
string
Path to file containing your password as the first line

Examples

After unlocking, previous session keys are invalidated. Use --raw to get just the session key and set it:

lock

Lock the vault and destroy active session keys.
Users with Key Connector enabled will be logged out instead of locked.

Example

Vault Synchronization

sync

Pull the latest vault data from the server.

Options

boolean
Force a full sync instead of incremental
boolean
Display the last sync date

Examples

Vault Operations

list

List an array of objects from the vault.
string
required
Type of object to list:
  • items: Vault items
  • folders: Folders
  • collections: Collections
  • org-collections: Organization collections
  • org-members: Organization members
  • organizations: Organizations

Options

Search term to filter results
string
Filter login items by URL (URL-match search)
string
Filter items by folder ID (use null for items without folder)
string
Filter items by collection ID
string
Filter items or collections by organization ID (use notnull for any organization)
boolean
Show only items in trash
boolean
Show only archived items (feature flag required)

Examples

Combining search with filters performs a logical AND. Combining multiple filters performs a logical OR.

get

Get an object from the vault.
string
required
Type of object to retrieve:
  • item: Full item details
  • username: Username field only
  • password: Password field only
  • uri: URI field only
  • totp: TOTP code
  • notes: Notes field only
  • exposed: Check if password is exposed in data breaches
  • attachment: Download attachment
  • folder: Folder details
  • collection: Collection details
  • org-collection: Organization collection
  • organization: Organization details
  • template: JSON template for creating objects
  • fingerprint: Account fingerprint
  • send: Send details
string
required
Search term or object’s globally unique ID

Options

string
Item ID for attachment operations
string
Output directory or filename for attachments
string
Organization ID for organization objects

Examples

create

Create an object in the vault.
string
required
Type of object to create:
  • item: Vault item
  • attachment: File attachment
  • folder: Folder
  • org-collection: Organization collection
string
Base64-encoded JSON of the object. Can be piped from stdin.

Options

string
Path to file for attachment creation
string
Item ID when creating an attachment
string
Organization ID for organization objects

Examples

edit

Edit an object in the vault.
string
required
Type of object to edit:
  • item: Vault item
  • item-collections: Item’s collection assignments
  • folder: Folder
  • org-collection: Organization collection
string
required
Object’s globally unique ID
string
Base64-encoded JSON with updates. Can be piped from stdin.

Options

string
Organization ID for organization objects

Examples

delete

Delete an object from the vault.
string
required
Type of object to delete:
  • item: Vault item (soft delete to trash)
  • attachment: Attachment
  • folder: Folder
  • org-collection: Organization collection
string
required
Object’s globally unique ID

Options

string
Item ID when deleting an attachment
string
Organization ID for organization objects
boolean
Permanently delete item (skip trash)

Examples

restore

Restore an object from trash or archive.
string
required
Type of object to restore (currently only item)
string
required
Object’s globally unique ID

Example

archive

Archive an item from the vault.
string
required
Type of object to archive (currently only item)
string
required
Object’s globally unique ID
This command requires the PM19148_InnovationArchive feature flag.

Example

Organization Commands

move

Move an item to an organization (share with organization).
string
required
Item’s globally unique ID
string
required
Organization’s globally unique ID
string
Base64-encoded JSON array of collection IDs. Can be piped from stdin.

Examples

confirm

Confirm an organization member.
string
required
Type of object (currently only org-member)
string
required
Member’s globally unique ID

Options

string
required
Organization’s globally unique ID

Example

Import/Export

import

Import vault data from a file.
string
Format of the import file (e.g., bitwardencsv, keepass2xml, lastpasscsv)
string
File path to the data to import

Options

boolean
List all supported import formats
string
Import to a specific organization

Examples

export

Export vault data to a file.

Options

string
Output directory or filename
string
Export format: csv (default), json, encrypted_json, or zip
string
Password to encrypt export (only for encrypted_json format)
string
Export specific organization vault

Examples

Exports contain sensitive vault data. Ensure exported files are stored securely.

Send Commands

send

Quickly create and share a Bitwarden Send.
string
required
Text or file path to send

Options

boolean
Treat <data> as a file path
number
Days until deletion (default: 7)
string
Password to access the Send
string
Comma-separated email addresses that can access the Send (requires feature flag)
number
Maximum number of accesses allowed
boolean
Hide text content by default in web vault
string
Name for the Send (defaults to GUID for text, filename for files)
string
Notes to add to the Send
boolean
Return full Send object instead of just the access URL

Examples

send create

Create a Send with full control.
string
Base64-encoded Send JSON. Can be piped from stdin.

Options

string
File path for file Send
string
Text content for text Send
boolean
Hide text by default (only with --text)

Example

send list

List all Sends owned by you.

Example

send get

Get a Send by ID or search term.
string
required
Send ID or search term

Options

string
Output directory or filename for file Sends
boolean
Return only the text content

Examples

send edit

Edit a Send.
string
Base64-encoded updated Send JSON. Can be piped from stdin.

Options

string
Override the item ID in the JSON
You cannot update a file Send’s file content. Delete and recreate instead.

send delete

Delete a Send.
string
required
Send ID to delete

Example

send remove-password

Remove password protection from a Send.
string
required
Send ID to modify

Example

receive

Access a Send from a URL.
string
required
Bitwarden Send URL

Options

string
Password to access the Send
string
Environment variable storing the password
string
File containing the password as the first line
boolean
Return Send JSON object instead of content
string
File path to save file-type Send

Example

Utility Commands

generate

Generate a password or passphrase.

Options

boolean
Include uppercase characters
boolean
Include lowercase characters
boolean
Include numbers
boolean
Include special characters
boolean
Generate a passphrase instead of password
number
Password length (minimum 5, default 14)
number
Number of words in passphrase (minimum 3)
number
Minimum number of numeric characters
number
Minimum number of special characters
string
Word separator for passphrases
boolean
Capitalize passphrase words
boolean
Include number in passphrase
boolean
Avoid ambiguous characters

Examples

encode

Base64 encode stdin for use with create/edit commands.
Output can be piped to create or edit commands.

Example

config

Configure CLI settings.
string
required
Setting to configure (currently only server)
string
Value to set. Omit to display current value.

Options

string
Custom web vault URL
string
Custom API URL
string
Custom identity URL
string
Custom icons service URL
string
Custom notifications URL
string
Custom events URL
string
Key Connector server URL

Examples

status

Show server, last sync, user info, and vault status.

Output

Returns JSON with:
Status values:
  • unauthenticated: Not logged in
  • locked: Logged in, vault locked
  • unlocked: Logged in, vault unlocked

Example

update

Check for CLI updates.
Returns the download URL for the latest version if an update is available.

Examples

completion

Generate shell completions.
string
required
Shell to generate completions for (currently only zsh)

Example

sdk-version

Print the SDK version.

Template Command

Get JSON templates for creating objects.
For Send templates:
string
required
Template type: item, folder, collection, send.text, send.file, etc.

Examples

Next Steps

Serve Mode

Run CLI as RESTful API server

Building

Build CLI from source