Setup
Install Keeper Commander
Create Persistent Login Session
Follow the Keeper CLI documentation to create a persistent login:Template Functions
keeperFindPassword
Find and retrieve a password by path or UID:
keeper
Get structured data for a record by UID:
keeper get.
keeperDataFields
Get a simplified field structure indexed by field type:
Usage Examples
Simple Password Retrieval
Using Structured Data
~/.gitconfig.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
Kubernetes Config
~/.kube/config.tmpl
Configuration
Custom Command
Ifkeeper is not in your PATH:
~/.config/chezmoi/chezmoi.toml
Custom Config File
Pass additional arguments to Keeper CLI:~/.config/chezmoi/chezmoi.toml
Finding Record UIDs
To find a record’s UID:Record Structure
Keeper records have this structure:Advanced Usage
Custom Fields
Access custom fields:Accessing All Fields
Using Variables for Cleaner Templates
~/.config/services.yml.tmpl
Complete Examples
Multi-Service Configuration
~/.config/app/config.yml.tmpl
Environment Variables File
~/.config/env.sh.tmpl
Troubleshooting
Not Logged In
Create a persistent session:Record Not Found
Search for the record:Command Not Found
Ensure Keeper Commander is installed:Testing Templates
Test template functions:Viewing Record Structure
Inspect a record’s full structure:Best Practices
- Use UIDs: UIDs are more stable than paths/titles
- Organize records: Use folders to organize secrets
- Persistent sessions: Set up persistent login for convenience
- Custom fields: Use custom fields for structured data
- Test access: Verify records are accessible before templating
- Document UIDs: Keep a reference of UIDs used in templates
- Use keeperFindPassword: Simplest for just retrieving passwords
- Use keeperDataFields: Better for accessing multiple fields
- Cache awareness: chezmoi caches results per UID/path