> 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/sonarqube-cli/support/faq.md).

# Frequently asked questions

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

## Who is the CLI for?

The CLI is well suited for:

* Developers who work heavily in the terminal
* Teams adopting AI coding assistants
* Platform, DevSecOps, and engineering teams that want lightweight verification earlier in the workflow
* Organizations that already use SonarQube and want terminal-based access to analysis, issue lookup, and automation

## How is the SonarQube CLI different from the SonarScanner CLI?

They solve different problems. The SonarScanner CLI sends full project analysis to SonarQube from your CI/CD pipeline; it's a build step, not a developer tool. See the SonarScanner CLI docs for [SonarQube Server](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/sonarscanner/) or [SonarQube Cloud](/sonarqube-cloud/analyzing-source-code/scanners/sonarscanner-cli.md) for the complete details.

The SonarQube CLI is for local developer use: browsing issues, running secrets detection, configuring AI agent integrations, and getting context for remediation without leaving the terminal.

## Is it the same as a full SonarQube scan?

No. The CLI is designed for local agentic workflows and works on your current local changes, not your full project. For full project analysis, run the SonarScanner CLI in your CI/CD pipeline.

## Why use the CLI if you already use SonarQube for IDE?

They're complementary. SonarQube for IDE is best when you want feedback directly in the editor while you code, and for reviewing and committing changes from the IDE. The CLI is better suited to terminal workflows, scripts, Git hooks, and AI coding sessions.

## Do you need both MCP and the CLI?

Not necessarily. Use the CLI when you or your coding agents need to run SonarQube actions directly from the terminal. Use the [About the MCP Server](/sonarqube-mcp-server/about-the-mcp-server.md) when you want your AI coding assistant to access SonarQube (Server, Cloud) data as one of multiple tools in an agentic workflow.

## Is there feature parity between MCP and the CLI?

No. The CLI and MCP support related but different workflows, so don't treat them as one-to-one equivalents.

## How fast is it, and what's the impact on your machine?

The CLI is built to give you fast local feedback. Runtime depends on the size of your repository, the command you run, the scope of your local changes, and whether the workflow relies on SonarQube Cloud capabilities.

## What's the simplest way to get started?

Follow the [Quickstart guide](/sonarqube-cli/quickstart-guide.md). It's the fastest path to get up and running. In short:

1. Install the CLI with Homebrew, Mise, or the official install script (see the [quickstart guide](/sonarqube-cli/quickstart-guide.md)).
2. Authenticate with `sonar auth login`.
3. Confirm the connection with `sonar auth status`.
4. Run your first command, such as `sonar list projects`, `sonar analyze secrets`, or `sonar analyze --staged`.

## Can it run as a pre-commit or pre-push hook?

Yes. The CLI can install Git hooks so checks run before you commit or push:

* A pre-commit hook scans staged files and catches secrets as early as possible.
* A pre-push hook scans files in unpushed commits and runs one batched check before you push.

See [Git hooks](/sonarqube-cli/integrations/git-hooks.md).

## What telemetry does the CLI collect?

By default, the SonarQube CLI collects two kinds of data: anonymous usage telemetry and crash reports for unhandled exceptions. Telemetry covers which commands you run, whether they succeed, the CLI version, your operating system, and which SonarQube connection the command ran against. Crash reports scrub personal paths before they're sent.

It doesn't collect:

* Source code or file contents
* File paths or filenames
* Project names or keys (only server-side UUIDs)
* Command arguments, flag values, or output
* Token or credential values

To turn it off, run `sonar config telemetry --disabled`. For more detail, see [Telemetry and privacy](/sonarqube-cli/administration/telemetry-and-privacy.md).


---

# 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 dynamically by asking a question.

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

```
GET https://docs.sonarsource.com/sonarqube-cli/support/faq.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
