Important
Devlink is a modernized, high-performance local package development orchestrator.
It provides a seamless workflow for using local packages in other projects without the constraints of npm link or yarn link.
This is a modernized fork of the original whitecolor/yalc package, renamed and maintained as @mayrlabs/devlink.
Get up and running in seconds.
# Install globally
npm i -g @mayrlabs/devlink
# Go to your package and publish
cd my-package
devlink publish
# Go to your project and add the package
cd my-project
devlink add my-packageWhen developing and authoring multiple packages (private or public), you often find yourself in need of testing the latest/WIP versions in other projects that you are working on in your local environment without publishing those packages to the remote registry. NPM and Yarn address this issue with a similar approach of symlinked packages (npm/yarn link). Though this may work in many cases, it often brings nasty constraints and problems with dependency resolution, symlink interoperability between file systems, etc.
Devlink now features a stunning interactive dashboard. Just run devlink without any arguments to enter a developer-friendly, guided experience.
devlinkTip
Use arrow keys to navigate, space to select options, and enter to confirm. It's smart enough to skip redundant prompts and guide you through complex flows.
Devlink uses fast-glob for lightning-fast file discovery. It respects your .gitignore and .npmignore files automatically—no extra configuration needed.
- Watch Mode:
devlink publish --watchautomatically republishes and pushes updates whenever you save a file. - Push Updates:
devlink publish --pushpropagates changes to all projects where the package is installed.
All your published packages are kept in a central store at ~/.mayrlabs/devlink. Use the devlink store command to browse, manage, and delete older versions.
- Pure Mode: Keeps your
package.jsonclean while still allowing you to use local packages. - Git Integration: Use
devlink git ignoreto automatically hide devlink files from your git history, ordevlink git showto make them visible.
| Command | Description |
|---|---|
devlink |
Launch the Interactive Dashboard |
devlink publish |
Publish current package to local store |
devlink add <pkg> |
Add a package from store to current project |
devlink update |
Update devlinked packages to latest local versions |
devlink update-all |
Shortcut to update all packages to latest |
devlink remove <pkg> |
Remove a devlinked package from the project |
devlink store |
Manage the local package repository |
devlink git <ignore|show> |
Manage .gitignore for devlink files |
- Private Packages: Devlink respects the
private: trueflag inpackage.jsonby default. - Signatures: Use
--sigto append a unique content hash to your version strings, preventing cache issues. - Scripts: Lifecycle scripts like
prepareandprepublishare executed unless--no-scriptsis passed.
- yarn probably shouldn't cache packages resolved with a file path
- "yarn knit": a better "yarn link"
- npm-link-shared
- yarn link does not install package dependencies
- [npm] RFC: file: specifier changes
MIT © Aghogho Meyorn