mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-01 17:32:25 +00:00
65 lines
1.7 KiB
Markdown
65 lines
1.7 KiB
Markdown
# Installing Ruff
|
|
|
|
Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI:
|
|
|
|
```shell
|
|
pip install ruff
|
|
```
|
|
|
|
Once installed, you can run Ruff from the command line:
|
|
|
|
```shell
|
|
ruff check . # Lint all files in the current directory.
|
|
ruff format . # Format all files in the current directory.
|
|
```
|
|
|
|
For **macOS Homebrew** and **Linuxbrew** users, Ruff is also available as [`ruff`](https://formulae.brew.sh/formula/ruff)
|
|
on Homebrew:
|
|
|
|
```shell
|
|
brew install ruff
|
|
```
|
|
|
|
For **Conda** users, Ruff is also available as [`ruff`](https://anaconda.org/conda-forge/ruff) on
|
|
`conda-forge`:
|
|
|
|
```shell
|
|
conda install -c conda-forge ruff
|
|
```
|
|
|
|
For **pkgx** users, Ruff is also available as [`ruff`](https://pkgx.dev/pkgs/github.com/charliermarsh/ruff/)
|
|
on the `pkgx` registry:
|
|
|
|
```shell
|
|
pkgx install ruff
|
|
```
|
|
|
|
For **Arch Linux** users, Ruff is also available as [`ruff`](https://archlinux.org/packages/extra/x86_64/ruff/)
|
|
on the official repositories:
|
|
|
|
```shell
|
|
pacman -S ruff
|
|
```
|
|
|
|
For **Alpine** users, Ruff is also available as [`ruff`](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/ruff)
|
|
on the testing repositories:
|
|
|
|
```shell
|
|
apk add ruff
|
|
```
|
|
|
|
For **openSUSE Tumbleweed** users, Ruff is also available in the distribution repository:
|
|
|
|
```shell
|
|
sudo zypper install python3-ruff
|
|
```
|
|
|
|
On **Docker**, it is published as `ghcr.io/astral-sh/ruff`, tagged for each release and `latest` for
|
|
the latest release.
|
|
|
|
```shell
|
|
docker run -v .:/io --rm ghcr.io/astral-sh/ruff check .
|
|
docker run -v .:/io --rm ghcr.io/astral-sh/ruff:0.1.3 check .
|
|
```
|
|
|
|
[](https://repology.org/project/ruff-python-linter/versions)
|