Monito CLI

Authentication

Authenticate the Monito CLI with your account.

Browser Login

The primary way to authenticate:

monito-cli auth login

This opens your browser for OAuth authentication (email/password, GitHub, or Google). After signing in, your token is stored in the local config file.

To authenticate against a custom host:

monito-cli auth login --host https://your-instance.example.com

Environment Variable

For CI/CD and AI agents, set the MONITO_TOKEN environment variable:

export MONITO_TOKEN="your-token"

The env var takes priority over the stored config token.

You can retrieve your token for scripting:

monito-cli auth token

This prints the raw token to stdout (no newline), making it easy to pipe:

export MONITO_TOKEN=$(monito-cli auth token)

Custom Host

To use a self-hosted Monito instance, set the host via environment variable:

export MONITO_HOST="https://your-instance.example.com"

Or set it in the config:

monito-cli config set host https://your-instance.example.com

Check Status

monito-cli auth status

Shows whether you're authenticated, the user email, and the current host. Supports --json for structured output.

Logout

monito-cli auth logout

Removes the stored token and user info from the local config file.

Config File

The config file is stored at ~/.config/monito/config.json (or $XDG_CONFIG_HOME/monito/config.json). File permissions are set to 0600 (owner read/write only).

To find the config file path:

monito-cli auth config-path

On this page