Authentication Commands
login
Log into a user account.Email address for your Bitwarden account. If omitted, you’ll be prompted.
Master password. If omitted, you’ll be prompted.
Options
Two-step login method (0=Authenticator, 1=Email, 3=YubiKey, etc.)
Two-step login code
Log in with Single Sign-On. Optional organization identifier.
Log in with an API Key
Environment variable storing your password
Path to file containing your password as the first line
Check login status without logging in
Examples
logout
Log out of the current user account.Example
unlock
Unlock the vault and return a new session key.Master password to unlock the vault. If omitted, you’ll be prompted.
Options
Check vault lock status without unlocking
Environment variable storing your password
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.Example
Vault Synchronization
sync
Pull the latest vault data from the server.Options
Force a full sync instead of incremental
Display the last sync date
Examples
Vault Operations
list
List an array of objects from the vault.Type of object to list:
items: Vault itemsfolders: Folderscollections: Collectionsorg-collections: Organization collectionsorg-members: Organization membersorganizations: Organizations
Options
Search term to filter results
Filter login items by URL (URL-match search)
Filter items by folder ID (use
null for items without folder)Filter items by collection ID
Filter items or collections by organization ID (use
notnull for any organization)Show only items in trash
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.Type of object to retrieve:
item: Full item detailsusername: Username field onlypassword: Password field onlyuri: URI field onlytotp: TOTP codenotes: Notes field onlyexposed: Check if password is exposed in data breachesattachment: Download attachmentfolder: Folder detailscollection: Collection detailsorg-collection: Organization collectionorganization: Organization detailstemplate: JSON template for creating objectsfingerprint: Account fingerprintsend: Send details
Search term or object’s globally unique ID
Options
Item ID for attachment operations
Output directory or filename for attachments
Organization ID for organization objects
Examples
create
Create an object in the vault.Type of object to create:
item: Vault itemattachment: File attachmentfolder: Folderorg-collection: Organization collection
Base64-encoded JSON of the object. Can be piped from stdin.
Options
Path to file for attachment creation
Item ID when creating an attachment
Organization ID for organization objects
Examples
edit
Edit an object in the vault.Type of object to edit:
item: Vault itemitem-collections: Item’s collection assignmentsfolder: Folderorg-collection: Organization collection
Object’s globally unique ID
Base64-encoded JSON with updates. Can be piped from stdin.
Options
Organization ID for organization objects
Examples
delete
Delete an object from the vault.Type of object to delete:
item: Vault item (soft delete to trash)attachment: Attachmentfolder: Folderorg-collection: Organization collection
Object’s globally unique ID
Options
Item ID when deleting an attachment
Organization ID for organization objects
Permanently delete item (skip trash)
Examples
restore
Restore an object from trash or archive.Type of object to restore (currently only
item)Object’s globally unique ID
Example
archive
Archive an item from the vault.Type of object to archive (currently only
item)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).Item’s globally unique ID
Organization’s globally unique ID
Base64-encoded JSON array of collection IDs. Can be piped from stdin.
Examples
confirm
Confirm an organization member.Type of object (currently only
org-member)Member’s globally unique ID
Options
Organization’s globally unique ID
Example
Import/Export
import
Import vault data from a file.Format of the import file (e.g.,
bitwardencsv, keepass2xml, lastpasscsv)File path to the data to import
Options
List all supported import formats
Import to a specific organization
Examples
export
Export vault data to a file.Options
Output directory or filename
Export format:
csv (default), json, encrypted_json, or zipPassword to encrypt export (only for
encrypted_json format)Export specific organization vault
Examples
Send Commands
send
Quickly create and share a Bitwarden Send.Text or file path to send
Options
Treat
<data> as a file pathDays until deletion (default: 7)
Password to access the Send
Comma-separated email addresses that can access the Send (requires feature flag)
Maximum number of accesses allowed
Hide text content by default in web vault
Name for the Send (defaults to GUID for text, filename for files)
Notes to add to the Send
Return full Send object instead of just the access URL
Examples
send create
Create a Send with full control.Base64-encoded Send JSON. Can be piped from stdin.
Options
File path for file Send
Text content for text Send
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.Send ID or search term
Options
Output directory or filename for file Sends
Return only the text content
Examples
send edit
Edit a Send.Base64-encoded updated Send JSON. Can be piped from stdin.
Options
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.Send ID to delete
Example
send remove-password
Remove password protection from a Send.Send ID to modify
Example
receive
Access a Send from a URL.Bitwarden Send URL
Options
Password to access the Send
Environment variable storing the password
File containing the password as the first line
Return Send JSON object instead of content
File path to save file-type Send
Example
Utility Commands
generate
Generate a password or passphrase.Options
Include uppercase characters
Include lowercase characters
Include numbers
Include special characters
Generate a passphrase instead of password
Password length (minimum 5, default 14)
Number of words in passphrase (minimum 3)
Minimum number of numeric characters
Minimum number of special characters
Word separator for passphrases
Capitalize passphrase words
Include number in passphrase
Avoid ambiguous characters
Examples
encode
Base64 encode stdin for use with create/edit commands.create or edit commands.
Example
config
Configure CLI settings.Setting to configure (currently only
server)Value to set. Omit to display current value.
Options
Custom web vault URL
Custom API URL
Custom identity URL
Custom icons service URL
Custom notifications URL
Custom events URL
Key Connector server URL
Examples
status
Show server, last sync, user info, and vault status.Output
Returns JSON with:unauthenticated: Not logged inlocked: Logged in, vault lockedunlocked: Logged in, vault unlocked
Example
update
Check for CLI updates.Examples
completion
Generate shell completions.Shell to generate completions for (currently only
zsh)Example
sdk-version
Print the SDK version.Template Command
Get JSON templates for creating objects.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