btw: A Toolkit for Connecting R and Large Language Models

A complete toolkit for connecting 'R' environments with Large Language Models (LLMs). Provides utilities for describing 'R' objects, package documentation, and workspace state in plain text formats optimized for LLM consumption. Supports multiple workflows: interactive copy-paste to external chat interfaces, programmatic tool registration with 'ellmer' chat clients, batteries-included chat applications via 'shinychat', and exposure to external coding agents through the Model Context Protocol. Project configuration files enable stable, repeatable conversations with project-specific context and preferred LLM settings.

Package details

AuthorGarrick Aden-Buie [aut, cre] (ORCID: <https://orcid.org/0000-0002-7111-0077>), Simon Couch [aut] (ORCID: <https://orcid.org/0000-0001-5676-5107>), Joe Cheng [aut], Posit Software, PBC [cph, fnd], Google [cph] (Material Design Icons), Jamie Perkins [cph] (countUp.js author)
MaintainerGarrick Aden-Buie <garrick@adenbuie.com>
LicenseMIT + file LICENSE
Version1.0.0
URL https://github.com/posit-dev/btw https://posit-dev.github.io/btw/
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("btw")

Try the btw package in your browser

Any scripts or data that you put into this service are public.

btw documentation built on Nov. 5, 2025, 7:45 p.m.