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.

Version: 1.0.0
Depends: R (≥ 4.1.0)
Imports: cli, clipr, dplyr, ellmer (≥ 0.3.0), fs, jsonlite, lifecycle, mcptools, pkgsearch, rlang (≥ 1.1.0), rmarkdown, rstudioapi, S7, sessioninfo, skimr, tibble, utils, withr, xml2
Suggests: bslib (≥ 0.7.0), chromote, DBI, duckdb, gert, gh, htmltools, pandoc, shiny, shinychat (≥ 0.2.0), testthat (≥ 3.0.0), usethis
Published: 2025-11-04
DOI: 10.32614/CRAN.package.btw (may not be active yet)
Author: Garrick Aden-Buie ORCID iD [aut, cre], Simon Couch ORCID iD [aut], Joe Cheng [aut], Posit Software, PBC [cph, fnd], Google [cph] (Material Design Icons), Jamie Perkins [cph] (countUp.js author)
Maintainer: Garrick Aden-Buie <garrick at adenbuie.com>
BugReports: https://github.com/posit-dev/btw/issues
License: MIT + file LICENSE
URL: https://github.com/posit-dev/btw, https://posit-dev.github.io/btw/
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: btw results

Documentation:

Reference manual: btw.html , btw.pdf

Downloads:

Package source: btw_1.0.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): btw_1.0.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=btw to link to this page.