Account
Sign in
Sign in through the browser (device code).
Usage
fortrip login [options]How it works
login prints a link and a code, and opens the link in your browser. Sign in to Fortrip, check that the code matches the one in your terminal, and approve. The CLI waits up to 10 minutes, then saves the sign-in to ~/.config/fortrip/credentials.json and prints your account.
Access tokens last 24 hours and the CLI renews them automatically. Refresh tokens never expire, so you stay signed in until you run fortrip logout.
Any other command that needs a sign-in does not wait for one. It exits with code 3 and normally prints loginUrl and userCode on stderr (a rejected FORTRIP_TOKEN prints tokenSource and no link). An AI agent shows both to the user and reruns the command once they have approved; the command finishes the sign-in itself.
Options
| Flag | Field | Description |
|---|---|---|
--no-browser | — | Don't open a browser: only print the sign-in code and link. |
Output
Progress goes to stderr. On success stdout is your account: { userId, email, name, apiUrl }.