magnet login command authenticates the CLI as your Magnet user. It opens your browser to a confirmation page, and once you approve the displayed code, stores a personal CLI token on your machine (in ~/.magnet/auth.json, scoped to the API base URL).
Usage
Options
| Option | Description |
|---|---|
--token <token> | Use an existing CLI token instead of the browser flow. |
--no-browser | Don’t open a browser; print the verification URL and code instead. |
Examples
Log in on a headless machine:Related
magnet whoami— check who you’re logged in asmagnet logout— revoke the stored token- Tokens can also be reviewed and revoked from your Magnet account settings.