{"id":20665623,"url":"https://github.com/thinkr-open/ghooks","last_synced_at":"2025-10-30T20:47:01.028Z","repository":{"id":176188875,"uuid":"618586130","full_name":"ThinkR-open/ghooks","owner":"ThinkR-open","description":"'Golem' Hooks for Standard 'Shiny' Apps","archived":false,"fork":false,"pushed_at":"2024-08-16T14:12:12.000Z","size":24,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-30T00:12:38.273Z","etag":null,"topics":["golemverse","shiny","shiny-apps","shiny-r"],"latest_commit_sha":null,"homepage":"","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/ThinkR-open.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-24T19:52:00.000Z","updated_at":"2024-08-30T15:19:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"321ad8b5-fa41-4349-9e61-aa191ff25f25","html_url":"https://github.com/ThinkR-open/ghooks","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"9b1e9e0dae7b55301f941b9bc06b2d5358035120"},"previous_names":["thinkr-open/ghooks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ThinkR-open/ghooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fghooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fghooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fghooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fghooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThinkR-open","download_url":"https://codeload.github.com/ThinkR-open/ghooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThinkR-open%2Fghooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272733231,"owners_count":24984260,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golemverse","shiny","shiny-apps","shiny-r"],"created_at":"2024-11-16T19:32:48.112Z","updated_at":"2025-10-30T20:46:55.982Z","avatar_url":"https://github.com/ThinkR-open.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# ghooks\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/ThinkR-open/ghooks/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ThinkR-open/ghooks/actions/workflows/R-CMD-check.yaml)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n\u003c!-- badges: end --\u003e\n\nThe goal of `{ghooks}` is to provide `{ghooks}` hooks for standard `{shiny}` apps.\n\n## Installation\n\nYou can install the development version of `{ghooks}` like so:\n\n``` r\npak::pak(\"thinkr-open/ghooks\")\n```\n\n## About\n\nYou're reading the doc about version : `r pkgload::pkg_version()`\n\nThis README has been compiled on the\n\n```{r}\nSys.time()\n```\n\nHere are the test \u0026 coverage results :\n\n```{r}\ndevtools::check(quiet = TRUE)\n```\n\n```{r echo = FALSE}\nunloadNamespace(\"ghooks\")\n```\n\n```{r}\ncovr::package_coverage()\n```\n\n## `{golem}` hooks\n\n`{golem}` hooks are functions that are called by `{golem}` at specific moments of the app lifecycle.\nThey are used to add custom code to the app, notably when creating the app with `create_golem()`.\n\nYou can find more info about `{golem}` hooks on [`{golem}` documentation](https://thinkr-open.github.io/golem/articles/f_extending_golem.html).\n\nThe hooks can be called with `golem::create_golem(project_hook = )`, when creating a new golem project via the RStudio widget, as show on the screenshot in the [Extending `{golem}`](https://thinkr-open.github.io/golem/articles/f_extending_golem.html#defining-your-own-project_hook) Vignette.\n\nBelow is the list of curently available hooks:\n\n### `geyser_hook`\n\nThis hook is mainly intended at demoing the `{golem}` hooks system.\nIt adds the \"Old Faithful Geyser Data\" app to your golem project.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick here to see the content of `app_ui` and `app_server` from `geyser_hook`\u003c/summary\u003e\n\n```{r}\npth \u003c- tempfile(pattern = \"geyser\")\nold_wd \u003c- getwd()\nunlink(pth, recursive = TRUE)\ngolem::create_golem(\n  pth,\n  project_hook = ghooks::geyser_hook,\n  open = FALSE\n)\n```\n\n\n```{r}\ncat(\n  readLines(\n    file.path(pth, \"R\", \"app_ui.R\")\n  ),\n  sep = \"\\n\"\n)\n```\n\n```{r}\ncat(\n  readLines(\n    file.path(pth, \"R\", \"app_server.R\")\n  ),\n  sep = \"\\n\"\n)\n```\n\n\u003c/details\u003e\n\n## About\n\nYou're reading the doc about version : `r pkgload::pkg_version()`\n\nThis README has been compiled on:\n\n```{r}\nSys.time()\n```\n\nHere are the test \u0026 coverage results :\n\n```{r}\ndevtools::check(quiet = TRUE)\n```\n\n```{r echo = FALSE}\nunloadNamespace(\"ghooks\")\n```\n\n```{r}\ncovr::package_coverage()\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkr-open%2Fghooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkr-open%2Fghooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkr-open%2Fghooks/lists"}