Skip to contents

Turn any Shiny app — R or Python — into a standalone desktop application that runs on macOS, Windows, and Linux. No web server, no browser tab, no deployment infrastructure. Just an .app, .exe, or AppImage your users double-click to open.

[!IMPORTANT]

This package is currently in the prototype/experimental stage. It is not yet on CRAN and may have rough edges. Not recommended for production applications at this time.

Install

# install.packages("pak")
pak::pak("coatless-rpkg/shinyelectron")

Quick start

library(shinyelectron)

# Check your system
sitrep_shinyelectron()

# Try a bundled demo
export(
  appdir  = example_app("r-single"),
  destdir = "~/Desktop/my-first-app",
  run_after = TRUE
)

That’s the whole workflow: one call converts your app, wraps it in Electron, builds a distributable, and launches it. Takes about a minute for a small app.

What you can export

App Type Runs In User Needs Best For
r-shinylive Browser (WebR) Nothing Simple R apps
py-shinylive Browser (Pyodide) Nothing Simple Python apps
r-shiny R process R (or bundled) Full R package support
py-shiny Python process Python (or bundled) Full Python package support

Native types (r-shiny / py-shiny) support four runtime strategies for delivering R or Python to the end user: auto-download (default), bundled, system, or container. See the Runtime Strategies guide for the decision matrix.

[!NOTE]

Linux note for r-shiny: bundled and auto-download strategies rely on the portable-r project, which currently publishes builds for macOS and Windows only. On Linux, use system (the user has R installed) or container (Docker/Podman). Python apps work with all strategies on Linux via python-build-standalone.

Prerequisites

These are required on the build machine (where you run export()). End users of your packaged app need nothing pre-installed for shinylive types, and only R or Python for native types (unless you use the bundled runtime strategy, which ships the runtime inside the app).

  • R (>= 4.4.0)
  • Node.js (>= 22.0.0) — run install_nodejs() to install locally without admin rights
  • npm (>= 11.5.0) — included with Node.js

Platform build tools:

Platform Requirement
macOS Xcode Command Line Tools
Windows Visual Studio Build Tools
Linux build-essential (gcc, make)

[!TIP]

Run sitrep_shinyelectron() to verify your system is ready before your first export. It checks everything above and tells you what’s missing.

Learn more

Acknowledgements

Turning Shiny apps into desktop apps is a problem many people have attacked over the years. shinyelectron stands on the shoulders of prior packaging attempts, community tutorials, and the broader WebR / Pyodide / Electron ecosystems. The list below credits the specific projects whose approaches directly informed this one; we’re grateful to the much larger community of contributors experimenting in this space.

Prior packaging attempts

  • electricShine — R package that streamlines distributable Shiny Electron apps via its electrify() function; automates Windows builds.
  • Photon — RStudio add-in that leverages Electron to build standalone Shiny apps for macOS and Windows by cloning an R-specific electron-quick-start repository and including portable R versions.
  • RInno — standalone R application builder with Electron on Windows.
  • DesktopDeployR — alternative framework for deploying self-contained R-based applications with a portable R environment and private package library.

Talks, tutorials, and templates

Upstream projects

License

AGPL (>= 3)