btw 1.3.0
New features
Added three new
btw skillsCLI commands for discovering and fetching skills without entering R:btw skills list <source>lists available skills from a package or GitHub repository (with--jsonoutput support);btw skills get <source> [names...]fetches one or more skills by name, or lists them when no names are given (use--allto fetch all);btw skills resource <source> <name> <paths...>fetches individual resource files bundled with a skill. When the source is a GitHub repository, local path information is omitted from the output since the temporary download directory is removed whenbtwexits. (#199)btw_app()gains amodel_choicesparameter for switching between AI providers and models from the status bar. Set to"auto"(default) to show namedbtw.mdclient configs when two or more are present,"btw_md"to always usebtw.mdconfigs,"provider"to browse the active provider’s model list, or"none"to hide the selector. When switching providers, the chat history, system prompt, and tools are carried over to the new client (#196).The
btw_tool_skilltool now supports custom skill search directories via thebtw.skills.pathsR option orBTW_SKILLS_PATHSenvironment variable. When set, the value entirely replaces all user-level and project-level skill directories; package-bundled skills are always preserved. Multiple paths can be provided as a character vector (R option) or OS-native path-separated string (env var). Values are captured at tool-registration time, so custom directories set inbtw.mdsurvive afterbtw_client()returns (#193).Added
btw_tool_files_patch(), a new files tool that applies a structured diff-style patch envelope to make coordinated changes across multiple files in a single call. One patch can add, update, delete, and rename files atomically: all operations are validated before any file is written, so a partial failure leaves the working tree untouched (#190).The
btw infoCLI command group has been replaced by three focused top-level commands:btw system-info(platform and R session info),btw check-installed <pkgs>(check if packages are installed, exits 0 by default with--failfor non-zero exit on missing packages), andbtw installed-packages <pkgs>(show installed package versions).btw infois retained as a deprecated stub that prints migration guidance. All three commands support--jsonoutput with documented field shapes (#195).Added two new commands to the
btwCLI:btw appto launch abtw_app()session in the current working directory andbtw skills installto install skills from the terminal.btw skills install .installs skills from all project dependencies. In packages (directories with aDESCRIPTIONfile),ImportsandSuggestsare scanned; otherwiserenv::dependencies()is used as a fallback. The same behaviour is available in R viabtw_skill_install_project().Added
btw docs topics <pkg>to thebtwCLI for discovering a package’s help topics and vignettes. Use--only helpor--only vignettesto limit output to one section, or--jsonfor machine-readable output (#195).Added
btw helpto thebtwCLI, which prints ther-btw-cliskill — a usage guide designed for AI agents.
Bug fixes
btw_app()is now compatible with and requires shinychat v0.4.0. Per-block copy buttons and IDE action buttons (insert at cursor, insert in new file, run in console) are restored for R output blocks in the new React-based shinychat (#188).btw_tool_agent_subagent()now correctly uses the options from yourbtw.mdfile when called directly rather than throughbtw_client()orbtw_app()(#185).
btw 1.2.1
CRAN release: 2026-03-23
Bug fixes
User-level config locations are now consistent across skills, agents, and
btw.mddiscovery. Skills installed with btw v1.2.0 are still discovered for backwards compatibility (#182).The
btwCLI now loadsdatasets,utils,stats, andmethodsby declaring them in the Rapp#| launcher:frontmatter, reducing surprises for users who expect standard R packages to be available (#181).
btw 1.2.0
CRAN release: 2026-03-16
Breaking changes
-
Several tool groups and tool names have been renamed for clarity (#159):
The old names and group aliases continue to work but emit deprecation warnings. The
btw.files_code_search.extensionsandbtw.files_code_search.exclusionsoptions have also been renamed tobtw.files_search.extensionsandbtw.files_search.exclusions, with the old option names emitting deprecation warnings.
New features
New
btwCLI provides command-line access to btw’s tool groups — docs, pkg, info, and cran — powered by Rapp. Install withinstall_btw_cli()and run commands likebtw docs help dplyr::mutateorbtw cran search "tidyverse". Output is designed for humans and LLMs: colored and formatted for terminals, plain markdown when piped, with a--jsonflag to return pipable JSON in select commands (#176).-
btw.mdnow supports configuring multiple client options. Whenbtw_client()is called interactively, you’ll be presented with a menu to choose which client to use. Clients can be specified as an array:client: - anthropic/claude-sonnet-4 - openai/gpt-4.1 - aws_bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0Or as named aliases:
client: haiku: aws_bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0 sonnet: anthropic/claude-sonnet-4 chatgpt: openai/gpt-5.2With aliases, you can select a client by name in the interactive menu or pass the alias directly via
btw_client(client = "alias"). In non-interactive contexts, the first client is used automatically (#153). btw_agent_tool()allows you to create specialized custom subagents frombtw.mdstyle markdown files. Agent files are automatically discovered from.btw/agent-*.md(project and user directories) and.claude/agents/(for Claude Code compatibility), and are registered as callable tools inbtw_tools(). Custom agents can specify their own system prompts, icons, models, and available tools (#149).btw_task()runs pre-formatted LLM tasks defined in markdown files with YAML frontmatter. Task files support template variable interpolation via{{ variable }}syntax, optional client and tool configuration, and all four execution modes ("app","console","client","tool"). Task files can also specifytitle,icon,description, andnamefields in their YAML frontmatter to customize the tool definition when used in"tool"mode (#169).btw_tool_agent_subagent()enables hierarchical agent workflows by allowing an orchestrating LLM to delegate tasks to subagents. Each subagent runs in its own isolated chat session with restricted tool access and maintains conversation state that can be resumed viasession_id. This allows you to delegate tasks to smaller cheaper models or reduce context bloat in the main conversation (#149).btw_tool_files_edit()makes targeted, validated line-based edits to files usingreplace,insert_after, andreplace_rangeactions. Edits are anchored to content hashes, so stale edits are rejected if the file has changed. To support this,btw_tool_files_read()now annotates each line with a short hash (e.g.2:f1a| return("world")) when called as a tool (#167).btw_tool_files_replace()finds and replaces exact string occurrences in a file. By default it requires the string to appear exactly once to prevent unintended changes; setreplace_all = TRUEto replace all occurrences (#167).btw_tool_pkg_load_all()runspkgload::load_all()in an isolated subprocess to verify package code loads correctly and trigger recompilation of compiled code. Useful for quick validation during development without running full tests or affecting the current R session (#156).btw_tool_skill()adds support for Agent Skills. Skills are modular, on-demand capabilities that provide specialized instructions, bundled scripts, reference docs, and asset templates to the LLM. Skills are discovered automatically from the btw package, attached R packages withinst/skills/directories, user-level skills, and project-level skills in.btw/skills/or.agents/skills/. When the skill tool is included in the chat client, available skills are listed in the system prompt. Usebtw_skill_install_github()orbtw_skill_install_package()to install skills from external sources, andbtw_task_create_skill()to interactively create new skills (#145).
Bug fixes
btw_app()no longer errors with “argument is of length zero” when run outside of an IDE (thanks @HenrikBengtsson, #168).btw_app()no longer errors when provider built-in tools (e.g.claude_tool_web_search()) are registered with a btw client. Built-in tools now appear in the app sidebar under a “Built-in” group (#175).btw_tool_files_read()now correctly handles UTF-8 files containing CJK (Chinese, Japanese, Korean) characters. Previously, the text-file detection could truncate a read buffer mid-way through a multi-byte character, causing the file to be rejected as binary (thanks @bianchenhao, #170).btw_tool_files_read()now correctly reads valid UTF-8 files containing non-ASCII characters (e.g., Cyrillic). Previously, these files were incorrectly rejected on Windows with non-English locales whenEncoding()returned “unknown” even though they were valid UTF-8 (thanks @RKonstantinR, #160).
btw 1.1.0
CRAN release: 2025-12-22
btw_client()now supports readingCLAUDE.mdfiles as project context files.CLAUDE.mdfiles are searched afterAGENTS.mdbut before user-levelbtw.md. YAML frontmatter inCLAUDE.mdfiles is stripped but not used for configuration (#146).btw_app()now shows a rich diff view in thebtw_tool_files_write_text_file()tool, if the diffviewer package is installed (#144).btw_app()now correctly displays input tokens with ellmer v0.4.0. Previously, we were showing the total input tokens sent across all API calls, rather than the current number of input tokens as of the last API call. We now show the size of the input context window (i.e. the number of input tokens that will be used for the conversation history in the next API call). Note that token usage is dependent on the provider and model used and is only an estimate.New “pkg” tool group with package development tools:
btw_tool_pkg_document(),btw_tool_pkg_check(),btw_tool_pkg_test()andbtw_tool_pkg_coverage()provide LLMs with the ability to document, check, test, and check test coverage of R packages during development (#133, #136).New
btw_tool_run_r()tool allows LLMs to run R code and to see the output, including of plots. Because this tool lets LLMs run R arbitrary R code in the global environment (which can be great but can also have security implications), it is opt-in and disabled by default. See?btw_tool_run_rfor more details (#126).btw_tool_docs_help_page()now uses markdown headings and sections for argument descriptions, rather than a table. This is considerably more token efficient when the argument descriptions have more than one paragraph and can’t be converted into a markdown table (@jeanchristophe13v, #123).btw now removes large inline base64-encoded images, replacing them with a placeholder containing the image’s alt text (@jeanchristophe13v, #119).
btw_app()now shows more precise cost estimates when the cost is less than $0.10 (#121).
