pkglink add https://github.com/yourname/lodash-fixed.git#fix-bug --name lodash Pkglinks remembers the commit hash, so your lockfile stays deterministic. On a plane with no internet? Pkglinks allow you to pre-fetch and link local caches. Your pkglinks.lock file ensures all dependencies resolve to local paths or a local registry mirror. How to Implement Pkglinks in Your Project (Step-by-Step) Let's assume you are using a generic CLI tool pkg (hypothetical, but representative of emerging tools like pnpm 's workspace protocol or yarn 's portal: ). Step 1: Initialize Pkglinks pkglinks init Creates .pkglinks/ directory and a pkglinks.json manifest. Step 2: Add a Local Package pkglinks add ./my-shared-lib --name shared-lib --version local Step 3: Verify the Link pkglinks list Output:
pkglinks unlink shared-lib pkglinks add shared-lib@^1.0 --from-registry npm | Feature | npm/yarn symlink | Git submodule | Monorepo | Pkglinks | |--------|----------------|---------------|----------|----------------| | Cross-project dev | ✅ (via npm link ) | ❌ | ✅ | ✅ | | Version awareness | ❌ | ✅ | ❌ | ✅ | | Lockfile support | ❌ | ❌ | ✅ | ✅ | | Works across languages | ❌ | ❌ | ❌ | ✅ | | Automatic cleanup | ❌ | ✅ | ✅ | ✅ | | Registry fallback | ✅ | ❌ | ✅ | ✅ | Pkglinks
But what exactly are Pkglinks? How do they differ from traditional symlinks or monorepos? And why should you integrate them into your workflow today? pkglink add https://github