Add standalone installer instruction to docs (#12081)

Adopted from `uv` README
(https://github.com/astral-sh/uv#getting-started), this PR adds a
section of using standalone installers in the installation section of
Ruff docs.
This commit is contained in:
Dhruv Manilawala 2024-06-28 17:04:46 +05:30 committed by GitHub
parent 2b54fab02c
commit 0179ff97da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,6 +13,20 @@ ruff check # Lint all files in the current directory.
ruff format # Format all files in the current directory.
```
Starting with version `0.5.0`, Ruff can be installed with our standalone installers:
```shell
# On macOS and Linux.
curl -LsSf https://astral.sh/ruff/install.sh | sh
# On Windows.
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
# For a specific version.
curl -LsSf https://astral.sh/ruff/0.5.0/install.sh | sh
powershell -c "irm https://astral.sh/ruff/0.5.0/install.ps1 | iex"
```
For **macOS Homebrew** and **Linuxbrew** users, Ruff is also available as [`ruff`](https://formulae.brew.sh/formula/ruff)
on Homebrew: