Command Reference
Complete reference for all pass-cli commands and their options.
Global Options
Available for all commands:
| Flag | Description | Example |
|---|---|---|
--verbose | Enable verbose output | --verbose |
--help, -h | Show help | --help |
Global Flag Examples
# Enable verbose logging
pass-cli --verbose get github
# Get help for any command
pass-cli get --helpCustom Vault Location
To use a custom vault location, configure it in your config file (~/.pass-cli/config.yml):
vault_path: /custom/path/vault.encSee Configuration section for details on path expansion (environment variables, tilde, relative paths).
Commands
init - Initialize Vault
Create a new password vault or connect to an existing synced vault.
Synopsis
pass-cli init [flags]Description
Creates a new encrypted vault at ~/.pass-cli/vault.enc or connects to an existing vault on a synced remote (via rclone). You will be prompted to choose between creating a new vault or connecting to an existing one.
When creating a new vault, you’ll be prompted to create a master password and optionally enable cloud sync. When connecting to an existing vault, pass-cli will download it from your configured rclone remote.
Examples
# Initialize vault (interactive - choose create new or connect to existing)
pass-cli init
# Skip sync setup prompts
pass-cli init --no-sync
# For custom vault location, configure in config file first:
# Edit ~/.pass-cli/config.yml and add: vault_path: /custom/path/vault.enc
# Then run: pass-cli initFlags
| Flag | Type | Description |
|---|---|---|
--no-audit | bool | Disable tamper-evident audit logging (enabled by default) |
--use-keychain | bool | Store master password in OS keychain |
--no-recovery | bool | Skip BIP39 recovery phrase generation |
--no-sync | bool | Skip cloud sync setup prompts |
Password Policy
All master passwords must meet complexity requirements:
- Minimum Length: 12 characters
- Uppercase: At least one uppercase letter (A-Z)
- Lowercase: At least one lowercase letter (a-z)
- Digit: At least one digit (0-9)
- Symbol: At least one special symbol (!@#$%^&*()-_=+[]{}|;:,.<>?)
Examples:
- [OK]
MySecureP@ssw0rd2025!(meets all requirements) - [OK]
Correct-Horse-Battery-29!(meets all requirements) - [ERROR]
password123(too short, no uppercase, no symbol) - [ERROR]
MyPassword(no digit, no symbol)
Audit Logging (Enabled by Default)
Audit logging records vault operations with HMAC signatures. It is enabled by default during initialization.
# Initialize vault (audit logging enabled by default)
pass-cli init
# Disable audit logging if not desired
pass-cli init --no-auditAudit features:
- Tamper-Evident: HMAC-SHA256 signatures prevent log modification
- Privacy: Service names logged, passwords NEVER logged
- Key Storage: HMAC keys stored in OS keychain (separate from vault)
- Auto-Rotation: Logs rotate at 10MB with 7-day retention
- Graceful Degradation: Operations continue if logging fails
Verification:
# Verify audit log integrity
pass-cli verify-auditBIP39 Recovery Phrase (Enabled by Default)
Pass-CLI generates a 24-word BIP39 recovery phrase during initialization. This allows you to recover vault access if you forget your master password.
Default behavior (recovery enabled):
pass-cli init
# You'll be prompted to:
# 1. Create master password
# 2. Write down 24-word recovery phrase
# 3. Verify recovery phrase (3 random words)Skip recovery phrase:
# If you prefer keychain-only approach
pass-cli init --no-recoveryRecovery phrase features:
- Industry Standard: Uses BIP39 (same as hardware wallets)
- Secure: 6-word challenge = 2^66 combinations (~73.8 quintillion)
- Offline Storage: Write on paper, store in safe
- Optional Passphrase: Add 25th word for additional protection
- Recovery Command:
pass-cli change-password --recover
When to skip recovery phrase:
- You use keychain integration and trust OS keychain
- You keep master password in another password manager
- You prefer single point of failure (master password only)
For detailed recovery procedures, see Recovery Phrase Guide and Security Architecture.
Notes
- Master password must meet complexity requirements (12+ chars, uppercase, lowercase, digit, symbol)
- Strong passwords (20+ characters) recommended for master password
- Master password is stored in OS keychain for convenience (unless disabled)
- Recovery phrase is enabled by default (use
--no-recoveryto skip) - Write recovery phrase on paper and store securely (safe, safety deposit box)
- Vault file is created with restricted permissions (0600)
- Audit logging is opt-in (disabled by default)
add - Add Credential
Add a new credential to the vault.
Synopsis
pass-cli add <service> [flags]Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--username | -u | string | Username for the credential |
--password | -p | string | Password (not recommended, use prompt) |
--generate | -g | bool | Generate a random secure password |
--gen-length | int | Length of generated password (default: 20) | |
--category | -c | string | Category for organizing credentials (e.g., ‘Cloud’, ‘Databases’) |
--url | string | Service URL | |
--notes | string | Additional notes | |
--totp | bool | Prompt for TOTP secret interactively | |
--totp-uri | string | TOTP URI (otpauth://totp/…) |
Examples
# Interactive mode (prompts for username/password)
pass-cli add github
# With username flag
pass-cli add github --username user@example.com
# With URL and notes
pass-cli add github \
--username user@example.com \
--url https://github.com \
--notes "Personal account"
# With category
pass-cli add github -u user@example.com -c "Version Control"
# Generate random password (16 characters)
pass-cli add github -u user@example.com --generate
# Generate random password with custom length
pass-cli add github -u user@example.com --generate --gen-length 24
# Generate password with other metadata
pass-cli add github \
-u user@example.com \
--generate \
--gen-length 20 \
--url https://github.com \
--notes "Work account"
# All flags (not recommended for password)
pass-cli add github \
-u user@example.com \
-p secret123 \
--url https://github.com \
--notes "Work account"
# Add credential with TOTP (interactive prompt for secret)
pass-cli add github --totp
# Add credential with TOTP URI directly
pass-cli add github --totp-uri "otpauth://totp/GitHub:user?secret=JBSWY3DPEHPK3PXP&issuer=GitHub"Tip: When adding TOTP, the
ServiceandUsernamefields are used as defaults for the QR code’s issuer and account name. See the TOTP & 2FA Guide for details on how these fields are used.
Interactive Prompts
When not using flags, you’ll be prompted:
Enter username: user@example.com
Enter password: ******* (hidden input)
Enter URL (optional): https://github.com
Enter notes (optional): Personal accountPassword Policy
Credential passwords must meet the same complexity requirements as master passwords:
- Minimum 12 characters with uppercase, lowercase, digit, and symbol
- TUI mode shows real-time strength indicator
- Generated passwords automatically meet policy requirements
Notes
- Service names must be unique
- Password input is hidden by default
- Passing password via
-pflag is insecure (visible in shell history) - Use
pass-cli generateto create strong random passwords that meet policy requirements - Usage tracking begins when credential is first accessed
get - Retrieve Credential
Retrieve a credential from the vault.
Synopsis
pass-cli get <service> [flags]Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--quiet | -q | bool | Output password only (for scripts) |
--field | -f | string | Extract specific field |
--no-clipboard | bool | Skip clipboard copy | |
--masked | bool | Display password as asterisks | |
--totp | bool | Generate and display TOTP code | |
--totp-qr | bool | Display TOTP QR code in terminal | |
--totp-qr-file | string | Export TOTP QR code to PNG file |
Field Options
For --field flag:
username- User’s usernamepassword- User’s passwordcategory- Credential categoryurl- Service URLnotes- Additional notesservice- Service namecreated- Creation timestampmodified- Last modified timestampaccessed- Last accessed timestamp
Examples
# Default: Display credential and copy to clipboard
pass-cli get github
# Quiet mode (password only, for scripts)
pass-cli get github --quiet
pass-cli get github -q
# Get specific field
pass-cli get github --field username
pass-cli get github -f url
# Quiet mode with specific field
pass-cli get github --field username --quiet
# Display without clipboard
pass-cli get github --no-clipboard
# Display with masked password
pass-cli get github --masked
# Generate TOTP code (if TOTP configured for credential)
pass-cli get github --totp
# TOTP code only (for scripts)
pass-cli get github --totp --quiet
# Display TOTP QR code in terminal (to add to another device)
pass-cli get github --totp-qr
# Export TOTP QR code to file (use with caution - contains secret)
pass-cli get github --totp-qr-file totp-github.pngTOTP URI Labeling (Service & Username)
When generating a TOTP QR code or URI, Pass-CLI uses the following fields to identify the account in your authenticator app:
- Issuer: Uses
TOTPIssuerfield, or falls back toServicename if empty. - Account: Uses
Usernamefield, or falls back toServicename if empty.
Best Practice: Set the Username field to distinguish between multiple accounts at the same service. If you only have one account, leaving Username empty is fine as the service name will be used.
For more details on TOTP configuration and usage, see the TOTP & 2FA Guide.
Output Examples
Default output:
Service: github
Username: user@example.com
Password: mySecretPassword123!
URL: https://github.com
Notes: Personal account
[PASS] Password copied to clipboard (will clear in 5 seconds)Quiet mode:
$ pass-cli get github --quiet
mySecretPassword123!Field extraction:
$ pass-cli get github --field username --quiet
user@example.comTOTP code generation:
$ pass-cli get github --totp
123456Notes
- Clipboard auto-clears after 5 seconds
- Usage tracking records current directory
- Accessing a credential updates the “last accessed” timestamp
list - List Credentials
List all credentials in the vault.
Synopsis
pass-cli list [flags]Flags
| Flag | Type | Description |
|---|---|---|
--format, -f | string | Output format: table, json, simple (default: table) |
--unused | bool | Show only unused credentials |
--days | int | Days threshold for unused (default: 30) |
--by-project | bool | Group credentials by git repository |
--location | string | Filter credentials by directory path |
--recursive | bool | Include subdirectories with –location |
Examples
# List all credentials (table format)
pass-cli list
# List as JSON
pass-cli list --format json
# Simple list (service names only)
pass-cli list --format simple
# Show unused credentials (not accessed in 30 days)
pass-cli list --unused
# Show credentials not used in 90 days
pass-cli list --unused --days 90
# Group credentials by git repository
pass-cli list --by-project
# Group by project with JSON output
pass-cli list --by-project --format json
# Filter by location (current directory)
pass-cli list --location .
# Filter by location with subdirectories
pass-cli list --location /home/user/projects --recursive
# Combine location filter with project grouping
pass-cli list --location ~/work --by-project --recursiveOutput Examples
Table format (default):
+----------+----------------------+---------------------+
| SERVICE | USERNAME | LAST ACCESSED |
+----------+----------------------+---------------------+
| github | user@example.com | 2025-01-20 14:22 |
| aws-prod | admin@company.com | 2025-01-18 09:15 |
| database | dbuser | 2025-01-15 16:30 |
+----------+----------------------+---------------------+Simple format:
github
aws-prod
databaseNotes
- Passwords are never shown in list output
- Table format is best for human viewing
- JSON format is best for parsing
- Simple format is best for shell scripts
update - Update Credential
Update an existing credential.
Synopsis
pass-cli update <service> [flags]Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--username | -u | string | New username |
--password | -p | string | New password (not recommended) |
--generate | -g | bool | Generate a random secure password |
--gen-length | int | Length of generated password (default: 20) | |
--category | string | New category | |
--url | string | New URL | |
--notes | string | New notes | |
--totp-uri | string | New TOTP URI (otpauth://totp/…) | |
--clear-totp | bool | Clear TOTP configuration | |
--clear-category | bool | Clear category field to empty | |
--clear-notes | bool | Clear notes field to empty | |
--clear-url | bool | Clear URL field to empty | |
--force | -f | bool | Skip confirmation prompt |
Examples
# Update password (prompted)
pass-cli update github
# Update username
pass-cli update github --username newuser@example.com
# Update URL
pass-cli update github --url https://github.com/enterprise
# Update notes
pass-cli update github --notes "Updated account info"
# Update category
pass-cli update github --category "Work"
# Update TOTP configuration
pass-cli update github --totp-uri "otpauth://totp/GitHub:user?secret=JBSWY3DPEHPK3PXP&issuer=GitHub"
# Clear TOTP configuration
pass-cli update github --clear-totp
# Generate new random password (16 characters)
pass-cli update github --generate
# Generate new password with custom length
pass-cli update github --generate --gen-length 32
# Generate password and update other fields
pass-cli update github \
--generate \
--gen-length 24 \
--notes "Password rotated on 2025-11-11"
# Clear category field
pass-cli update github --clear-category
# Update multiple fields
pass-cli update github \
--username newuser@example.com \
--url https://github.com/enterprise \
--notes "Corporate account"Interactive Mode
If no flags provided, prompts for password:
Enter new password (leave blank to keep current): *******
Password updated successfully!Notes
- At least one field must be updated
- Updating password clears usage history
- Original values preserved if not specified
delete - Delete Credential
Delete a credential from the vault.
Synopsis
pass-cli delete <service> [flags]Aliases
rm, remove
Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--force | -f | bool | Skip confirmation prompt |
Examples
# Delete with confirmation
pass-cli delete github
# Force delete (no confirmation)
pass-cli delete github --force
pass-cli delete github -fInteractive Confirmation
Without --force:
Are you sure you want to delete 'github'? (yes/no): yes
Credential 'github' deleted successfully!Notes
- Deletion is permanent (no undo)
- Confirmation required unless using
--force - Credential completely removed from vault
change-password - Change Master Password
Change the master password used to encrypt and decrypt your vault.
Synopsis
pass-cli change-password [flags]Description
Re-encrypts your entire vault with a new master password. You must provide your current password to authorize the change. The new password must meet the password policy requirements.
If you forgot your master password, you can use the --recover flag to recover access using your BIP39 recovery phrase (if enabled during vault initialization).
Password Policy Requirements:
- Minimum 12 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one digit
- At least one special symbol (!@#$%^&*()-_=+[]{}|;:,.<>?)
Flags
| Flag | Type | Description |
|---|---|---|
--recover | bool | Use BIP39 recovery phrase instead of current password |
Examples
# Change master password (normal flow)
pass-cli change-password
# Recover access with BIP39 recovery phrase (if password forgotten)
pass-cli change-password --recoverInteractive Flow
Normal password change:
🔐 Change Master Password
📁 Vault location: /home/user/.pass-cli/vault.enc
Enter current master password: ********
Enter new master password (min 12 characters with uppercase, lowercase, digit, symbol): ********
Password strength: Strong [OK]
- Length: 16 characters [OK]
- Uppercase: Yes [OK]
- Lowercase: Yes [OK]
- Digits: Yes [OK]
- Symbols: Yes [OK]
Confirm new master password: ********
[OK] Master password changed successfully!Recovery flow with BIP39 phrase:
🔐 Recover Vault Access
📁 Vault location: /home/user/.pass-cli/vault.enc
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
BIP39 Recovery Phrase Challenge
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You will be asked to provide 6 words from your 24-word recovery phrase.
Enter word #7: device
[PASS] (1/6)
Enter word #12: diesel
[PASS] (2/6)
Enter word #18: identify
[PASS] (3/6)
Enter word #3: about
[PASS] (4/6)
Enter word #22: spin
[PASS] (5/6)
Enter word #15: hybrid
[PASS] (6/6)
[OK] Recovery phrase verified successfully!
Enter new master password: ********
Confirm new master password: ********
[OK] Master password changed successfully!
Your vault has been re-encrypted with the new password.Keychain Integration
If keychain integration is enabled, the new password is automatically stored in your OS keychain, replacing the old one.
Security Notes
- Current Password Required: You must authenticate with your current password (or use
--recover) - Recovery Phrase: Use
--recoverflag if you forgot your master password (requires 24-word phrase) - Recovery Requirements: Recovery only works if BIP39 phrase was enabled during
pass-cli init - Policy Enforcement: New password must meet all security requirements
- Re-encryption: All credentials are re-encrypted with the new password
- Atomic Operation: Vault is not modified if re-encryption fails
- Audit Logging: Password changes are logged (if audit logging enabled)
Recovery Prerequisites
To use --recover flag, you must:
- Have enabled BIP39 recovery during
pass-cli init(default behavior) - Have your 24-word recovery phrase written down
- Be able to provide 6 random words from the phrase when challenged
If you used --no-recovery during initialization, the --recover flag will not work.
See Also
- Password Policy - Password policy details
- BIP39 Recovery - Recovery phrase details
- Recovery Guide - Detailed recovery procedures
- Keychain Setup - Keychain integration
generate - Generate Password
Generate a cryptographically secure password.
Synopsis
pass-cli generate [flags]Aliases
gen, pwd
Flags
| Flag | Type | Description |
|---|---|---|
--length | int | Password length (8-128, default: 20) |
--no-lower | bool | Exclude lowercase letters |
--no-upper | bool | Exclude uppercase letters |
--no-digits | bool | Exclude digits |
--no-symbols | bool | Exclude symbols |
--no-clipboard | bool | Skip clipboard copy |
Examples
# Generate default password (20 chars, all character types)
pass-cli generate
# Custom length
pass-cli generate --length 32
# Alphanumeric only (no symbols)
pass-cli generate --no-symbols
# Digits and symbols only
pass-cli generate --no-lower --no-upper
# Letters only (no digits or symbols)
pass-cli generate --no-digits --no-symbols
# Display only (no clipboard)
pass-cli generate --no-clipboardCharacter Sets
Default character sets:
- Lowercase:
a-z - Uppercase:
A-Z - Digits:
0-9 - Symbols:
!@#$%^&*()_+-=[]{}|;:,.<>?
Notes
- Uses
crypto/randfor cryptographic randomness - At least one character set must be enabled
- Minimum length: 8 characters
- Maximum length: 128 characters
- Clipboard auto-clears after 5 seconds
version - Show Version
Display version information including build details.
Synopsis
pass-cli versionExamples
# Show version
pass-cli versionOutput
pass-cli X.Y.Z
commit: abc123f
built: 2025-01-20T10:30:00Zusage - View Credential Usage History
Display detailed usage history showing where and when a credential was accessed.
Synopsis
pass-cli usage <service> [flags]Description
Shows credential access patterns across different working directories, including:
- Location paths (working directories where credential was used)
- Git repository context (if location is within a git repo)
- Last access timestamps
- Access counts per location
- Field-level usage breakdown (username, password, url, notes)
Useful for tracking where credentials are used across projects and identifying stale usage locations.
Arguments
| Argument | Required | Description |
|---|---|---|
<service> | Yes | Service name to view usage history for |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output format: table, json, simple |
--limit | int | 20 | Max locations to display (0 = unlimited) |
Examples
# View usage history (table format, 20 most recent locations)
pass-cli usage github
# View all locations (no limit)
pass-cli usage aws --limit 0
# View only 5 most recent locations
pass-cli usage postgres --limit 5
# JSON output for scripting
pass-cli usage heroku --format json
# Simple format (location paths only)
pass-cli usage redis --format simpleOutput (Table Format)
Usage History for 'github':
Location Git Repo Last Access Count Fields
──────────────────────────────────────────────────────────────────────────────────────────────────
/home/user/projects/webapp [PASS] webapp 2025-11-12 14:30 12 password(8), username(4)
/home/user/projects/api-service [PASS] api-service 2025-11-10 09:15 5 password(5)
/home/user/scripts [FAIL] (not a git repo) 2025-11-08 16:45 3 password(2), url(1)
Total locations: 3
Total accesses: 20Output (JSON Format)
{
"service": "github",
"locations": [
{
"location": "/home/user/projects/webapp",
"git_repository": "webapp",
"path_exists": true,
"last_access": "2025-11-12T14:30:22Z",
"access_count": 12,
"field_counts": {
"password": 8,
"username": 4
}
}
],
"total_locations": 3,
"total_accesses": 20
}Output (Simple Format)
/home/user/projects/webapp
/home/user/projects/api-service
/home/user/scriptsNotes
- Path Validation: Shows [PASS] if location path still exists, [FAIL] if deleted
- Git Integration: Detects git repositories and shows repo name
- Field Tracking: Counts which credential fields were accessed
- Automatic: Usage tracked automatically on every
getcommand - Location Limit: Default 20 locations prevents overwhelming output for heavily-used credentials
See Also
- Usage Tracking Guide - Comprehensive usage tracking guide
config - Manage Configuration
Manage Pass-CLI configuration settings for terminal warnings and keyboard shortcuts.
Synopsis
pass-cli config <subcommand>Description
Configuration file location: ~/.pass-cli/config.yml
Manages settings for:
- Terminal size warnings and minimum dimensions
- TUI keyboard shortcuts and keybindings
- Vault path location
- Other application preferences
Subcommands
Config Init
Create configuration file with commented examples.
Synopsis:
pass-cli config initDescription:
Creates a new config file at ~/.pass-cli/config.yml with default settings and examples. Fails if file already exists (use config reset to overwrite).
Examples:
# Create default config file
pass-cli config initOutput:
[OK] Configuration file created: /home/user/.pass-cli/config.yml
Edit the file to customize your settings:
- Terminal warnings
- Keyboard shortcuts
- Vault locationConfig Edit
Open configuration file in your default editor.
Synopsis:
pass-cli config editDescription: Opens config file in editor determined by:
EDITORenvironment variable- Platform defaults (notepad on Windows, nano/vim on Linux/macOS)
Creates config file with defaults if it doesn’t exist.
Examples:
# Edit config file
pass-cli config edit
# Use specific editor
EDITOR=vim pass-cli config editConfig Validate
Validate configuration file syntax and settings.
Synopsis:
pass-cli config validateDescription: Checks configuration for errors:
- Terminal size ranges (1-10000 width, 1-1000 height)
- Keybinding conflicts (no duplicate key assignments)
- Unknown actions (all keybindings must map to known actions)
- Key format validation
Exit codes:
0= Configuration valid1= Configuration has errors2= File system error
Examples:
# Validate config
pass-cli config validateOutput (Valid):
[OK] Configuration is valid
Settings:
Vault path: ~/.pass-cli/vault.enc
Terminal warnings: enabled
Keybindings: 15 custom shortcuts definedOutput (Invalid):
[ERROR] Configuration has errors:
Line 12: Invalid terminal width: 0 (must be between 1-10000)
Line 25: Duplicate keybinding: Ctrl+S assigned to both 'save' and 'search'
Line 34: Unknown action: 'invalid_action'
Fix these errors and run 'config validate' again.Config Reset
Reset configuration to default values.
Synopsis:
pass-cli config resetDescription:
Resets the configuration file to default values. Creates a backup of your current config at <config-path>.backup before overwriting.
Examples:
# Reset config to defaults (creates backup automatically)
pass-cli config resetOutput:
Config file backed up to /home/user/.pass-cli/config.yml.backup
Config file reset to defaults at /home/user/.pass-cli/config.ymlSee Also
- Configuration Reference - Configuration file reference
keychain - Manage Keychain Integration
Manage system keychain integration for storing vault master passwords.
Synopsis
pass-cli keychain <subcommand>Subcommands
Keychain Enable
Enable keychain integration for an existing vault by storing the master password in the system keychain.
Synopsis:
pass-cli keychain enable [flags]Description:
Stores your vault master password in the OS keychain (Windows Credential Manager, macOS Keychain, or Linux Secret Service). Future commands will not prompt for password when keychain is available. This is useful for vaults created without the --use-keychain flag.
Flags:
| Flag | Type | Description |
|---|---|---|
--force | bool | Overwrite existing keychain entry if already enabled |
Examples:
# Enable keychain for default vault
pass-cli keychain enable
# For custom vault location, configure vault_path in ~/.pass-cli/config.yml
# Force overwrite existing keychain entry
pass-cli keychain enable --forceOutput:
Master password: ********
[OK] Keychain integration enabled for vault at /home/user/.pass-cli/vault.enc
Future commands will not prompt for password when keychain is available.Keychain Status
Display keychain integration status for the current vault.
Synopsis:
pass-cli keychain status [flags]Description: Shows keychain availability, password storage status, and backend name. This is a read-only operation that doesn’t require unlocking the vault.
Examples:
# Check keychain status for default vault
pass-cli keychain status
# For custom vault location, configure vault_path in ~/.pass-cli/config.ymlOutput Examples:
When keychain is enabled:
Keychain Status for /home/user/.pass-cli/vault.enc:
[PASS] System Keychain: Available (keychain)
[PASS] Password Stored: Yes
[PASS] Backend: keychain
Your vault password is securely stored in the system keychain.
Future commands will not prompt for password.When keychain is available but not enabled:
Keychain Status for /home/user/.pass-cli/vault.enc:
[PASS] System Keychain: Available (wincred)
[FAIL] Password Stored: No
The system keychain is available but no password is stored for this vault.
Run 'pass-cli keychain enable' to store your password and skip future prompts.When keychain is not available:
Keychain Status for /home/user/.pass-cli/vault.enc:
[FAIL] System Keychain: Not available on this platform
[FAIL] Password Stored: N/A
System keychain is not accessible. You will be prompted for password on each command.Platform Support
| Platform | Backend | Service Name |
|---|---|---|
| Windows | wincred | Windows Credential Manager |
| macOS | keychain | Keychain Access |
| Linux | gnome-keyring/kwallet | Secret Service API |
vault - Manage Vault Files
Manage pass-cli vault files and their lifecycle.
Synopsis
pass-cli vault <subcommand>Subcommands
Vault Remove
Permanently delete a vault file and its associated keychain entry.
Synopsis:
pass-cli vault remove <path> [flags]Description: Permanently deletes:
- The vault file from disk
- The master password from the system keychain
- Any orphaned keychain entries
[WARNING] WARNING: This operation is irreversible. All stored credentials will be lost. Ensure you have backups before proceeding.
Arguments:
| Argument | Required | Description |
|---|---|---|
<path> | Yes | Path to vault file to remove |
Flags:
| Flag | Type | Description |
|---|---|---|
-y, --yes | bool | Skip confirmation prompt (for automation) |
-f, --force | bool | Force removal even if vault appears in use |
Examples:
# Remove vault with confirmation prompt
pass-cli vault remove /path/to/vault.enc
# Remove vault without confirmation (for automation)
pass-cli vault remove /path/to/vault.enc --yes
# Force removal even if file appears in use
pass-cli vault remove /path/to/vault.enc --forceOutput:
[WARNING] WARNING: This will permanently delete the vault and all stored credentials.
Are you sure you want to remove /home/user/.pass-cli/vault.enc? (y/n): y
[OK] Vault removed successfully:
• Vault file deleted
• Keychain entry removed
• Orphaned entries cleaned upVault Backup
Manage vault backups for disaster recovery.
Synopsis:
pass-cli vault backup <subcommand>Vault Backup Create
Create a timestamped manual backup of the vault.
Synopsis:
pass-cli vault backup create [flags]Description:
Creates a manual backup with naming pattern vault.enc.YYYYMMDD-HHMMSS.manual.backup. Works without requiring the master password (no vault unlock needed).
Flags:
| Flag | Type | Description |
|---|---|---|
-v, --verbose | bool | Show detailed operation progress |
Examples:
# Create manual backup
pass-cli vault backup create
# Create backup with verbose output
pass-cli vault backup create --verboseOutput:
[OK] Manual backup created successfully:
/home/user/.pass-cli/vault.enc.20251112-143022.manual.backup
Size: 2.45 MBVault Backup Restore
Restore vault from a backup file.
Synopsis:
pass-cli vault backup restore [flags]Description:
Restores your vault from a backup file. By default, selects the newest valid backup. Use --file to specify a specific backup, or --interactive to choose from a list.
[WARNING] WARNING: This command overwrites your current vault file. After restore, use the backup’s password to unlock (if you changed passwords since the backup, use the OLD password).
Flags:
| Flag | Type | Description |
|---|---|---|
--file | string | Restore from a specific backup file |
-i, --interactive | bool | Interactively select from available backups |
-f, --force | bool | Skip confirmation prompt |
-v, --verbose | bool | Show detailed operation progress |
--dry-run | bool | Preview which backup would be restored (no changes) |
Examples:
# Restore from newest backup (with confirmation)
pass-cli vault backup restore
# Restore from a specific backup file
pass-cli vault backup restore --file vault.enc.20241210-143022.manual.backup
# Interactive mode: choose from available backups
pass-cli vault backup restore --interactive
# Restore without confirmation
pass-cli vault backup restore --force
# Preview which backup would be restored
pass-cli vault backup restore --dry-run
# Restore with detailed progress
pass-cli vault backup restore --verboseOutput:
⚠️ Warning: After restore, use the backup's master password to unlock.
If you changed your password since this backup, use the OLD password.
Backup to restore:
File: /home/user/.pass-cli/vault.enc.20251112-143022.manual.backup
Type: manual
Modified: 2025-11-12 14:30:22
Are you sure you want to continue? (y/n): y
[OK] Vault restored successfully from backupVault Backup Preview
Preview credentials inside a backup file without restoring it.
Synopsis:
pass-cli vault backup preview --file <backup-file> [flags]Description: Decrypts a backup file in-memory to show which credentials it contains. Does NOT modify any files. Useful for finding specific credentials before deciding which backup to restore.
Flags:
| Flag | Type | Description |
|---|---|---|
--file | string | Backup file to preview (required) |
-v, --verbose | bool | Show detailed credential information (username, category, created date) |
Examples:
# Preview credentials in a backup
pass-cli vault backup preview --file vault.enc.20241210-143022.manual.backup
# Preview with detailed information
pass-cli vault backup preview --file vault.enc.backup --verboseOutput (basic):
Enter the backup's master password: ********
Found 5 credential(s) in backup:
1. github.com
2. gitlab.com
3. aws-console
4. email-work
5. vpn-office
Backup file: vault.enc.20241210-143022.manual.backup
Modified: 2024-12-10 14:30:22Output (verbose):
┌───┬──────────────┬─────────────────┬──────────┬────────────┐
│ # │ Service │ Username │ Category │ Created │
├───┼──────────────┼─────────────────┼──────────┼────────────┤
│ 1 │ github.com │ myuser │ dev │ 2025-10-15 │
│ 2 │ gitlab.com │ myuser │ dev │ 2025-10-16 │
│ 3 │ aws-console │ admin@company │ cloud │ 2025-09-20 │
└───┴──────────────┴─────────────────┴──────────┴────────────┘Vault Backup Info
View backup status and information.
Synopsis:
pass-cli vault backup info [flags]Description: Displays all available backups with metadata:
- Backup type (automatic or manual)
- File size and creation time
- Age with warnings for backups >30 days old
- Which backup would be used for restore
- Disk space usage alerts (>5 manual backups)
Flags:
| Flag | Type | Description |
|---|---|---|
-v, --verbose | bool | Show detailed backup information |
Examples:
# View all backups
pass-cli vault backup info
# View with detailed information
pass-cli vault backup info --verboseOutput:
📦 Backup Status for: /home/user/.pass-cli/vault.enc
Automatic Backup:
[OK] vault.enc.backup
Size: 2.45 MB
Created: 1 day ago (2025-11-11 14:30:22)
Manual Backups:
[OK] vault.enc.20251112-143022.manual.backup ← Would be used for restore
Size: 2.45 MB
Created: 2 hours ago (2025-11-12 14:30:22)
[OK] vault.enc.20251110-091545.manual.backup
Size: 2.40 MB
Created: 2 days ago (2025-11-10 09:15:45)
Total backups: 3
Total disk space: 7.30 MBSee Also:
- Backup & Restore Guide - Comprehensive backup guide
Vault Migrate
Migrate a vault from v1 to v2 format for working recovery phrase support.
Synopsis:
pass-cli vault migrateDescription: Upgrades an existing v1 vault to the v2 format. The v2 format uses a key-wrapping scheme that enables recovery phrases to actually work (v1 recovery phrases were non-functional due to a bug in key derivation).
During migration:
- Your vault will be re-encrypted with the new v2 format
- A NEW 24-word recovery phrase will be generated (write it down immediately)
- Your existing credentials remain unchanged
- The migration is atomic (all-or-nothing, safe against power loss)
After migration, you can use pass-cli change-password --recover to recover your vault using the new recovery phrase if you forget your master password.
Flags:
None.
Examples:
# Migrate vault to v2 format
pass-cli vault migrate
# Migration prompts for confirmation and password verification
# It will display the new recovery phrase after successful migrationInteractive Flow:
🔄 Vault Migration
📁 Vault location: /home/user/.pass-cli/vault.enc
Your vault is using the legacy v1 format.
The v1 format has a bug where recovery phrases cannot unlock the vault.
Migration will:
• Re-encrypt your vault with the new v2 format
• Generate a NEW 24-word recovery phrase
• Preserve all your existing credentials
Proceed with migration? (yes/no): yes
Enter master password: ********
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Your New Recovery Phrase
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Write down these 24 words in order:
1. about 2. absent 3. accent 4. account 5. achieve
6. acid 7. acquire 8. across 9. act 10. action
... (remaining words)
Verify your backup? (yes/no): yes
Verification (attempt 1/3):
Word at position 7: device
[PASS] (1/6)
... (additional verification prompts)
✅ Vault migrated successfully to v2 format!
Your recovery phrase is now fully functional.
You can use 'pass-cli change-password --recover' if you forget your password.Important Notes:
- Backup Created Automatically: A backup is created before migration begins
- New Recovery Phrase: Your old recovery phrase (if any) becomes invalid after migration
- Write It Down: Save the new 24-word phrase in a safe location (paper, safe, etc.)
- Atomic Migration: Safe against power loss and system crashes
- No Credential Loss: All your stored credentials are preserved exactly
- Master Password Required: You must unlock your vault to migrate
- Optional Passphrase: You can add a 25th word passphrase for additional security (advanced)
Passphrase Protection (Advanced):
For enhanced security, you can add an optional passphrase (25th word) to your recovery phrase:
pass-cli vault migrate
# When prompted for passphrase protection, select yes
# Enter and confirm your passphrase (stored separately from the phrase)Important if using passphrase:
- You need BOTH the 24 words AND the passphrase to recover your vault
- Store the passphrase separately from your 24-word phrase
- If you lose the passphrase, recovery becomes impossible
- Document your passphrase securely
Troubleshooting:
Vault is already v2 format:
✓ Your vault is already using the v2 format.
No migration needed - your recovery phrase will work correctly.Migration Verification Failed: If you can’t verify the recovery phrase after writing it down, migration allows up to 3 attempts. If all fail, please ensure you write down the phrase correctly before migration completes.
See Also:
- Recovery Phrase Guide - Complete recovery phrase documentation
- Change Password - Use recovery phrase to recover access
- Backup & Restore Guide - Backup management
verify-audit - Verify Audit Log Integrity
Verify the integrity of audit log entries by checking HMAC signatures.
Synopsis
pass-cli verify-audit [audit-log-path]Description
Verifies that audit log entries have not been tampered with by validating HMAC-SHA256 signatures on each entry. The audit key is retrieved from the OS keychain for verification.
What It Checks:
- HMAC signature validity for each log entry
- JSON structure integrity
- Chronological consistency
- Presence of required fields (timestamp, event, outcome)
Arguments
| Argument | Required | Description |
|---|---|---|
audit-log-path | No | Path to audit log file (defaults to <vault-dir>/audit.log) |
Flags
None.
Environment Variables
| Variable | Description |
|---|---|
PASS_AUDIT_LOG | Custom audit log path (overridden by command argument) |
Examples
# Verify default audit log
pass-cli verify-audit
# Verify specific audit log
pass-cli verify-audit /path/to/audit.log
# Verify with environment variable
PASS_AUDIT_LOG=/custom/audit.log pass-cli verify-auditOutput (All Valid)
🔍 Verifying audit log: /home/user/.pass-cli/audit.log
[OK] Audit log verification complete:
Total entries: 127
Valid entries: 127
Invalid entries: 0
Tampered entries: 0
Audit log integrity: VERIFIED [OK]Output (Tampered Detected)
🔍 Verifying audit log: /home/user/.pass-cli/audit.log
[WARNING] Audit log verification failed:
Total entries: 127
Valid entries: 123
Invalid entries: 4
Tampered entries: 4
Invalid entries detected:
Line 45: HMAC verification failed (possible tampering)
Line 67: HMAC verification failed (possible tampering)
Line 89: Invalid JSON structure
Line 102: Missing required fields
Audit log integrity: FAILED [ERROR]
CRITICAL: Audit log may have been tampered with or corrupted.
Review the log file and investigate the flagged entries.Exit Codes
| Code | Meaning |
|---|---|
| 0 | All entries valid, log integrity verified |
| 1 | Tampered or invalid entries detected |
| 2 | Audit log not found or inaccessible |
| 3 | Audit key not found in keychain |
Security Notes
- HMAC Key Required: Audit key must exist in OS keychain
- Tamper Evidence: Failed verification indicates log modification
- Read-Only: Verification does not modify the audit log
- Automatic Rotation: Verifies all rotated log files if present
Troubleshooting
Problem: “audit log not found”
Solution: Audit logging is enabled by default. If you initialized with --no-audit, re-initialize without that flag.
Problem: “failed to retrieve audit key from keychain”
Solution: Audit key may have been deleted. Re-initialize the vault with pass-cli init (audit enabled by default)
Problem: “HMAC verification failed” Causes:
- Audit log manually edited (tampering)
- Log file corrupted
- Audit key changed or regenerated
- File system corruption
See Also
- Audit Logging - Audit logging architecture
- Security Operations - Security best practices
sync - Manage Cloud Sync
Manage cloud synchronization for your pass-cli vault using rclone.
Synopsis
pass-cli sync <subcommand>Description
Cloud sync uses rclone to synchronize your encrypted vault with cloud storage providers like Google Drive, Dropbox, OneDrive, and many others.
Prerequisites:
- rclone must be installed and configured with at least one remote
- Run ‘rclone config’ to set up a remote if you haven’t already
Subcommands
sync enable - Enable Cloud Sync on Existing Vault
Enable cloud synchronization for an existing pass-cli vault.
Synopsis:
pass-cli sync enable [flags]Description: Configures an existing vault to sync with a cloud storage provider via rclone. Your encrypted vault will be pushed to the remote after setup.
Flags:
| Flag | Description |
|---|---|
--force | Overwrite remote if it already contains vault files |
Examples:
# Enable sync interactively
pass-cli sync enable
# Force overwrite if remote already has files
pass-cli sync enable --forceOutput:
Enter your rclone remote path.
Examples:
gdrive:.pass-cli (Google Drive)
dropbox:Apps/pass-cli (Dropbox)
onedrive:.pass-cli (OneDrive)
Remote path: gdrive:.pass-cli
Checking remote connectivity...
✅ Sync enabled successfully!
Remote: gdrive:.pass-cli
Your vault will now sync automatically on each operation.
Use 'pass-cli doctor' to check sync status.Prerequisites:
- An existing pass-cli vault (run ‘pass-cli init’ first)
- rclone installed and configured with at least one remote
Notes:
- Performs automatic validation of remote connectivity
- Warns if remote already contains files (use
--forceto overwrite) - Performs initial push of vault to remote
- Configuration is saved automatically
See Also
- Cloud Sync Guide - Comprehensive sync setup and usage
- Health Checks - Verify sync status with doctor command
doctor - System Health Check
Run diagnostic checks on your pass-cli installation.
Synopsis
pass-cli doctor [flags]Description
Performs comprehensive health checks on your vault, configuration, keychain integration, and backups. Useful for troubleshooting issues or verifying system state.
Checks Performed:
- Version Check: Compares installed version against latest release
- Vault Check: Verifies vault file exists and has correct permissions
- Config Check: Validates configuration syntax and settings
- Keychain Check: Tests OS keychain integration status
- Backup Check: Verifies backup files exist and are accessible
- Sync Check (if enabled): Verifies rclone is installed, remote is configured, and connectivity works
Flags
| Flag | Type | Description |
|---|---|---|
--json | bool | Output results as JSON |
--quiet | bool | Only show warnings and errors |
--verbose, -v | bool | Verbose output with detailed check execution |
Examples
# Run all health checks
pass-cli doctor
# Output as JSON (for scripts)
pass-cli doctor --json
# Show only problems
pass-cli doctor --quiet
# Verbose mode (detailed check execution)
pass-cli doctor --verboseExit Codes
| Code | Meaning |
|---|---|
| 0 | All checks passed (HEALTHY) |
| 1 | Warnings detected (review recommended) |
| 2 | Errors detected (action required) |
See Also
- Health Checks Guide - Detailed documentation and troubleshooting
tui - Interactive Terminal Interface
Launch the interactive terminal user interface.
Synopsis
pass-cli tui
pass-cli # Also launches TUI when no command specifiedDescription
Opens an interactive terminal interface for browsing and managing credentials. The TUI provides keyboard-driven navigation, search, and credential operations without memorizing CLI commands.
Features:
- Sidebar navigation with credential tree
- Detail panel with credential information
- Search and filter credentials
- Add, edit, and delete credentials
- Copy passwords to clipboard
- Usage statistics display
Flags
None.
Examples
# Launch TUI explicitly
pass-cli tui
# Launch TUI (default when no command given)
pass-cliKeyboard Shortcuts
| Key | Action |
|---|---|
Tab | Switch between panels |
Enter | Select/expand item |
Esc | Cancel/go back |
/ | Search |
a | Add credential |
e | Edit credential |
d | Delete credential |
c | Copy password |
t | Copy TOTP code |
q | Quit |
See Also
- TUI Guide - Complete TUI documentation and customization
Troubleshooting
Why Does Doctor Report Orphaned Keychain Entries?
Symptom: Doctor reports “⚠ Keychain: Orphaned entry detected”
Causes:
- Vault file was deleted/moved but keychain entry remains
- Vault path changed but old keychain entry wasn’t cleaned up
- Multiple vaults were created and old entries weren’t removed
Solutions:
macOS:
open -a "Keychain Access"
# Search for "pass-cli" and delete old entriesWindows:
control /name Microsoft.CredentialManager
# Navigate to "Windows Credentials" and remove old "pass-cli" entriesLinux:
secret-tool search service pass-cli
secret-tool clear service pass-cli vault /old/path/vault.encWhat If First-Run Detection Doesn’t Trigger?
Expected Behavior: When running vault-requiring commands (add, get, list, update, delete) for the first time without an existing vault, pass-cli offers guided initialization.
Scenarios where first-run detection is skipped:
Vault already exists:
# Check if vault exists ls ~/.pass-cli/vault.encSolution: First-run detection is not needed - your vault is already set up.
Custom vault configured:
# If vault_path is configured in config file # First-run detection uses that locationSolution: Configuration is respected - first-run detection will create vault at configured location
Non-TTY environment (scripts, pipes, CI/CD):
# This environment doesn't support interactive prompts echo "list" | pass-cli listSolution: Initialize vault manually in interactive session first, or use
pass-cli initexplicitly:# In CI/CD or scripts (configure vault_path in config file first) pass-cli init < password-input.txtCommand doesn’t require vault:
# These commands don't trigger first-run detection pass-cli version pass-cli doctor pass-cli helpSolution: Run a vault-requiring command:
pass-cli listorpass-cli init
Manual initialization: If first-run detection doesn’t trigger and you need to create a vault:
pass-cli initThis provides the same guided setup as automatic first-run detection.
Troubleshooting: If first-run detection should trigger but doesn’t:
# Verify no vault exists
ls ~/.pass-cli/vault.enc
# Check if running in TTY
tty # Should show /dev/pts/X or similar, not "not a tty"
# Try explicit init
pass-cli initSee Quick Start Guide for complete first-run documentation.
Getting Help
- Run any command with
--helpflag - See pass-cli Documentation for overview
- Check Troubleshooting for common issues
- Visit GitHub Issues