@danjho/envy
v0.1.0
Published
CLI for managing third-party package versions across multi-repo projects
Downloads
9
Maintainers
Readme
envy
Environment and version management for multi-repo projects.
envy enforces consistent dependency versions across multiple projects by using a central repository as the source of truth. Instead of each team managing their own versions independently, everyone pulls from the same reference.
How it works
- A dependencies repository (git or local) defines the approved versions for all packages
- Each project has an
envy.config.yamlpointing to that repository envy checkcompares the project's installed versions against the central reference- Any mismatch or untracked package is flagged
Installation
npm install -g @danjho/envyGetting started
envy initRuns interactively and asks for:
- Repository type (git URL or local path)
- Branch or tag (for git repos)
- Technology (Node, Flutter, or auto-detect)
- Strict mode
Or use flags directly:
envy init --repo https://github.com/org/deps-repo --ref main
envy init --repo ../deps --technology node --strictThis creates an envy.config.yaml in the current directory:
version: 1
technology: node
strict: false
repository:
type: git
url: https://github.com/org/deps-repo
ref: mainCommands
envy check
Compares project dependencies against the central repository.
envy checkPackage Expected Installed Type Status
────────────────────────────────────────────────────────────────────────────
dartz 0.10.1 0.10.0 prod mismatch
get — ^4.7.3 prod untracked
get_it 9.2.1 9.2.1 prod ok
1 mismatch(es), 1 untracked found.| Status | Meaning |
|---|---|
| ok | Version matches the central repository |
| mismatch | Version differs from the central repository |
| untracked | Package is not present in the central repository |
With --json:
envy check --jsonStrict mode
When strict: true in the config, envy check exits with code 1 if any issues are found — useful for blocking CI pipelines.
envy add <package>
Installs a package using the version defined in the central repository.
envy add get_it
envy add mockito -Denvy update [package]
Updates packages to the versions defined in the central repository.
# Update all mismatches at once
envy update
# Update a specific package
envy update dartzenvy audit
Outputs a full JSON report of the dependency audit, including config and summary.
envy audit
envy audit > audit.json{
"timestamp": "2026-03-17T00:00:00.000Z",
"config": {
"technology": "node",
"strict": false,
"repository": {
"type": "git",
"url": "https://github.com/org/deps-repo",
"ref": "main"
}
},
"summary": {
"total": 3,
"ok": 1,
"mismatches": 1,
"untracked": 1
},
"dependencies": [...]
}Exits with code 1 if any mismatches or untracked packages are found.
Supported technologies
| Technology | Detection |
|---|---|
| Node | package.json |
| Flutter | pubspec.yaml |
CI/CD
Use envy check with strict: true to block pipelines on version drift:
# GitHub Actions example
- run: envy checkThe envy audit command is useful for generating reports as pipeline artifacts.
License
MIT
