Skip to content

flexai auth

Manages the authentication state of the CLI.

Initiates the authentication flow of the CLI against the FlexAI authentication service.

Depending on the host system’s capabilities, the “Login URL” will be opened automatically or printed out for manual access by clicking on it or copying and pasting it into a web browser.

Login details are stored in the host system’s ~/.flexai/config.yaml file.

Terminal window
flexai auth login

A system that supports opening URLs automatically:

Terminal window
flexai auth login
Opening the browser...

A system that does not support opening URLs automatically:

Terminal window
flexai auth login
Please visit the following URL in your browser to authenticate:
https://api.flex.ai/api/v1/auth/login?redirect_endpoint=%2Fcallback&redirect_host=localhost%3A1337&redirect_scheme=http

Logs the current user out of the CLI.

This command will remove the authentication tokens from the host system’s ~/.flexai/config.yaml file.

Terminal window
flexai auth logout

Logging from an authenticated session:

Terminal window
flexai auth logout
You have been signed out.

Logging from an unauthenticated session:

Terminal window
flexai auth logout
You are not signed in.