Command-line help for arity
Arity: a language server, formatter, and linter for R
Usage: arity [OPTIONS] <COMMAND>
Options
--config <PATH> : Path to an explicit arity.toml (skips discovery and ARITY_CONFIG)
--no-config : Ignore all config files, including ARITY_CONFIG, and use built-in defaults
--color <WHEN> : When to use color in output
Default value: `auto`
Possible values:
- `auto`: Colorize when writing to a terminal and `NO_COLOR` is unset (default)
- `always`: Always colorize
- `never`: Never colorize
-q, --quiet : Suppress informational output (errors are still shown); under format --check this drops the per-file diff, leaving the list of files that would be reformatted and the summary
-v, --verbose : Print extra informational output (e.g. per-command summaries)
arity parse
Parse and display the CST tree for debugging
Usage: arity parse [OPTIONS] [FILE]
Arguments
<FILE> : Input file. Pass - for stdin, also read when the path is omitted and stdin is not a terminal
Options
--stdin-filename <PATH> : Filename the stdin buffer stands for; .Rd selects Rd parsing. Without it, stdin is parsed as R
--quiet : Suppress CST output to stdout
--verify : Verify parser losslessness (input must equal CST text)
arity format
Format R files and package DESCRIPTIONs
Usage: arity format [OPTIONS] [PATH]...
Arguments
<PATH>... : Input file(s) or director(ies). Pass - for stdin, also read when paths are omitted and stdin is not a terminal
Options
--stdin-filename <PATH> : Filename the stdin buffer stands for; decides which grammar it is formatted as. Without it, stdin is formatted as R
--verify : Verify idempotence and R syntax/comment preservation (does not write files)
--check : Check formatting without writing changes; prints a diff for each file that would be reformatted and exits non-zero if any differ. Requires path arguments: there is no file on disk to report on when reading stdin
--line-width <N> : Override the configured line width
--indent-width <N> : Override the configured indent width
--exclude <PATTERN> : Additional gitignore-style exclude patterns (repeatable or comma-separated); augments the configured exclude/extend-exclude
--force-exclude : Apply exclude patterns to files named explicitly on the command line too (they are normally always processed); for runners like pre-commit that pass staged files as arguments
--no-cache : Disable the persistent already-formatted cache (read and write) for this run; only affects --check
arity lint
Lint .R files
Reads stdin when given -, or when paths are omitted and stdin is not a terminal. Exit codes: 0 = no findings, 1 = findings (or files blocked by parse errors), 2 = usage/IO error.
Usage: arity lint [OPTIONS] [PATH]...
Arguments
<PATH>... : Input file(s) or director(ies). Pass - for stdin, also read when paths are omitted and stdin is not a terminal
Options
--stdin-filename <PATH> : Filename to report for stdin input (for diagnostics)
--fix : Apply safe autofixes in place and report what remains
--unsafe-fixes : Also apply fixes that may change behavior (requires --fix)
--select <RULE_ID> : Base rule selection (overrides config select); repeatable or comma-separated
--extend-select <RULE_ID> : Additional rules to run alongside config or --select; repeatable or comma-separated
--ignore <RULE_ID> : Disable these rules (overrides config ignore); repeatable or comma-separated
--exclude <PATTERN> : Additional gitignore-style exclude patterns (repeatable or comma-separated); augments the configured exclude/extend-exclude
--force-exclude : Apply exclude patterns to files named explicitly on the command line too (they are normally always processed); for runners like pre-commit that pass staged files as arguments
--output <OUTPUT> : Output format
Default value: `pretty`
Possible values:
- `pretty`: Annotated multi-line snippets (default; matches jarl/rustc-style output)
- `concise`: One finding per line (`path:line:col: severity [rule] message`)
- `json`: JSON array of diagnostics, for editor integration
arity index
Build or refresh the installed-package introspection index
Usage: arity index [OPTIONS] [PATH]...
Arguments
<PATH>... : Project path(s) to scan for referenced packages (default: ".")
Options
--force : Re-harvest even when the installed version is already indexed
--no-help : Skip harvesting help (names only; faster)
--attach-probe : Probe what each meta-package attaches by running library() in a fresh R session (spawns R and executes package attach hooks; also enabled by setting ARITY_ATTACH_PROBE)
--cache-dir <DIR> : Override the cache directory
--quiet : Suppress per-package progress output
arity lsp
Run the language server over stdio
Usage: arity lsp
arity completions
Generate a shell completion script (write it to stdout)
Usage: arity completions <SHELL>
Arguments
<SHELL> : Shell to generate completions for
Possible values: `bash`, `elvish`, `fish`, `powershell`, `zsh`
arity init
Write a starter arity.toml to the current directory
Usage: arity init [OPTIONS]
Options
--force : Overwrite an existing arity.toml
