Samhail is a developer tool designed to streamline local npm package development by resolving linked packages directly at the bundler level. It provides an alternative to traditional methods like `npm link`, avoiding issues related to symlinks, `node_modules` mutation, or lockfile changes. The system operates in two parts: a CLI for managing configuration (`.samhail.json`) and session state (`.samhail.lock`), and bundler-specific plugins (for Vite, Webpack, Rspack, esbuild, Rollup) that rewrite module resolution when a session is active. This ensures that a consumer application directly uses the local source of a dependency without interfering with the global `node_modules` structure. Currently at version 0.2.0, it is in an early development stage, implying rapid iteration and potential for breaking changes, though no specific release cadence is published beyond active development. Its core differentiator is the bundler-level resolution and the avoidance of common `npm link` pitfalls.
npm install samhailVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to integrate Samhail into a Vite project, link a local package, and activate a development session for bundler-level resolution.
Always run `npx samhail start` in a dedicated terminal before starting your bundler's dev server. Verify the `.samhail.lock` file exists while developing.
Add both `.samhail.json` and `.samhail.lock` to your project's `.gitignore` file immediately after installation.
Pin to specific patch versions (e.g., `~0.2.0` instead of `^0.2.0`) in your `package.json` for stability, and thoroughly test upgrades when new versions are released.
Ensure `npx samhail start` is running in a separate terminal. Verify your `package.json` correctly lists 'your-linked-package' as a dependency and `npx samhail link` successfully configured it in `.samhail.json`.
Execute `npx samhail start` in your project's root directory. This will create a `.samhail.lock` file, indicating an active session.
No dependency data recorded yet.