H
Hostess
CLI Commands

Authentication Commands

Log in, log out, and show the current Hostess account from the CLI.

Description

The auth commands manage the saved CLI session used by Hostess commands.

Commands

CommandDescription
hostess loginStart the email and OTP login flow
hostess logoutClear the saved CLI session
hostess whoamiShow the active authenticated user

Login

Terminal
hostess login

hostess login runs an interactive email and OTP flow in the terminal. After login, the CLI stores a token in ~/.hostess/config.json.

Logout

Terminal
hostess logout

Use hostess logout to clear the saved CLI session on the current machine.

Current User

Terminal
hostess whoami

Use hostess whoami to confirm which account the CLI is using.

CI Authentication

For scripts and CI/CD, prefer HOSTESS_TOKEN or a command-specific --token flag where the command provides one:

Terminal
export HOSTESS_TOKEN="pat_abc123..."
hostess deploy --env production --no-interactive