Command-line interface for managing AVP credentials
pip install avp-cli
These options are available for all commands:
--vault, -v Path to vault file (default: ~/.avp/vault.enc)
--password, -p Vault password (will prompt if not provided)
--workspace, -w Workspace name (default: "default")
--help Show help message
Initialize a new AVP vault.
# Interactive (prompts for password)
avp init
# With specific path
avp init --vault ~/my-vault.enc
# With password (not recommended for security)
avp init --password "secure-password"
Store a credential in the vault.
# Store an API key
avp store openai_api_key "sk-..."
# Store in specific workspace
avp store db_password "secret" --workspace production
# Password will be prompted
Password:
Retrieve a credential from the vault.
# Get a credential
avp get openai_api_key
openai_api_key: sk-...
# Quiet mode (only value, great for scripts)
avp get openai_api_key --quiet
sk-...
# Use in shell scripts
export OPENAI_API_KEY=$(avp get openai_api_key -q)
List all credentials in a workspace.
avp list
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโ
โ Key โ Version โ Created โ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโค
โ openai_api_key โ 2 โ 2024-02-18 โ
โ anthropic_api_key โ 1 โ 2024-02-17 โ
โ db_password โ 3 โ 2024-02-15 โ
โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโ
Delete a credential from the vault.
# Delete with confirmation
avp delete old_api_key
Delete credential 'old_api_key'? [y/N]: y
โ Deleted credential: old_api_key
# Force delete (no confirmation)
avp delete old_api_key --force
Rotate a credential with version tracking.
avp rotate openai_api_key "sk-new-..."
โ Rotated credential: openai_api_key
Show vault information.
avp info
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ AVP Vault Info โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Vault Path: /Users/you/.avp/vault.enc โ
โ Size: 4.2 KB โ
โ Credentials: 12 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Import credentials from a file.
# From JSON
avp import secrets.json --format json
# From .env file
avp import .env --format dotenv
# Import to specific workspace
avp import prod.json --workspace production
Export credentials to a file.
# Export to JSON
avp export backup.json --format json
# Export to .env format
avp export .env --format dotenv
AVP_VAULT Path to vault file
AVP_PASSWORD Vault password (use with caution)
AVP_WORKSPACE Default workspace
# Initialize vault
avp init
# Store credentials
avp store openai_api_key "sk-..."
avp store anthropic_api_key "sk-ant-..."
# List all credentials
avp list
# Use in your application
export OPENAI_API_KEY=$(avp get openai_api_key -q)
python my_agent.py
# Development workspace
avp store api_key "dev-key" --workspace dev
# Production workspace
avp store api_key "prod-key" --workspace prod
# Switch between them
avp get api_key --workspace dev # dev-key
avp get api_key --workspace prod # prod-key
# In your CI pipeline
- name: Setup AVP
run: |
pip install avp-cli
echo "${{ secrets.AVP_PASSWORD }}" | avp get db_password -q > /tmp/db_pass
- name: Run tests
env:
DB_PASSWORD: $(cat /tmp/db_pass)
run: pytest