---
source: crates/arf-console/src/cli.rs
expression: help
---
A cross-platform R console written in Rust
Usage: arf [OPTIONS] [COMMAND]
Commands:
completions Generate shell completion scripts
config Configuration management
history History management
ipc Interact with a running arf session via IPC
headless Run R with IPC server only (no interactive REPL)
help Print this message or the help of the given subcommand(s)
Options:
-e, --eval <EVAL>
Evaluate R expression and exit
-f, --file <FILE>
[R] Take input from FILE
--reprex
Enable reprex mode (no prompt, output prefixed with #>)
Config: startup.mode.reprex
--auto-format
Enable auto-formatting of R code in reprex mode (requires Air CLI)
Config: startup.mode.autoformat
-c, --config <CONFIG>
Path to configuration file
--no-banner
Suppress the startup banner
Config: show_banner
--with-r-version <R_VERSION>
R version to use via rig (overrides r_source config)
Requires rig to be installed. Use "default" for rig's default, or specify a version like "4.5" or "release".
--r-home <R_HOME>
Explicit R_HOME path (overrides r_source config)
Use this to specify a specific R installation directory. Mutually exclusive with --with-r-version.
--vanilla
Start R in vanilla mode (no init files, no save/restore)
-q, --quiet
[R] Don't print R startup message
--no-save
[R] Don't save workspace at end of session (default)
--save
[R] Save workspace at end of session
--no-restore
[R] Don't restore previously saved objects (default)
--no-restore-data
[R] Don't restore previously saved objects
--restore-data
[R] Restore previously saved objects
--no-environ
[R] Don't read the site and user environment files
--no-site-file
[R] Don't read the site-wide Rprofile
--no-init-file
[R] Don't read the user's .Rprofile
--no-echo
[R] Don't echo input (no-op, arf controls its own echo)
--with-ipc
Enable IPC server for external tool access (AI agents, vscode-R, etc.)
Starts the IPC server alongside the interactive REPL, allowing external tools to call `arf ipc eval`, `arf ipc send`, etc. For headless (no REPL) usage, see `arf headless` instead.
--ipc-bind <IPC_BIND>
Bind IPC socket to a specific path instead of the default (requires --with-ipc)
Unix: filesystem path (e.g. /tmp/my-arf.sock) Windows: named pipe path (e.g. \\.\pipe\my-arf)
--ipc-pid-file <IPC_PID_FILE>
Write server PID to a file on startup (requires --with-ipc)
The file is removed when the REPL exits. Startup fails if the file cannot be written, so the editor is guaranteed to own the session or get an error — there is no silent fallback.
--history-dir <HISTORY_DIR>
Custom history directory (overrides default XDG location)
R history will be stored at `{dir}/r.db`, Shell at `{dir}/shell.db`.
Config: history.dir
[env: ARF_HISTORY_DIR=]
--no-history
Disable history (no history saved or loaded)
Config: history.disabled
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version