
One configuration for every dependency manager.
Codependence checks and updates dependency versions using one-to-many project policies with support for Node, Python, Go, Rust, Docker, GitHub Actions, and Helm.
This means you control how you update and why you update dependencies. Versus other tools, Codependence caters to a project's context vs a dependency's context.
Install the CLI
Install with npm if you have Node.js 24 or newer.
npm install --global --ignore-scripts codependence
On macOS or Linux, you can also install from the project's Homebrew tap.
brew install yowainwright/tap/codependence
Main Use Case
Pin lodash and update the rest
Suppose your app needs lodash 4.17.21. Declare that exact version in package.json. Put this config beside it to keep lodash there while updating the other packages and Docker base images to their latest eligible versions.
{
"config": {
"app": {
"path": "package.json",
"manager": "pnpm",
"mode": "precise",
"codependencies": ["lodash"]
},
"image": {
"path": "Dockerfile",
"manager": "docker",
"mode": "precise"
}
}
}
- Hold back lodash — In precise mode this list names the exceptions. Lodash keeps its declared version.
- Update base images — There are no exceptions for this Dockerfile. Codependence looks up the latest compatible image tags.
Preview the change
From the project root, preview both updates.
codependence --update --dryRun
For example, if React resolves to 19.1.0 and Alpine to 3.20, the diff includes both updates. Lodash stays at 4.17.21.
--- a/package.json
+++ b/package.json
@@ -4,2 +4,2 @@
"lodash": "4.17.21",
- "react": "19.0.0"
+ "react": "19.1.0"
--- a/Dockerfile
+++ b/Dockerfile
@@ -1 +1 @@
-FROM alpine:3.19
+FROM alpine:3.20
- Pinned package — Lodash appears as context in the diff. Its version stays at 4.17.21.
- React update — React is outside the exception list, so its version updates.
- Alpine tag — The same run updates the Docker base image.
Open one pull request
Save this workflow and configure the repository token. It runs on Mondays at 09:00 UTC. You can also start it manually from GitHub Actions.
name: Update dependencies
on:
schedule:
- cron: "0 9 * * 1"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: yowainwright/codependence@add92453b85ffafb511988545fc153ba25b04792 # v1.1.1
with:
targets: |
pnpm
docker
version: pnpm=11.21.0
pull-request: true
token: ${{ secrets.CODEPENDENCE_TOKEN }}
post-update-command: pnpm install
- Both targets — This job runs pnpm and Docker together using the same .codependencerc.
- One pull request — When either target changes, the action opens or refreshes one PR for the pair.
Apply it locally
codependence --update
pnpm install
The first command edits package.json and Dockerfile. The second installs the packages and refreshes pnpm-lock.yaml.
See how to check two manifests or save a JSON report.