CLI Reference
A complete reference for the ai command.
ai # start an interactive session in the current repo
ai "<request>" # start a session with <request> as the first message
ai [options]
| Command | Description |
|---|
ai login | Sign in to TheGitAI — opens your browser to the website. |
ai login --no-browser | Sign in on a headless/remote machine by pasting a one-time code. |
ai whoami | Show the signed-in account. |
ai --usage | Show account usage percentage and reset times. |
ai logout | Sign out. |
| Command | Description |
|---|
ai --list-sessions | List saved sessions for this repo. |
ai --session <id|name> | Resume a saved session by id or name. |
Sessions are stored locally and scoped to the current repo. The five most
recent sessions per repo are kept.
| Option | Description |
|---|
-y, --yes | Start in Auto-Accept mode. |
-h, --help | Show help. |
Used inside an interactive session:
| Command | Description |
|---|
/help | Show help. |
/usage | Show account usage percentage and reset times. |
/model | List supported models and pick one. |
/model <id> | Switch the active model without clearing history. |
/memory | Show the session summary and decision memory. |
/resume | Resume a saved session for this repo. |
/clear | Clear the current conversation history. |
/exit | Quit the session. |
| Variable | Description |
|---|
THEGITAI_SESSION_DIR | Override the default local directory for saved sessions. |
💡Run ai --help at any time to print this reference in your terminal.