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

# flox auth

## NAME

flox-auth - FloxHub authentication commands

## SYNOPSIS

```text theme={null}
flox [<general-options>] auth
     (login [--token-file <path>] | logout | status | token)
```

## DESCRIPTION

Authenticate with FloxHub so that you can push and pull environments.

### Quieting login reminders

Flox reminds you to log in when you run a command without a FloxHub
account, and warns when it resolves packages against the catalog without
a login. To turn these messages off:

```bash theme={null}
flox config --set auth_notifications false
```

This suppresses advisory messages only. Commands that require a login,
such as `flox push`, still fail with an explanation of what to do.

See [`flox-config`](/man/flox-config).

## SUBCOMMANDS

### `login`

Logs in to FloxHub.

Required to interact with environments on FloxHub via `flox push`,
`flox pull`, and `flox activate -r`. Authenticating also automatically
trusts your personal environments.

Prompts you to enter a one-time code at a specified URL. If called
interactively it can open the browser for you if you press `<enter>`.

With `--token-file <path>` the login is non-interactive: the FloxHub
token is read from `<path>` instead (pass `-` to read the token from
stdin). The file can contain a JWT access token, a personal access
token, or a service account token. Token-file login does not open a
browser or prompt for input. A JWT access token is validated locally.
FloxHub must be reachable to validate personal access tokens and service
account tokens. The validated token is stored. Use this in CI,
containers, and other scripted setups.

See also: [`flox-push`](/man/flox-push),
[`flox-pull`](/man/flox-pull),
[`flox-activate`](/man/flox-activate)

### `logout`

Logs out from FloxHub.

### `status`

Print your current login status and token expiry when known.

### `token`

Print the current authentication token to stdout.
