Token Expiry Awareness & Clearer Auth Errors
The CLI now knows when this device's token expires, warns you before it does, and explains what to do when a request is rejected instead of printing a bare “Unauthorized”.
#What's Changed
- [Feature]
apivault loginrecords and prints the date this device's token expires, matching the 90-day lifetime the server now applies to newly approved CLI connections. - [Feature]
apivault whoamishows the token's expiry date, and highlights it in yellow with a renewal reminder once fewer than 14 days remain.apivault --json whoamiadds atokenExpiresAtfield. - [Improvement] A rejected request now explains itself: an expired token reports the date it lapsed, and a missing or revoked one says so, instead of surfacing the server's bare “Unauthorized”.
- [Improvement] Rate-limited responses now report how long to wait. Wrong vault keys are throttled server-side, so
keys get --reveal,keys add,env exportandruntranslate the server's backoff into “try again in 7m” rather than a bare error. - [Improvement] Running
apivaultwith no arguments distinguishes an expired token from being signed out, so the first line you see already tells you to runapivault login. - [Fix]
--projectandapivault projects usenow work with a project slug, not just a project ID, matching what the flag's help text,apivault projects listand the documentation have always described. - [Fix] Realigned the CLI's local key-masking helper with the web app's, so a locally masked value and a server-sent preview can no longer render differently.