An R formatter. Written in Rust.
This package provides the air command-line tool as a Python package, making it easy to install via pip or uv.
Install a global installation of air with uv:
uv tool install air-formatteror with pip
pip install air-formatterThis puts air on the PATH, so you can run:
# Format R file
air format path/to/file.R
# Format all R files in a directory
air format path/to/directory/Alternatively, invoke air via uvx for one-off formatting without a global install:
uvx --from air-formatter air format path/to/file.RTo use a specific version of air:
# Global install
uv tool install air-formatter@0.8.2
# One off runs
uvx --from air-formatter@0.8.2 air format path/to/file.RAir is an opinionated R formatter built by Posit. For more information, see the main repository.