> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/how-to-guides/install-vortex-codex.md).

# Vortex for Codex

How to install Vortex for Codex using the SonarQube plugin or the SonarQube CLI.

You have two ways to install Vortex for Codex:

* Using the Codex SonarQube plugin
* Using the SonarQube CLI

Once installed, both options result in exactly the same thing, as the plugin installs the SonarQube CLI for you and automates the integration in the agent. We recommend that individual developers use the SonarQube plugin, and teams or organizations use the CLI directly for automated deployments.

## Installing Vortex for Codex using the SonarQube plugin

### Step 1: Install the SonarQube plugin for Codex

* From your shell, register the marketplace:

  ```bash
  codex plugin marketplace add SonarSource/sonarqube-agent-plugins
  ```
* Start a Codex session, run `/plugins`, search for `sonarqube`, and install it.

For more details, see [Codex CLI](/agent-centric-development-cycle/developer-tools/agent-plugins/codex-cli.md).

### Step 2: Run the integration skill

After installing the plugin, finish setup by running the guided integration skill:

```
$sonar-integrate
```

The skill installs or updates the SonarQube CLI, authenticates it, and runs `sonar integrate` to set up Vortex context and Vortex analysis. The integration is global: it applies across every project on your machine.

### Step 3: Restart your agent

If your agent is running, restart it to load the integration.

### Step 4: Verify your setup

[Verify the setup](/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/how-to-guides/check-vortex-setup.md): ask your agent *"What is the current architecture of the project? Limit the answer to the top-level blocks."*

## Installing Vortex for Codex using the SonarQube CLI

### Step 1: Install the SonarQube CLI

[Install the SonarQube CLI](broken://spaces/eHsJzr9cYhsTa0LTZlmo/pages/tN3g5dKl1aZPQndTkbRc) and [authenticate](broken://spaces/eHsJzr9cYhsTa0LTZlmo/pages/tN3g5dKl1aZPQndTkbRc#step-2-authenticate). These steps describe SonarQube CLI 1.11.0 or newer. Check your version with `sonar --version`. If it is older, see [Broken mention](broken://spaces/eHsJzr9cYhsTa0LTZlmo/pages/boaoYiGfUw2C0naEWklv) in the SonarQube CLI docs.

### Step 2: Run the integration command

Install the integration once, globally, so it applies across every project on your machine:

```bash
sonar integrate codex
```

The CLI shows the recommended components. When your connection has a Vortex subscription, they include Vortex context and Vortex analysis. Choose **Install recommended** to install them.

### Step 3: Restart your agent

If your agent is running, restart it so the integration is loaded.

### Step 4: Verify your setup

[Verify the setup](/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/how-to-guides/check-vortex-setup.md): ask your agent *"What is the current architecture of the project? Limit the answer to the top-level blocks."*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/agent-centric-development-cycle/inside-your-agent-the-agentic-loop/how-to-guides/install-vortex-codex.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
