> ## Documentation Index
> Fetch the complete documentation index at: https://starforge.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# sf login

> Log in, log out, and account status

## sf login

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf login --server https://<your StarForge domain>   # Specify on first login; remembered afterward
sf login                                    # Browser authorization (default)
sf login --device-flow                      # Device-code login (SSH / no browser)
sf login --token <TOKEN>                    # Non-interactive (CI)
```

| Option          | Description                                                                                                    |
| --------------- | -------------------------------------------------------------------------------------------------------------- |
| `-s, --server`  | StarForge server address; if omitted, uses the last remembered value / the `FORGE_SERVER` environment variable |
| `--token`       | Log in directly with a service token, skipping the browser (for CI)                                            |
| `--device-flow` | Force the device-code flow                                                                                     |
| `--no-browser`  | Same as `--device-flow`                                                                                        |

Login state is written to `~/.forge/` (permissions 0600). The browser flow uses OAuth + PKCE; when the platform is configured with OIDC (e.g. Casdoor), it automatically redirects to single sign-on.

<Frame caption="Console login. The same page is used when `sf login` opens a browser.">
  <img src="https://mintcdn.com/starforge/GatXR2rI5-_Vm4_H/images/console/login.png?fit=max&auto=format&n=GatXR2rI5-_Vm4_H&q=85&s=2306521111801b18e089d0ddd58a6667" alt="StarForge console login" width="2160" height="1350" data-path="images/console/login.png" />
</Frame>

## sf logout

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf logout
```

Revokes the refresh token and clears the local login state.

## sf status

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf status
```

Outputs: current account and role, quotas (concurrent GPUs / jobs / daily GPU-hours), current usage, available hardware profiles, and the list of active jobs. Checking the watermark before submitting is a good habit.

## `sf login`

Log in to StarForge

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf login [options]
```

| Option           | Description                                                                                         |
| ---------------- | --------------------------------------------------------------------------------------------------- |
| `--server`, `-s` | StarForge server address (default [https://starforge.gcoreinc.com](https://starforge.gcoreinc.com)) |
| `--token`        | Non-interactive login: use a service token (for CI)                                                 |
| `--device-flow`  | Force the device-code login (SSH / no browser)                                                      |
| `--no-browser`   | Do not open a browser (same as --device-flow)                                                       |
