Setup
Install Proton Pass CLI
Install the Proton Pass CLI:Log In
Authenticate with Proton Pass:Template Functions
protonPass
Retrieve an item using a secret reference URI:
pass://share-id/item-id/field-name.
protonPassJSON
Get structured JSON data for an item:
Usage Examples
Simple Secret Retrieval
Git Configuration
~/.gitconfig.tmpl
Using JSON Structure
~/.config/app/config.yml.tmpl
Database Credentials
~/.config/db/config.yml.tmpl
AWS Credentials
~/.aws/credentials.tmpl
Multiple API Keys
~/.config/api-keys.env.tmpl
NPM Configuration
~/.npmrc.tmpl
SSH Configuration
~/.ssh/config.tmpl
Docker Registry
~/.docker/config.json.tmpl
Secret Reference URI Format
Proton Pass uses URIs in the format:SHARE_ID: The vault/share identifierITEM_ID: The item identifierFIELD: The field name (e.g.,password,username,email)
Finding Item References
To find item identifiers:Configuration
Custom Command
If the Proton Pass CLI is not in your PATH:~/.config/chezmoi/chezmoi.toml
Complete Examples
Multi-Service Configuration
~/.config/services.yml.tmpl
Application Configuration
~/.config/app/config.yml.tmpl
Kubernetes Secrets
~/k8s/secrets.yaml.tmpl
Troubleshooting
Not Logged In
Log in to Proton Pass:Item Not Found
List all items:Command Not Found
Ensure Proton Pass CLI is installed:Testing Templates
Test template functions:Invalid Reference
Ensure your reference URI is in the correct format:Best Practices
- Use secret references: Prefer the
pass://URI format for clarity - Organize vaults: Use separate vaults for work, personal, shared
- Document references: Keep a list of reference URIs used
- Test access: Verify items are accessible before templating
- Use descriptive names: Name items clearly for easy reference
- Leverage JSON: Use
protonPassJSONfor multiple fields - Stay synced: Ensure Proton Pass is synced across devices