Skip to contents

Overview

crow is a loose collection of helpers for your shiny development. It is not a full-blown framework like golem, but a lightweight time- and line-saver.

It can help with:

  • 📦 modules
  • 🧪 testing
  • 📖 documentation
  • … and more

For example, module2app() shows a module in a full app, with the module’s input arguments, UI and return values:

The module2app() testbed for a counter module, clicked three times
The module2app() testbed for a counter module, clicked three times

Installation

# install.packages("pak")
pak::pak("dataheld/crow")

Notice that crow is a development-time dependency; your shiny app should not need it to work, and it thus might not need it in your DESCRIPTION.

If you use it for tests, you can include it as a Suggests.

If you don’t need it for tests, but want to otherwise record that you used it for development, consider an extra dependency:

Config/Needs/website: dataheld/crow

Coding agents

crow ships an Agent Plugin in its installed package directory. Its add-shiny-module skill teaches agents to build, test and document modules with crow. Install the plugin from there, for example in Copilot CLI:

copilot plugin install "$(Rscript -e 'cat(system.file(package = "crow"))')"

The plugin must match the installed crow version: reinstall it after you upgrade crow.

The plugin’s MCP server lets agents run a module of your package without crow’s displays for humans, set its inputs, read its arguments, return values, reactlog events and logs, and screenshot it (see ?crow_tools). It needs crow’s suggested packages mcptools, ellmer, callr, pkgload and shinytest2, and Chrome. The server runs R code that the agent writes, with your rights; only a sandbox around the agent isolates your system from that code. To serve crow’s tools together with btw’s, configure this server in your project instead:

Rscript -e 'mcptools::mcp_server(c(btw::btw_tools(c("docs", "pkg")), crow::crow_tools()), session_tools = FALSE)'