Authentication

TheGitAI authenticates through the website. You sign in once, and your local session keeps you logged in.

Sign in

ai login

This opens your browser to the TheGitAI website, where you sign in or create an account. After you approve the device, your terminal is signed in automatically — the CLI never asks for or handles your password. You only need to do this once; the client just stores a local auth token on your machine.

Headless or remote machines

On a server or SSH session with no browser, use:

ai login --no-browser

It prints a URL you can open on any device and a one-time code to paste back into your terminal.

Check the signed-in account

ai whoami

Shows which account is currently signed in. Useful when you switch between accounts or hit a permission error.

View your usage

ai --usage

Shows your account usage percentage and when it resets.

Sign out

ai logout

Signs out the current account. Run ai login again to sign back in.

Stuck on the wrong account? Run ai logout, then ai login again to switch.