SonarQube CLI

Command line interface for SonarQube Server API.
Installation
npm install -g sonarqube-cli
- The
snr command should now be installed.
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.
SONAR_TOKEN | sonar.token | none |
SONAR_HOST_URL | sonar.host.url | --base-url |
| n/a | sonar.projectKey | --project |
| n/a | sonar.organization | --organization |
~$ snr help
Usage: snr [options] [command]
CLI for SonarQube Server & Cloud API
Options:
-V, --version output the version number
--base-url <url> SonarQube server base URL
-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
help [command] display help for command
Examples:
snr issue list --project my-project --severity HIGH
snr hotspot show AZjzzVD1Xsy7a47AllAl
snr project list --favorites --json
Development
yarn install
yarn dev
yarn build
yarn lint
yarn format
yarn typecheck
Contributing
- This project uses TS and commander.js
docs/refresh-docs.ts is used to refresh the API Specs.