skif: replacing sherif, syncpack and most of knip with one Rust binary
I was working on restructuring a very large monorepo with disparate package managers and versions into a single PNPM workspace. When I was finished I decided I am going to enforce certain conventions so it could not drift again without failing CI. I set this up, and found myself using several different tools - Sherif , Syncpack and Knip - to ensure that the repository doesn't drift again. This…
The developer is introducing "skif", a new Rust-based linter and enforcement tool aimed at simplifying dependency management in monorepos. Skif consolidates the functionality of Sherif, Syncpack, and Knip into a single, ultra-fast binary. It can be invoked with simple commands like "npx skif-cli" to lint the current workspace or package, "npx skif-cli --fix" to apply safe fixes, and "npx skif-cli migrate" to convert existing Sherif, Syncpack, and Knip configurations into a single skif.toml file.
Skif adopts Sherif's version and catalog policies, as well as Syncpack's model for policy enforcement. It also incorporates Knip's dead-code analysis. For version management, Skif focuses on detecting mismatches, semver range violations, banned dependencies, catalog discrepancies, and protocol-related issues. Dead code checks include unused files, exports, types, enum members, dependencies, unresolved imports, circular imports, and more.
The tool supports all major package managers - npm, pnpm, Yarn, Bun, Rush, and Lerna. It achieves impressive speed, with median runtimes of just 32ms for a test suite on a 4-vCPU Linux VM. Skif does not support Deno and leaves version synchronization to specialized tools or package managers themselves.
Accuracy-wise, Skif matches Sherif and Syncpack flawlessly on generated workspaces with seeded defects. On a workspace with real dead-code findings, Skif demonstrated 100% precision and recall, while Knip scored lower at 77% precision and 100% recall. The tool is still in early development, with ongoing improvements planned. To try Skif, users can install it via npx, brew, scoop, or cargo. Detailed documentation is available at https://goldziher.github.io/skif/.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.