Socket
Book a DemoInstallSign in
Socket

sonarqube-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sonarqube-cli

A command-line API client for SonarQube Server and Cloud

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

SonarQube CLI

Quality Gate Status Bugs Code Smells Duplicated Lines (%)

Command line interface for SonarQube Server and SonarQube Cloud.

Installation

  • npm install -g sonarqube-cli
  • The snr command should now be installed.
List issuesShow Issue DetailsShow hotspot details
list issuesshow issue detailsshow hotspot details

Configuration and Usage

snr can be configured according to the table below.

  • command-line args are highest priority
  • next, if there's a sonar-project.properties somewhere up your working directory tree, it will be used.
  • env variables are checked last.
Env Variablesonar-project.propertiesCommand Line
SONAR_TOKENsonar.tokennone
SONAR_HOST_URLsonar.host.url--base-url
n/asonar.projectKey--project
n/asonar.organization--organization

Useful features

CLI for SonarQube Server & Cloud API

Options:
  -V, --version     output the version number
  --base-url <url>  SonarQube server base URL
  --dry-run         Show what would be done, without making any changes
  -h, --help        display help for command

Commands:
  issue             Search and review issues
  hotspot           Search and review security hotspots
  project           Show SonarQube projects
  status            Check system status
  risk              Search and review dependency risks
  help [command]    display help for command

Examples:
  snr issue list --project my-project --severity HIGH
  snr hotspot show AZjzzVD1Xsy7a47AllAl
  snr project list --favorites
  snr risk list --project my-project --severity HIGH CRITICAL
  • 💻 use the --json flag to output JSON
  • 📡 use --dry-run to output a CURL command instead of sending a real request.
  • 🤖 use --fix (where supported) to pass issue details to a local AI tool like Claude Code.

Development

yarn install
yarn dev          # Run CLI in development
yarn build        # Build for production
yarn lint         # Lint code
yarn format       # Format code
yarn typecheck    # Type check
yarn validate     # Run everything

Contributing and Feature Requests

Contributions are welcome. Please log an issue if you'd like to request support for a particular API.

Keywords

SonarQube

FAQs

Package last updated on 12 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts