Air Posit Software, PBC
winget install --id=Posit.Air -e
An R formatter and language server, written in Rust.
Air is a tool designed to format and analyze R code efficiently, providing developers with a robust language server and formatter.
Key Features:
- Code Formatting: Automatically formats R code according to style guides, ensuring consistent and readable output.
- Language Server Support: Offers syntax validation, auto-completion, and intelligent code suggestions for enhanced productivity.
- Cross-Platform Compatibility: Works seamlessly on macOS, Linux, and Windows.
- Integration with Editors: Supports popular code editors and IDEs, streamlining the development workflow.
Audience & Benefit:
Ideal for data scientists, R developers, and teams looking to maintain clean, consistent, and high-quality R codebases. Air helps improve code readability, reduce errors, and accelerate development by providing real-time feedback and automated formatting.
Air can be installed via winget for easy setup.
README
Air 
> [!NOTE] > Air is currently in beta. Expect breaking changes both in the API and in formatting results. We also recommend that you use a version control system like git so you can easily see the changes that Air makes.
An R formatter and language server, written in Rust.
Installation
Air is usable both as a command line tool and as a language server inside your favorite code editors. If you'd like to use Air within a code editor, we recommend reading our editors guide. If you'd just like to use Air from the command line, you can install Air using our standalone installers.
On macOS and Linux:
curl -LsSf https://github.com/posit-dev/air/releases/latest/download/air-installer.sh | sh
Or, if you're familiar with Homebrew, install the air formula with:
brew install air
On Windows:
powershell -ExecutionPolicy Bypass -c "irm https://github.com/posit-dev/air/releases/latest/download/air-installer.ps1 | iex"
For a specific version:
curl -LsSf https://github.com/posit-dev/air/releases/download/0.1.1/air-installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/posit-dev/air/releases/download/0.1.1/air-installer.ps1 | iex"
The installer scripts will automatically add Air to your PATH
. The very first time you install Air, you'll need to restart your shell for the PATH
modifications to be applied.
Acknowledgements and inspiration
First and foremost, Air would not exist without the preexisting work and dedication poured into styler. Created by Lorenz Walthert and Kirill Müller, styler proved that the R community does care about how their code is formatted, and had been the primary implementation of the tidyverse style guide for many years.
Additionally, Air draws inspiration from many non-R sources including rust-analyzer, prettier, biome, and ruff. These are all excellent tools that provide either formatters, language servers, or both, all of which have influenced design decisions in Air, produced libraries on which we depend, or wrote code that we included in the project.
We are particularly thankful to biome, as Air is built on top of their language agnostic tooling for both building a rowan syntax tree and implementing a formatter. Biome is an open source project maintained by community members, please consider sponsoring them.