Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

Installation

Cargo

Install the Arity CLI from crates.io with Cargo:

cargo install arity

Homebrew

On macOS or Linux:

brew install jolars/tap/arity

npm

The arity-cli package bundles a prebuilt binary:

npm install -g arity-cli

PyPI

Install the binary as a Python tool:

uv tool install arity

Alternatively, use pipx install arity.

Arch Linux

Install the prebuilt arity-bin package with an AUR helper:

paru -S arity-bin

Nix

Arity is available as arity in Nixpkgs. For a shell with Arity available:

nix shell nixpkgs#arity

For a persistent NixOS installation, add pkgs.arity to environment.systemPackages.

mise and Aqua

mise can install Arity through its Aqua backend:

mise use aqua:jolars/arity

Commit the resulting mise.toml to share the selected version. With Aqua directly, run aqua init if the project has no aqua.yaml, then add and install Arity:

aqua g -i jolars/arity
aqua install

Commit aqua.yaml to share the selected version. Both tools use the jolars/arity registry entry.

Install Script

The installer selects the release for your platform and installs to a user-local directory. On macOS or Linux:

curl --proto '=https' --tlsv1.2 -sSf https://arity.cc/install | sh

On Windows, run this in PowerShell:

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://arity.cc/install.ps1 | iex"

Set ARITY_INSTALL_DIR to change the destination or ARITY_TAG to pin a release.

Prebuilt Binaries

Download an archive from the releases page and put the arity binary on your PATH.

Editor Extensions

The VS Code and Open VSX extension bundles the binary and starts the language server automatically. The Zed extension can download it or use an installed copy.

From Source

Clone the repository and build a release binary:

git clone https://github.com/jolars/arity
cd arity
cargo build --release

The binary is written to target/release/arity.

R Package (CRAN)

To use the formatter inside R, install the arity package:

install.packages("arity")

See the R package documentation for details and RStudio setup for use in the editor.

First Run

With the CLI installed, run these commands in a terminal.

Format a file in place:

arity format file.R

Check formatting without writing changes:

arity format --check file.R

Lint a file (or pipe from stdin):

arity lint file.R

Run the language server over stdio (for editor integration):

arity lsp

Continue with Formatting, Linting, or Configuration for day-to-day use. See Editor Setup for your editor, Integrations for automation, and the CLI Reference for all commands and options.