@mayrlabs/devlink
v0.0.3
Published
Work with npm/pnpm/yarn packages locally like a boss.
Readme
🛡️ Devlink
[!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 linkoryarn link.This is a modernized fork of the original whitecolor/yalc package, renamed and maintained as
@mayrlabs/devlink.
⚡ Quick Start
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-packageWhy
When 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.
🎮 Interactive Mode (NEW)
Devlink now features a stunning interactive dashboard. Just run devlink without any arguments to enter a developer-friendly, guided experience.
devlink[!TIP] 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.
📦 Core Features
🚀 High-Performance Publishing
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.
🏠 Local Package Store
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.
🛠️ Smart Installations
- 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 Reference
| 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 |
🔐 Security & Constraints
- 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.
Related links
- 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
⚖️ License
MIT © Aghogho Meyorn
