Authentication
TheGitAI authenticates through the website. Website and CLI login tokens expire after 24 hours without an authenticated request. Active use extends that rolling window.
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. The client stores a local auth token on your machine until you sign out, the token is revoked, or it expires after 24 hours of inactivity.
If authentication expires during any CLI request, TheGitAI saves the local
session, removes the invalid credential, and asks you to run ai login again.
You can then resume the saved session.
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. Use it when you hit a permission or saved-session error, or to confirm that you signed in with the intended account.
Each person may maintain only one personal TheGitAI account unless TheGitAI
approves an organisation, testing, or operator exception in writing. If you
accidentally created another account, contact support@thegit.ai rather than
continuing to use both.
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 to that
account, or to correct an accidental sign-in with the wrong credentials.
ai logout, then ai login with the
account you intended to use.