| hal_setup | R Documentation |
Interactive helper that picks the right backend for the host and walks through prerequisites. Two paths:
hal_setup(force = FALSE, quiet = FALSE, backend = NULL)
force |
Logical; re-run setup even if the backend is already ready. |
quiet |
Logical; suppress progress messages. |
backend |
Optional backend override ( |
Positron (recommended): installs the hal-bridge extension from the
VSIX bundled with hal, so hal talks to vscode.lm directly. No
Node.js, no Copilot CLI, no GitHub CLI, no download – the only
requirement is that you are signed in to GitHub Copilot inside
Positron itself (the account menu in the lower left).
Other hosts (RStudio, VS Code, command-line R): installs the
GitHub Copilot CLI (gh copilot extension preferred, npm
@github/copilot fallback).
Claude Code: verifies the claude CLI and points at the download
and one-time sign-in. hal does not install this one for you: Claude
Code's sign-in is an interactive browser flow, and installing it via
npm yields a shim whose output is unreliable when driven from R.
Detection is via POSITRON_VERSION. Pass backend = "copilot" to force
the Copilot CLI path inside Positron, or backend = "claude" to check the
Claude Code CLI instead.
Invisibly TRUE if the backend transport is available after
setup, FALSE otherwise.
hal_available(), hal_install_bridge(),
hal_bridge_status(), hal_models()
## Not run:
hal_setup() # auto: vscode in Positron, copilot elsewhere
hal_setup(backend = "copilot") # force the Copilot CLI path
hal_setup(backend = "claude") # check the Claude Code CLI
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.