---
title: Installation
description: Install the TheGitAI AI coding assistant with npm, sign in, open a repository, and hand it a real task. Works on macOS, Linux, and Windows.
---

# Installation

TheGitAI ships as a single command-line tool called `ai`.

## Install with npm

```bash
npm i -g @thegitai/cli
```

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

## Verify the install

```bash
ai --help
```

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

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

## 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.

```bash
cd your-project
ai
```

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

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

See [Authentication](/docs/getting-started/authentication) for browser and
headless sign-in, or [What It Can Do](/docs/core-features/what-it-can-do) for the
complete capability guide.
