Developer
Quickstart guide
Install the SonarQube CLI, authenticate with SonarQube Cloud or SonarQube Server, and run your first three commands.
Step 1: Install the CLI
curl -o- https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.sh | bashirm https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.ps1 | iexVerify the install
sonar --versionStep 2: Authenticate
Interactive login
Specify an organization (SonarQube Cloud only)
Non-interactive authentication
Verify your connection
Step 3: Run your first three commands
List your projects
Scan a file for secrets
Analyze your local changes (SonarQube Cloud only)
What's next
Troubleshooting
Command not found after install
Browser login doesn't return to the terminal
"Invalid token" or "Authentication failed"
Last updated
Was this helpful?

