sonarqube-cli

Command-line interface for SonarQube with AI agent integration. Scan for secrets and get fast feedback on code quality and security from your terminal.

What is sonarqube-cli?

Command-line interface for SonarQube with AI agent integration. Scan for secrets and get fast feedback on code quality and security from your terminal.

Overview of sonarqube-cli

What it is

Command-line interface for SonarQube with AI agent integration. Scan for secrets and get fast feedback on code quality and security from your terminal. It integrates enterprise-grade static analysis into development workflows.

Key features

  • Secret Detection — Scan code for hardcoded credentials and prevent secrets from being sent to LLM providers - Fast Feedback Loop — Get server-side issue detection on your local changes without waiting for CI/CD - AI-Assisted Fixes — Generate remediation suggestions for security vulnerabilities (SonarQube Cloud)
  • Agent Integration — Seamless hooks for Claude Code, GitHub Copilot CLI, Codex, Cursor, Antigravity, OpenCode, Devin, and Pi - Scriptable — Query and manage SonarQube issues programmatically with JSON output

Use cases

  • Agentic use: Built-in support for AI coding agents with safeguards that prevent secrets from being sent to LLM providers - Interactive CLI: Run commands directly in your terminal to scan code, check issues, and manage SonarQube projects manually - Scripting and automation: Integrate into scripts for reporting, dashboards, or automated quality gates - Git hooks: Pre-commit and pre-push hooks to scan staged or committed files - CI/CD pipelines: Use in automation with environment variable authentication

Getting started

Install via Homebrew (macOS/Linux): bash brew install sonarqube-cli Or use the install script (Linux/macOS): bash curl -o- https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.sh | bash Authenticate: bash sonar auth login List projects: bash sonar list projects For full quick start instructions, see the repository README.

License and pricing

Licensed under LGPL-3.0. Open source. SonarQube Cloud is free for open source projects and paid for private repositories. SonarQube Server is self-hosted.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/sonarsourcesonarqube-cli.svg)](https://yunodb.com/tools/sonarsourcesonarqube-cli?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/sonarsourcesonarqube-cli?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/sonarsourcesonarqube-cli.svg" alt="Featured on YunoDB" height="20"></a>