Key hierarchy
Key providers
aivault supports four key providers. Choose one when initializing the vault.macOS Keychain (default on macOS)
Passphrase
Environment variable
File
Auto-initialization
On first run,aivault status (or any command that needs the vault) auto-initializes with safe defaults:
- macOS (canonical install): uses macOS Keychain with service
aivault(and falls back to the file provider if Keychain is unavailable) - Other platforms (canonical install): uses the file provider with a key at
~/.aivault/keys/kek.key(outside the vault directory) - When
AIVAULT_DIRis set: uses the file provider with a key at$AIVAULT_DIR/kek.key(useful for isolated tests)
Secret lifecycle
Associated data (AAD)
Each encrypted secret includes authenticated associated data (AAD v2+):- Secret ID
- Scope (global / workspace / group)
- Pinned provider (if registry-matched)