> ## Documentation Index
> Fetch the complete documentation index at: https://docs.internal.nscale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Login

> Authenticate with Nscale using browser-based device authorization.

Authenticate the CLI with your Nscale account. This opens a browser window to complete the login flow and stores your credentials locally.

```bash theme={null}
nscale login
```

The CLI also prints the verification URL and a one-time code. If the browser does not open, visit the URL manually and enter the code.

Once authenticated, your credentials are saved and reused automatically for subsequent commands. By default they are stored under the `default` user; pass the global `-u, --user` flag to save them under another name, for example to keep credentials for several accounts side by side:

```bash theme={null}
nscale login --user <username>
```

For CI/CD environments where browser-based login isn't possible, use the `NSCALE_SERVICE_TOKEN` environment variable instead:

```bash theme={null}
export NSCALE_SERVICE_TOKEN=<your-service-token>
nscale instances list --org <org-id>
```

See [Service Accounts](/docs/cli/serviceaccounts) for how to create and manage service account tokens.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.