| Title: | Quick Project Initialization with Templates |
|---|---|
| Description: | Streamline project setup by initializing directory structures with pre-configured templates. Create Shiny applications, research projects, and tool comparison studies with organized folders and starter files. Stop recreating the same structure manually and start coding faster. |
| Authors: | Samuel Bharti [aut, cre] |
| Maintainer: | Samuel Bharti <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-07-14 08:52:23 UTC |
| Source: | https://github.com/samuelbharti/peacock |
Scaffolds a tidy directory layout for a data-analysis / research project: raw and processed data, analysis notebooks, reusable R functions, and outputs.
init_analysis(path = getwd(), confirm = TRUE)init_analysis(path = getwd(), confirm = TRUE)
path |
Path where the project is created. |
confirm |
Logical. If TRUE, prompts for confirmation before creating the project (interactive sessions only). |
Invisibly, the path the project was created in.
init_analysis(path = tempdir(), confirm = FALSE)init_analysis(path = tempdir(), confirm = FALSE)
A changelog markdown template to document project progress
init_changelog_md(path = getwd(), confirm = TRUE)init_changelog_md(path = getwd(), confirm = TRUE)
path |
Path where markdown file is created |
confirm |
Confirm path; logical input. |
Return markdown file in specified or current working directory
init_changelog_md(path = tempdir(), confirm = FALSE)init_changelog_md(path = tempdir(), confirm = FALSE)
Scaffolds a modern Python project (src layout) with a pyproject.toml
configured for ruff and pytest, a starter package and test, and agent
guidance. peacock stays an R package; this simply emits Python project files.
init_python(path = getwd(), confirm = TRUE)init_python(path = getwd(), confirm = TRUE)
path |
Path where the project is created. The project name is taken from the final path component; the importable module name is derived from it. |
confirm |
Logical. If TRUE, prompts for confirmation before creating the project (interactive sessions only). |
Invisibly, the path the project was created in.
init_python(path = file.path(tempdir(), "my_pkg"), confirm = FALSE)init_python(path = file.path(tempdir(), "my_pkg"), confirm = FALSE)
Scaffolds a starter Quarto project: a website, a book,
or a manuscript, with a _quarto.yml and starter documents.
init_quarto( path = getwd(), type = c("website", "book", "manuscript"), confirm = TRUE )init_quarto( path = getwd(), type = c("website", "book", "manuscript"), confirm = TRUE )
path |
Path where the project is created. |
type |
Project type: one of |
confirm |
Logical. If TRUE, prompts for confirmation before creating the project (interactive sessions only). |
Invisibly, the path the project was created in.
init_quarto(path = tempdir(), confirm = FALSE)init_quarto(path = tempdir(), confirm = FALSE)
Initialize Shiny Project using this function
init_shiny(path = getwd(), confirm = TRUE)init_shiny(path = getwd(), confirm = TRUE)
path |
Path where shiny project template is created |
confirm |
Logical. If TRUE, prompts user for confirmation before creating template. |
Return shiny project file and directory template in current working directory.
## Not run: init_shiny() ## End(Not run)## Not run: init_shiny() ## End(Not run)
Downloads a template repository from GitHub and unpacks it into path. The
template can be a built-in name (see peacock_templates()) or any GitHub
repository given as "owner/repo" or "owner/repo@ref".
init_template( template_name = "shiny", path = getwd(), ref = NULL, registry = NULL, confirm = TRUE )init_template( template_name = "shiny", path = getwd(), ref = NULL, registry = NULL, confirm = TRUE )
template_name |
A built-in template name (e.g. |
path |
Path where the project template will be created. |
ref |
Optional branch, tag, or commit to download. Overrides an |
registry |
Optional path to a custom registry file (DCF or YAML); see
|
confirm |
Logical. If TRUE, prompts for confirmation before creating the template (interactive sessions only). |
Invisibly, the path the template was created in.
## Not run: init_template("shiny") init_template("owner/repo@dev", path = tempdir()) ## End(Not run)## Not run: init_template("shiny") init_template("owner/repo@dev", path = tempdir()) ## End(Not run)
Returns the registry of curated templates that init_template() understands
by short name. You can also pass any GitHub "owner/repo" (optionally
"owner/repo@ref") to init_template() without it being in this registry.
peacock_templates(registry = NULL)peacock_templates(registry = NULL)
registry |
Optional path to a custom registry file. |
A data frame of available templates with columns Name, Repo, Ref,
and Description.
peacock_templates()peacock_templates()
Initialize a project directory structure for tool review
tool_review_template(tool_name, tool_url, path = getwd(), confirm = TRUE, ...)tool_review_template(tool_name, tool_url, path = getwd(), confirm = TRUE, ...)
tool_name |
A vector of tool names |
tool_url |
A vector of corresponding tool URLs |
path |
Path to initial project directory |
confirm |
User confirmation enable for setup |
... |
Additional arguments (currently unused) |
Return project structure in specified directory
## Not run: tool_review_template("abc","www.abc.com") ## End(Not run)## Not run: tool_review_template("abc","www.abc.com") ## End(Not run)