# Quickstart with the Air Context CLI

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/air/llms.txt).

In this quickstart, you install the Air Context CLI, connect it to your AI coding agents, index a project, and run your first semantic search.

For the other ways to use Air Context, see [Where you can use Air Context](air-context.html#where-to-use). If you're an organization admin and want to control which repositories are indexed, see [Air Context indexing](jetbrains-context.html).

## Prerequisites

You need a [JetBrains
AI subscription](https://www.jetbrains.com/help/ai/ai-service-license.html#subscription-plans) (AI Free, AI Pro, AI Ultimate, or AI Enterprise). Paid and complimentary IDE licenses include AI Free, except IntelliJ IDEA Community Edition and PyCharm Community Edition.

If your organization manages AI centrally through Air Governance, an administrator must first [enable AI for the organization](ai-settings.html#enable-ai) and [grant AI access](ai-access.html#grant-ai-access) before you can use Air Context.

You also need an internet connection, because Air Context computes the embeddings for your code on the Air Context server. The index itself is stored on the server or, by default for small repositories of users outside an organization, on your machine.

For more information, see [Security and data privacy](context-security-and-privacy.html).

Procedure: Set up the Air Context CLI

1. Install the CLI.

macOS or Linux:

```BASH
curl -fsSL https://download.jetbrains.com/jetbrains-context/install.sh | bash
```

Windows (PowerShell):

```POWERSHELL
irm https://download.jetbrains.com/jetbrains-context/install.ps1 | iex
```

2. Run `jbcontext login`.

If you're logged in to a JetBrains IDE or JetBrains Toolbox, the CLI can use that account. Otherwise, log in with your JetBrains Account in the browser.

3. Run `jbcontext setup-agent` and choose the agents you want to connect.

For each agent, the command installs the recommended bundle: usage instructions and, where the agent supports them, the `context-search` skill, the exploration subagent, and session hooks that keep the index up to date. For Claude Code, it also registers the Air Context MCP server. For more information, see [Agent integrations](context-agent-integrations.html).

> **Tip:**
> You can also install Air Context in your AI agent by pointing the agent to [jb.gg/context-install](https://jb.gg/context-install).

4. Run `jbcontext doctor` to verify the setup end to end.

The command checks the version, authentication, repository, index, and search. On a repository that hasn't been indexed yet, the search check fails with No index found for repository; the next step resolves it.

5. Run `jbcontext index` in the project directory.

You create the first index of a repository yourself. After that, the session hooks installed by `jbcontext setup-agent` keep the index up to date: each time a configured agent starts a session, only the content that has changed since the last indexing is processed.

6. Try a search from the terminal:

```BASH
jbcontext search "where do we validate authentication tokens"
```

To see a local dashboard of search, repository, and indexing activity, run `jbcontext stats`; add `--errors` to include recent error messages.

## Next steps

* [Indexing and search](context-indexing.html) explains what gets indexed and when, and how agents and you query the index.

* [Security and data privacy](context-security-and-privacy.html) covers what data is stored and where.

* [CLI reference](context-cli-reference.html) lists the commands and their options.

* [Troubleshooting and FAQ](context-troubleshooting.html) helps if `jbcontext doctor` reports a failure or the agent keeps using its own file search.

