peacock sets up a ready-to-work project directory in one call: the layout, the config files, and the agent guidance. It scaffolds R projects, and also Quarto and Python ones, so the same habit works across a mixed stack.

From r-universe:
install.packages("peacock", repos = "https://samuelbharti.r-universe.dev")
Or the development version:
# install.packages("pak")
pak::pak("samuelbharti/peacock/pkg-r")
Creates a complete Shiny app with organized folders and starter files.
library(peacock)
# Set up a new Shiny project
init_shiny(path = "my_shiny_app")
This creates:
ui.R, server.R, global.R - Your main Shiny filesmodules/ - For modular Shiny componentsuserInterface/ - UI components organized separatelywww/ - Static files (CSS, images, JavaScript)data/, R/, dev/ - Standard project foldersDockerfile - Ready for containerization.gitignore and .Renviron - Project configurationSet confirm = FALSE to skip the confirmation prompt, which is what you want in a script.
Track project changes in a structured markdown file.
init_changelog_md(path = "my_project")
Creates a CHANGELOG.md file with a simple format for documenting your work.
Pull down complete project templates from GitHub. Use a built-in name, or any GitHub repository as "owner/repo" (optionally pinned with "owner/repo@ref").
# Built-in templates
init_template("shiny", path = "my_project")
init_template("cgds", path = "research_project")
# Any GitHub repo, optionally pinned to a branch, tag, or commit
init_template("owner/repo", path = "my_project")
init_template("owner/repo@dev", path = "my_project")
# See the built-in templates
peacock_templates()
The CGDS template is part of the UAB CGDS research workflow.
Organize projects that compare multiple tools or methods.
tool_review_template(
tool_name = c("tool1", "tool2", "tool3"),
tool_url = c("https://tool1.com", "https://tool2.com", "https://tool3.com"),
path = "tool_comparison"
)
This creates organized folders for data, scripts, outputs, and documentation for each tool.
Set up a tidy layout for a data-analysis or research project.
init_analysis(path = "my_study")
Creates data/{raw,processed}, R/, analysis/ (with a starter Quarto notebook), and output/{figures,tables}, plus a README and .gitignore.
Create a Quarto website, book, or manuscript.
init_quarto(path = "my_site", type = "website")
type can be "website" (default), "book", or "manuscript"; each gets a _quarto.yml and starter documents.
peacock stays an R package, but it can emit a Python project too.
init_python(path = "my_pkg")
Creates a src-layout package with pyproject.toml (ruff + pytest), a starter module and test, .gitignore, and AGENTS.md.
peacock’s project scaffolds all drop an AGENTS.md (plus a CLAUDE.md that imports it) describing how to run, build, and work in the project, so AI coding assistants are productive from the first commit.
Once installed, peacock adds an RStudio Add-in for quick access:
vignette("introduction")
MIT © Samuel Bharti