sonar-install-cli
БесплатноБез исполняемых скриптовНе проверенInstalls sonarqube-cli when it is missing, or updates it to the latest version through the route it was installed with (install script, Homebrew or mise). Use…
от SonarSource★ 118 звёзд на GitHubОб этом скилле
SonarQube — Install or update the CLI
Make sure sonarqube-cli is installed and up to date, and report which of these happened: installed, up to date (or upgraded), not updated (the update failed but sonar still works; also return the manual upgrade command for its install route), or not installed (the user declined, the install failed, or the agent runs in a cloud or web environment).
Interaction rule: for every finite decision, always present predefined selector options (single-choice or multi-choice as appropriate) instead of asking for free-form text. If the user gives an invalid answer, re-show the same selector.
When another skill invoked this one, return to it with the result. Only not installed should stop the caller.
Instructions
Step 0 — Check the environment
If you run in a cloud or web environment, where the CLI cannot be installed on the user's machine, do not attempt an install. Report not installed and tell the user to set up SonarQube through the sonar-integrate skill, which connects cloud environments through hosted MCP. Otherwise, or if you are not sure where you run, go to Step 1.
Step 1 — Find the CLI
Run sonar --version (macOS/Linux) or sonar.exe --version (Windows) yourself; a zero exit code (version printed) means found. If found, also run which sonar (macOS/Linux) or (Get-Command sonar.exe).Source (Windows) to find the installation location, then go to Step 2. If not found, go to Step 3.
Step 2 — Update it
First determine how it was installed, because the upgrade path differs:
- Managed by a package or version manager (e.g. installed via Homebrew or mise — the binary lives under the manager's prefix rather than
~/.local/share/sonarqube-cli/bin): do not runsonar update, as it conflicts with the manager. Run the manager's upgrade command yourself instead (Homebrew:brew upgrade --cask sonarqube-cli; mise:mise upgrade aqua:SonarSource/sonarqube-cli). - Installed via the shell/PowerShell script, or unsure: run
sonar updateyourself and wait for it to finish.
If it succeeds: briefly tell the user the CLI is up to date (or was upgraded). The result is up to date.
If it fails: show the relevant output and suggest they run the upgrade manually in a terminal (e.g. offline or network issues), with the command for the route it was installed with: sonar update for the install script, brew upgrade --cask sonarqube-cli for Homebrew, mise upgrade aqua:SonarSource/sonarqube-cli for mise. Never suggest sonar update for a Homebrew or mise install: it refuses to update them. The result is not updated, as long as sonar remains usable.
Either way, re-run sonar --version (or sonar.exe --version) yourself. If it now fails, the upgrade left the CLI missing or broken: show the output and go to Step 3 to reinstall it.
Step 3 — Install it
Pick an install command from the table below, show it to the user, and ask for explicit confirmation before running it. Do not execute the command until the user confirms.
The shell/PowerShell script is the default and works everywhere. If the user already manages CLIs with Homebrew or mise, prefer that route so future upgrades stay managed by the tool — Step 2 then defers to the manager.
| Platform / method | Install command |
|---|---|
| macOS / Linux (script) | curl -o- https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.sh | bash |
| macOS / Linux (Homebrew) | brew install --cask sonarqube-cli |
| Any OS (mise) | mise use -g aqua:SonarSource/sonarqube-cli |
| Windows (PowerShell) | irm https://raw.githubusercontent.com/SonarSource/sonarqube-cli/refs/heads/master/user-scripts/install.ps1 | iex |
If the user confirms: run the command yourself. After it finishes, re-run the version check (sonar --version or sonar.exe --version) yourself. If it succeeds, the result is installed. If it fails, show the output; the result is not installed.
If the user declines: ask them to install sonarqube-cli manually and then re-invoke the skill they started from. The result is not installed.
Установить sonar-install-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(which:*)Bash(Get-Command:*)Bash(sonar:*)Bash(curl:*)Bash(irm:*)Bash(iex:*)Bash(brew:*)Bash(mise:*)FAQ
Что делает скилл sonar-install-cli?
Installs sonarqube-cli when it is missing, or updates it to the latest version through the route it was installed with (install script, Homebrew or mise). Use when the user asks to install or update the SonarQube CLI, when `sonar` is not found, when a `sonar` command is too old for what is needed, or when another skill needs the CLI.
Как установить скилл sonar-install-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sonar-install-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic