1. CLI
  2. Log in to the CLI

CLI

Log in to the CLI

The OnlineOrNot CLI uses OAuth Authorization Code with PKCE. It opens your browser for login and stores short-lived access and refresh credentials in the existing CLI configuration directory. The terminal never asks for your password or social-provider credentials.

Log in

Run:

onlineornot login

This command authenticates only. To authenticate and create your first uptime check in one flow, run onlineornot setup instead.

Verify login

onlineornot whoami

If authenticated, you'll see:

You are logged in via OAuth as you@example.com.

If not authenticated:

You are not logged in.
Run `onlineornot login` to authenticate.

Log out

Revoke the CLI refresh token and remove stored credentials:

onlineornot logout

ONLINEORNOT_API_TOKEN remains supported for automation and takes precedence over stored OAuth credentials.