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

# Logging in with the CLI from a non-graphical environment

> Authenticate the FlexAI CLI on headless or remote environments

You can authenticate the FlexAI CLI on a headless or non-graphical environment — such as a Virtual Machine (*VM*) — by signing in on a machine that has a web browser and copying the credentials across. The browser step is needed because `flexai auth login` authenticates you through your GitHub account.

Install the FlexAI CLI on a machine equipped with a web browser, log in using the `flexai auth login` command, and then copy the FlexAI CLI configuration file contents to the VM's `$HOME/.flexai/config.yaml` configuration file:

1. Log into FlexAI from a machine equipped with a web browser
2. Open the `$HOME/.flexai/config.yaml` file on that machine
3. Copy its contents
4. Open the `$HOME/.flexai/config.yaml` file on your machine without a graphical environment
5. Paste the contents of the first configuration file into the second one

The FlexAI CLI on the machine without a graphical environment should now be authenticated and ready to use.
