# Homepage

{% hint style="warning" %}
This product is in Beta stage and breaking changes may be released. The documentation here matches the release version listed in the table of contents.&#x20;
{% endhint %}

## SonarQube CLI vs. SonarScanner CLI

The SonarQube CLI is a command-line interface for interacting with Sonar products. It allows you to view SonarQube projects and issues, analyze files, scan for secrets, and configure AI agent integrations.

It's a distinct product from the *SonarScanner CLI*, a code analysis scanner for CI/CD pipelines invoked with the `sonar-scanner` command, available for [SonarQube Server](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/sonarscanner/) and [SonarQube Cloud](https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/ci-based-analysis/sonarscanner-cli/).

## What you can do with SonarQube CLI

SonarQube CLI includes features such as:

* Authentication: connect to SonarQube Cloud or SonarQube Server with a user token and reuse that connection across commands. See [Quickstart guide](/sonarqube-cli/quickstart-guide.md#step-2-authenticate-with-the-server).
* Integration: connect Claude Code and other tools so they can use SonarQube analysis features.
* Secrets scanning: scan files or standard input for credentials, API keys, and tokens before they reach a repository or an AI tool. See [Secrets scanning](/sonarqube-cli/using/secrets-scanning.md).
* Focused analysis: analyze a single file from the command line, with or without [Agentic Analysis](/sonarqube-cloud/analyzing-source-code/agentic-analysis.md) on SonarQube Cloud.
* Project and issue lookup: list projects and issues so you and your tools can discover existing SonarQube data from the terminal.
* API access: make authenticated API requests to SonarQube.

For a full reference of all commands, options, and examples, see the [Commands](/sonarqube-cli/using/commands.md) page.

## Prerequisites

* A SonarQube Cloud organization or SonarQube Server instance.
* A user token to authenticate.

{% hint style="warning" %}
*User tokens* are required when authenticating your SonarQube CLI with SonarQube Cloud or SonarQube Server. Note that the CLI will not function properly if *project tokens*, *global tokens*, or *scoped organization tokens* are used during the setup process.
{% endhint %}

## Get started

See the [Quickstart guide](/sonarqube-cli/quickstart-guide.md) to install the CLI, authenticate, and run your first command.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-cli/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
