{"id":13858107,"url":"https://github.com/r-lib/usethis","last_synced_at":"2025-05-12T15:37:00.267Z","repository":{"id":12900592,"uuid":"73086801","full_name":"r-lib/usethis","owner":"r-lib","description":"Set up commonly used 📦 components","archived":false,"fork":false,"pushed_at":"2025-04-29T16:39:50.000Z","size":24881,"stargazers_count":874,"open_issues_count":85,"forks_count":286,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-03T02:08:59.024Z","etag":null,"topics":["github","package","r","rstats","setup"],"latest_commit_sha":null,"homepage":"https://usethis.r-lib.org/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r-lib.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-11-07T14:33:45.000Z","updated_at":"2025-04-29T17:12:15.000Z","dependencies_parsed_at":"2023-01-14T12:21:40.900Z","dependency_job_id":"1e9b64e7-2188-4c83-9fd6-dea0283aa338","html_url":"https://github.com/r-lib/usethis","commit_stats":{"total_commits":2711,"total_committers":169,"mean_commits":"16.041420118343197","dds":0.5931390630763556,"last_synced_commit":"83a6b5fedbfbb88a40b1b7b6b2e550d62f81b0d8"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fusethis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fusethis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fusethis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fusethis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-lib","download_url":"https://codeload.github.com/r-lib/usethis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766661,"owners_count":21960966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","package","r","rstats","setup"],"created_at":"2024-08-05T03:01:56.911Z","updated_at":"2025-05-12T15:37:00.252Z","avatar_url":"https://github.com/r-lib.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r}\n#| label: setup\n#| include: false\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# usethis \u003ca href=\"https://usethis.r-lib.org\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"138\" alt=\"usethis website\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/usethis/actions/workflows/R-CMD-check.yaml)\n[![CRAN status](https://www.r-pkg.org/badges/version/usethis)](https://CRAN.R-project.org/package=usethis)\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n[![Codecov test coverage](https://codecov.io/gh/r-lib/usethis/graph/badge.svg)](https://app.codecov.io/gh/r-lib/usethis)\n\u003c!-- badges: end --\u003e\n\nusethis is a workflow package: it automates repetitive tasks that arise during project setup and development, both for R packages and non-package projects.\n\n## Installation\n\nInstall the released version of usethis from CRAN:\n\n```{r}\n#| eval: false\ninstall.packages(\"usethis\")\n```\n\nOr install the development version from GitHub with:\n\n```{r}\n#| eval: false\n# install.packages(\"pak\")\npak::pak(\"r-lib/usethis\")\n```\n\n## Usage\n\nMost `use_*()` functions operate on the *active project*: literally, a directory on your computer. If you've just used usethis to create a new package or project, that will be the active project. Otherwise, usethis verifies that current working directory is or is below a valid project directory and that becomes the active project. Use `proj_get()` or `proj_sitrep()` to manually query the project and [read more in the docs](https://usethis.r-lib.org/reference/proj_utils.html).\n\nA few usethis functions have no strong connections to projects and will expect you to provide a path.\n\nusethis is quite chatty, explaining what it's doing and assigning you tasks. `✔` indicates something usethis has done for you. `☐` indicates that you'll need to do some work yourself.\n\nBelow is a quick look at how usethis can help to set up a package. But remember, many usethis functions are also applicable to analytical projects that are not packages.\n\n```{r}\n#| include: false\n# Reset possible options\noptions(usethis.description = list())\n```\n\n```{r}\nlibrary(usethis)\n\n# Create a new package -------------------------------------------------\npath \u003c- file.path(tempdir(), \"mypkg\")\ncreate_package(path)\n# only needed since this session isn't interactive\nproj_activate(path)\n\n# Modify the description ----------------------------------------------\nuse_mit_license(\"My Name\")\n\nuse_package(\"rmarkdown\", \"Suggests\")\n\n# Set up other files -------------------------------------------------\nuse_readme_md()\n\nuse_news_md()\n\nuse_test(\"my-test\")\n\nx \u003c- 1\ny \u003c- 2\nuse_data(x, y)\n\n# Use git ------------------------------------------------------------\nuse_git()\n```\n\n## Code of Conduct\n\nPlease note that the usethis project is released with a [Contributor Code of Conduct](https://usethis.r-lib.org/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","funding_links":[],"categories":["R","Table of Contents"],"sub_categories":["Development in R"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Fusethis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-lib%2Fusethis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Fusethis/lists"}