Installation

This page installs the CLI, a command-line tool called ai. For the desktop app, see Install the Desktop App.

Install with npm

npm i -g @thegitai/cli

This installs the ai command globally so you can run it from inside any repository.

Verify the install

ai --help

You should see the usage summary. If ai isn't found, make sure your global npm bin directory is on your PATH.

TheGitAI works on the repo in your current working directory. cd into a project first, then run ai.

Staying up to date

ai checks on every start whether a newer release is published, and offers to install it for you. TheGitAI works best on the latest version, and an older CLI may not work optimally. You can skip the offer for that start, but it asks again next time - see CLI Reference.

Start the first session

Move into a real repository and launch the agent. There is no separate sign-in step: if you aren't signed in, ai shows the sign-in screen first and then starts the session.

cd your-project
ai

Then ask for the complete result, including the validation you want:

Trace the failing API test, fix the underlying bug, run the focused suite, and
review the final diff for regressions.

See Authentication for browser and headless sign-in, or What It Can Do for the complete capability guide.

Related: Authentication·Install·Troubleshooting