Persistence Strategy
When persist_tokens = true, Vygrant chooses backend in this order:
- OS keyring (preferred)
passstore- Legacy file store (if legacy token file exists)
- In-memory fallback
When persist_tokens = false, tokens are memory-only.
Split Store Model
With keyring or pass, Vygrant uses split storage:
- Access tokens: memory
- Refresh tokens: secure backend (keyring or pass)
Legacy Migration
If legacy token file exists (~/.vybr/vygrant/tokens.json) and secure store is available, Vygrant migrates tokens and keeps a backup file (tokens.json.bak).
Event Hook
If token_event_cmd is configured, Vygrant wraps storage with event notifications and executes the command on token changes.
Export/Import
vygrant token dump > tokens.jsoncat tokens.json | vygrant token restoreTreat dumps as sensitive secret material.