Checks each installed hook for available updates and re-installs any that have a newer version on GitHub.
Arguments
- path
The hooks directory to update. Can be one of:
A known coding agent name such as
"claude_code","cursor", or"github_copilot"(seehook_path()for the full list) to use that agent's conventional project-scope path.A character string giving the directory path directly.
NULL(the default), in which case the path is resolved from theWF_AGENTenvironment variable, or by prompting in interactive sessions. SetWF_AGENTin your.Renviron(e.g. withusethis::edit_r_environ()) to avoid the prompt.
- settings
Path to the
settings.jsonfile where hooks are registered. WhenNULL(the default), defaults tosettings.jsonin the parent directory ofpath.
Examples
update_hooks(tempfile())
#> All hooks are up to date.
