Skip to main content

Log in using the CLI

Use the invariant login command to authenticate the Invariant CLI with your Invariant account.

Run the command in your terminal:

$ invariant login

This command prints a unique URL to your terminal.

Open this link in your browser to log in:
https://prod.invariant.tech/login?code=123456

Open this URL in your web browser and complete the sign-in process via the web interface.

After successful authentication in the browser, the CLI will display a confirmation message.

Logged in as your-email@example.com (tenant=your-organization-name).

Confirm that the tenant field matches your organization.

Your CLI session is now authenticated and can interact with the Invariant API. Authentication tokens are stored locally and will expire after a period of inactivity or 24 hours.

Never share the login code with anyone.