peak login authenticates your terminal against your 8848 Lab account
using a device-code flow -- the same style GitHub CLI and similar tools
use.
peak login
Peak will:
- Start a device authorization request and open your browser to a confirmation page
- Wait while you approve the sign-in in the browser
- Save an access token to
~/.peak/tokenonce approved
⛰ 8848 peak login
Opening your browser to confirm:
…/device?user_code=ABCD-1234
⣋ Waiting for confirmation...
Once approved:
✓ Logged in
Where the token lives
The token is written to ~/.peak/token (mode 0600, readable only by
you). Every other Peak command reads it from there -- there's no
separate login step per project or per machine session.
Logging out
There's no dedicated peak logout command yet -- delete ~/.peak/token
to sign out.
If login times out
The device code expires after a few minutes. If you don't approve in
time, Peak exits with an error telling you to run peak login again --
just do that.