% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shinylive-link.R
\name{shinylive_project}
\alias{shinylive_project}
\title{Create a Shinylive sharelink for multi-file projects}
\usage{
shinylive_project(
  input,
  engine,
  mode = "editor",
  header = TRUE,
  base_url = NULL
)
}
\arguments{
\item{input}{Input for multiple files. Can be:
\itemize{
\item Named list: \code{list("app.R" = code1, "utils.R" = code2)}
\item Vector of file paths: \code{c("app.R", "utils.R", "data.csv")}
}}

\item{engine}{Engine to use: "r" for R Shiny or "python" for Python Shiny}

\item{mode}{Shinylive display mode (default \code{"editor"}). \code{"editor"} shows an
editable code panel beside the running app; \code{"app"} shows only the running app.}

\item{header}{Logical, whether to show the Shinylive header bar. It applies only
when \code{mode = "app"} and is ignored in the default \code{"editor"} mode. Defaults to \code{TRUE}.}

\item{base_url}{Custom Shinylive base URL. If NULL (default), links point at https://shinylive.io.}
}
\value{
shinylive_project object containing the Shinylive URL and metadata
}
\description{
Creates Shinylive projects for either R or Python from named lists or
file path vectors.
}
\examples{
# Named list input
files <- list(
  "app.R" = "library(shiny)\nshinyApp(fluidPage(), function(i, o) {})",
  "utils.R" = "# Utility functions"
)
shinylive_project(files, engine = "r", mode = "editor")

# File paths input
project_dir <- tempfile()
dir.create(project_dir)
app <- file.path(project_dir, "app.R")
utils <- file.path(project_dir, "utils.R")
writeLines("library(shiny)", app)
writeLines("# utils", utils)
shinylive_project(c(app, utils), engine = "r")
}
\seealso{
\code{\link[=shinylive_r_link]{shinylive_r_link()}} and \code{\link[=shinylive_py_link]{shinylive_py_link()}} for single apps;
\code{\link[=decode_shinylive_link]{decode_shinylive_link()}} and \code{\link[=preview_shinylive_link]{preview_shinylive_link()}} to read a link back.
}
