pupdate is a fast Go CLI that keeps project dependencies up to date when you
enter a repository. It detects dependency ecosystems in the current directory,
other depth-1 subdirectories, and direct children of packages/, runs the
matching package manager when work is needed, and skips unnecessary installs
when dependency files have not changed.
It is built for shell-hook usage on cd, so the common path stays low-latency,
safe by default, and easy to follow from concise stderr status output.
Detection uses a definition-backed signal registry with small local fallbacks
for Kasetto and Git submodules. Install command construction is backed by
github.com/git-pkgs/managers. pupdate preserves bounded traversal, local
state, and safe default behavior.
Homebrew:
brew install --cask aaronflorey/tap/pupdateGo toolchain:
go install github.com/aaronflorey/pupdate/cmd/pupdate@latestbin:
bin install github.com/aaronflorey/pupdateRequires bin to be installed and available on PATH.
- Documentation home:
docs/index.md - Contribution guide:
CONTRIBUTING.md - Code of conduct:
CODE_OF_CONDUCT.md - Security policy:
SECURITY.md
- Supported release platforms are Linux and macOS.
- Operating systems outside that support surface are best-effort only and are not shipped as release binaries.
- CI runs on pull requests and pushes to
mainacross Linux and macOS. release-pleasemaintains changelog and semver release PRs.- GoReleaser publishes tagged Linux/macOS release binaries and updates the Homebrew tap cask.
- Release notes are published on the GitHub Releases page.
Run manually in a project:
pupdate runInstall the shell hook for your current session:
eval "$(pupdate init --shell bash)"eval "$(pupdate init --shell zsh)"eval "$(pupdate init --shell fish)"Use explicit foreground mode when you want synchronous hook execution:
eval "$(pupdate init --shell bash --mode foreground)"Preview and persist the hook in your shell startup file:
pupdate init install --shell bash
pupdate init install --shell bash --applyUse pupdate init uninstall --shell bash to preview removal, then add --apply.
Escaped form for docs or templates that need literal shell interpolation text:
eval "\$(pupdate init --shell bash)"
eval "\$(pupdate init --shell zsh)"
eval "\$(pupdate init --shell fish)"The generated hooks run the resolved pupdate executable path with hook --quiet
on directory changes, but skip launching from $HOME. Quiet runs, manual or hook,
suppress routine status and child-command output while still reporting install
errors, so asynchronous updates do not overwrite the live shell prompt.
By default, pupdate init generates hooks that run hook --quiet --async
in the background using the current executable path. The detached worker,
manual runs, and resets use the same nonblocking repository advisory lock.
Runs and hook workers create .pupdate.hook.lock only after detecting a supported
project; empty and excluded folders do not get a lock file. Once created, it
remains in place; lock ownership, not file contents or age,
determines whether work is active.
Both .pupdate and .pupdate.hook.lock are generated local-machine state files.
Add them to your application repository's ignore file and do not commit them.
- detects supported dependency ecosystems from lockfiles and manifests
- resolves manager binaries from your current
PATH - skips work when dependency inputs are unchanged since the last successful run
- stores local state in
.pupdate - explains current detection, freshness, config, and PATH readiness with
pupdate status - respects
.pupignoreto skip the full run (detection, freshness checks, and installs) - uses safe defaults and requires explicit opt-in for lifecycle scripts or Python installs that can run install/build code
| Ecosystem | Detected By | Manager | Default Behavior |
|---|---|---|---|
| Node | bun.lock, bun.lockb |
bun |
bun install --frozen-lockfile --ignore-scripts |
| Node | package-lock.json, npm-shrinkwrap.json |
npm |
npm ci --ignore-scripts |
| Node | pnpm-lock.yaml |
pnpm |
pnpm install --frozen-lockfile --ignore-scripts |
| Node | yarn.lock |
Yarn Classic 1.x | yarn install --frozen-lockfile --ignore-scripts; Yarn Modern is detected but blocked |
| PHP | composer.lock |
composer |
composer install --no-interaction --prefer-dist --no-plugins --no-scripts |
| Python | uv.lock |
uv |
skipped by default; --allow-scripts opts into uv sync --frozen |
| Python | poetry.lock |
poetry |
skipped by default; --allow-scripts opts into poetry install --no-interaction --sync |
| Python | requirements.txt |
pip |
skipped by default; --allow-scripts opts into pip install -r requirements.txt --disable-pip-version-check --no-input |
| Kasetto | kasetto.lock, kasetto.yaml, kasetto.yml |
kst |
kst sync --project --config <local-config> |
| Go | go.mod |
go |
go mod download |
| Rust | cargo.lock |
cargo |
cargo fetch --locked |
| Git submodules | .gitmodules |
git |
git submodule update --init --recursive |
Manager binaries are resolved from the current process PATH, which keeps
pupdate compatible with tools like nvm, asdf, and mise.
Kasetto installs only run when a local kasetto.yaml or kasetto.yml is
detected. Lock-only Kasetto detections are skipped.
Detects supported ecosystems in the current directory and emits human-readable status lines on stderr. The command skips the user's home directory and can be restricted to top-level project directories inside configured roots.
Flags:
--quiet: suppress routine status output and child command output--allow-scripts: allow dependency manager lifecycle scripts where supported, and opt into Python installs that can execute install/build code--dry-run: show what would run without executing installs or saving state
Environment:
PUPDATE_SKIP_INSTALL=1: run detection only; installs and all.pupdatewrites are disabled
User config:
PUPDATE_CONFIG=/path/to/config.yaml: override the config file path for this invocation; relative paths resolve from the current working directory~/.config/pupdate/config.yamlroot_directories:with one or more paths (for example~/code): only run when the current working directory is a direct child of one of those roots;~expands to the user's home directoryworkspace_globs:with one or more repo-relative directory globs (for exampleapps/*orservices/*): opt in to scanning additional workspace directories that match those patternsfolder_blacklist:with one or more exact directory names (for exampleblahorvendor): skip traversing any matching directory name during detection, both in the default shallow scan and while expandingworkspace_globsquiet: true|false: set the defaultrunquiet mode without needing--quietin shell aliases or wrappersallow_scripts: true|false: set the default lifecycle-script policy forrun; explicit command flags still win- when missing,
pupdate runandpupdate configuse implicit defaults (root_directories: [],workspace_globs: [],folder_blacklist: []) without creating the config directory or writingconfig.yaml
A repository-local .pupdate.yaml is loaded automatically. It accepts only
workspace_globs and folder_blacklist. Normalized project values are appended
to user values with stable deduplication; blacklists are unioned, so a committed
project config cannot remove a user exclusion. Project workspace globs can
explicitly broaden traversal. Root restrictions, quiet mode, and script policy
remain user-only. Unknown keys and additional YAML documents are errors.
workspace_globs is optional and does not change the default traversal unless you
set it. Without any configured globs, pupdate still scans only the repository
root, other depth-1 subdirectories, and direct children of packages/.
Example config for a monorepo that keeps the shallow default scan but also checks common workspace folders:
workspace_globs:
- apps/*
- services/*Each glob is matched relative to the repository root, so the example above adds
directories like apps/web and services/api. Matches add those exact
workspace directories to the scan; pupdate does not continue scanning deeper
nested directories under each match unless another configured glob matches them.
folder_blacklist is also optional. Each entry must be an exact directory name,
not a path like foo/blah and not a glob like blah*. A blacklist entry such
as blah skips traversal into any directory named blah, so it excludes both
./blah from the default shallow scan and nested paths like ./foo/blah when a
configured workspace glob would otherwise reach them.
Example config for a monorepo that expands into workspaces but skips known directory names anywhere they appear during traversal:
workspace_globs:
- apps/*
- foo/*/*
folder_blacklist:
- blah
- vendorfolder_blacklist only skips matching subdirectories during traversal. It does
not disable the whole repository. .pupignore is broader: it short-circuits the
entire repo before detection, freshness checks, and installs.
Prints the shell hook snippet for bash, zsh, or fish.
Flags:
--shell <bash|zsh|fish>: choose the shell explicitly--mode <foreground|async>: choose synchronous foreground execution, or use the default async background hook that detaches update execution from the shell transition
pupdate init install and pupdate init uninstall manage one marked block in a
startup file. Both preview by default and require --apply to write. Default
targets are ~/.bashrc, $ZDOTDIR/.zshrc (or ~/.zshrc), and
$XDG_CONFIG_HOME/fish/config.fish (or ~/.config/fish/config.fish). Existing
symlinks are resolved before editing. The first applied change saves the
original as <target>.pupdate.bak; that backup is never overwritten or restored
automatically. Writes are atomic and preserve existing permissions.
Prints the resolved user config path and active config values. If the config file
is missing, it reports the missing path and the implicit default values without
creating config.yaml.
Output includes:
- whether the config file currently exists
- the configured
root_directoriesvalues from the file - the resolved
root_directoriesvalues after~expansion and path normalization - the configured and resolved
workspace_globsvalues - the configured and resolved
folder_blacklistvalues - the configured
quietandallow_scriptsvalues when set - project config path, existence, traversal values, and effective merged values
Deletes the .pupdate state file in the current directory. The next pupdate run
will treat all dependencies as stale and re-evaluate from scratch.
Prints a read-only diagnostic snapshot for the current directory so you can see
whether pupdate run would skip, wait, or be blocked before it actually tries
to execute anything.
Output includes:
- overall
run_statusandrun_reasonfor the current directory - config path, existence, and resolved
root_directories - configured and effective
quiet/allow_scriptsrun defaults - background hook lock path and whether a detached hook run is currently active
.pupdatepath, existence, and any state decode warnings- project and effective traversal configuration
- one section per detected target with matched files, freshness result,
last_success_at, install readiness, and resolved manager path
pupdate runscans the current directory, other depth-1 subdirectories, and direct children ofpackages/for known lockfiles and manifests. If you setworkspace_globs, it also scans matching repo-relative workspace directories such asapps/*orservices/*. If you setfolder_blacklist, any directory whose exact name matches an entry is skipped during both kinds of traversal.- It detects the matching ecosystem and package manager.
- It compares current file hashes against the local
.pupdatestate file using namespaced keys per ecosystem and directory. - If dependency inputs are unchanged since the last successful run, it skips work.
- If inputs changed, or if no successful state exists yet, it runs the manager's safe default command. Managers without a verified safe mode (currently the Python managers) are skipped unless you explicitly allow scripts.
- Independent targets continue after a manager failure. Successful results are
saved first, then manual
pupdate runreturns a stable aggregate error and a nonzero exit status if any manager failed.
For git submodules, pupdate also checks git submodule status --recursive so it
can react to submodule drift even when .gitmodules itself has not changed.
On unsupported operating systems, freshness checks may rehash unchanged lockfiles more often because the file-identity shortcut used to skip rehashing is only implemented on supported platforms.
Manual runs use stable, concise stderr prefixes:
pupdate: skip repo ($HOME)pupdate: skip repo (outside configured root_directories)pupdate: skip repo (.pupignore)pupdate: installs disabled via PUPDATE_SKIP_INSTALLpupdate: skip <target> (<reason>)pupdate: run <manager> <args> (in <subdir>)pupdate: done <manager> (in <subdir>)pupdate: error: dependency installs failed: <manager> install failed for <target>: <err>pupdate: error: operation canceled
Successful --quiet runs, manual or hook, are fully silent, including
successful updates. Failures still produce one final error. Repository-derived
control characters are rendered with quoted ASCII escapes so output cannot forge
terminal lines.
SIGINT and SIGTERM cancel the active manager, stop later targets, save earlier
successful outcomes, and release the repository lock. On Linux and macOS,
cancellation terminates the manager's process group so descendants do not keep
the lock alive.
These messages are meant to stay readable in interactive shells and easy to grep from shell history or logs.
- Safe and frozen install modes are used by default where supported.
- Composer plugins and scripts are disabled by default; other lifecycle scripts are disabled where supported.
- Python managers are skipped by default and only run when you explicitly pass
--allow-scripts. --allow-scriptsis required to opt into lifecycle scripts and Python installs that can execute install/build code..pupignoreshort-circuits the full run for a repository before detection and state checks.root_directoriescan restrict runs to top-level project directories under specific roots.- Hook-driven runs default to non-blocking async execution and avoid launching from
$HOME. - Manual runs, hook workers, and resets are serialized with a repository advisory lock held through process-tree termination and state persistence.
- Git submodule status failures are surfaced as stderr errors without crashing the command.
For local setup, build, test, lint, and release commands, see
docs/development.md.