Now on CRAN: {livelink}. Hand it a string, a file path, or your clipboard and get back a URL that opens a live R session in the browser, code already loaded.
CRAN: https://cran.r-project.org/web/packages/livelink/
Release notes:
https://blog.thecoatlessprofessor.com/software-releases/r/livelink/livelink-v0.1.0-released/
livelink: Create Shareable Links for 'webR' and 'Shinylive' Environments
Creates shareable links for 'R' code in 'WebAssembly' (WASM) Read-Eval-Print Loop (REPL) environments like 'webR' <https://webr.r-wasm.org/> and for 'Shiny' applications using 'Shinylive' <https://shinylive.io/>. Supports single scripts, multi-file projects, exercise and solution pairs, and batch processing. Includes encoding, decoding, and previewing of links for both 'R' and 'Python' environments.