> 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/analysis/analysis.md).

# Overview

> **Note:** Some of these analysis features are in Beta. Check the individual feature page for its current status.

Find problems in your code from your terminal, no CI run required.

{% content-ref url="/pages/y3kkPJjdO2Qx7sxf4xy8" %}
[Secrets scanning](/sonarqube-cli/analysis/secrets-scanning.md)
{% endcontent-ref %}

{% content-ref url="/pages/rzivCQfZd92M5MWQDDS2" %}
[Analyzing local changes](/sonarqube-cli/analysis/analyzing-local-changes.md)
{% endcontent-ref %}

{% content-ref url="/pages/xP51h3pTW8HTFWApK2Ou" %}
[AI remediation](/sonarqube-cli/analysis/ai-remediation.md)
{% endcontent-ref %}

{% content-ref url="/pages/nfEJTUtrNasUBUoYTUjG" %}
[Software Composition Analysis (SCA)](/sonarqube-cli/analysis/sca.md)
{% endcontent-ref %}

## Pick the right command

| You want to…                                                            | Run                                       | Where                                                                                                               |
| ----------------------------------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| Catch hardcoded credentials before they leave your machine              | `sonar analyze secrets`                   | Anywhere: Cloud, Server, or offline.                                                                                |
| See what new issues your in-progress changes introduce                  | `sonar analyze` / `sonar analyze agentic` | SonarQube Cloud only (agentic portion). Secrets scanning runs on both SonarQube Cloud and SonarQube Server.         |
| Scan dependencies for vulnerabilities, malware, and prohibited licenses | `sonar analyze dependency-risks`          | SonarQube Cloud, or SonarQube Server 2026.4+. Requires Advanced Security with SCA enabled. Beta; subject to change. |
| Have an AI agent propose a fix for an existing issue                    | `sonar remediate`                         | SonarQube Cloud only.                                                                                               |

For the full set of options and exit codes, see [Commands reference](/sonarqube-cli/using-sonarqube-cli/commands.md) and [Exit codes](/sonarqube-cli/using-sonarqube-cli/exit-codes.md).

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Overview](/sonarqube-cli/integrations/integrations.md)
* [Output formats](/sonarqube-cli/using-sonarqube-cli/output-formats.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/analysis/analysis.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.
