About Shrinkpack
shrinkpack is a command-line tool for making npm installs fast, resilient and reproducible. It points your package-lock.json at dependency tarballs that are checked into your project's repository, so you can install while offline, during a registry outage, or when a package disappears from the registry.
It reads package-lock.json or npm-shrinkwrap.json, downloads the exact archives npm would fetch from the registry, decompresses the .tgz files into .tar files to avoid storing binary blobs in Git, saves them in a node_shrinkpack folder and rewrites the lockfile to reference them. The rest of the install process is unchanged, but no network access is needed. You run it each time you change and install dependencies.
shrinkpack requires npm 7 or higher, is written in TypeScript and is released under the MIT license. Its topics mention yarn and pnpm, and the README includes a history from 2015 describing how it related to events such as the left-pad incident. It suits teams that need dependable CI builds independent of the public registry.
Key features
- Rewrites package-lock.json to local tarballs
- Offline npm installs
- Stores uncompressed .tar files in Git
- Protects builds from registry outages
- Works from package-lock or shrinkwrap files
Good fit for
- βReproducible CI builds
- βInstalling dependencies without registry access
- Built with
- TypeScript
- Tags
- npm
- lockfile
- offline-mirror
- ci
- dependencies
- cli
- shrinkwrap
- package-lock
Shrinkpack: questions and answers
- What is Shrinkpack used for?
- shrinkpack is a CLI that stores your npm dependency tarballs in source control and rewrites package-lock.json so installs work offline. It is a good fit for reproducible CI builds and installing dependencies without registry access.
- Is Shrinkpack open source?
- Yes. Shrinkpack is open source under the MIT licence. Its source code is on GitHub at JamieMason/shrinkpack and is written mainly in TypeScript.
- Is Shrinkpack free?
- Yes. Shrinkpack is open source, so the software itself is free to use.
- What are some alternatives to Shrinkpack?
- Similar open-source tools in the Developer Tools category include Tach, PhpMetrics and Statoscope. SaaS products in the same category include act101, Amicro and Angular Material Blocks.
- Is Shrinkpack actively maintained?
- The most recent commit to Shrinkpack was on 16 February 2023, and the latest release is 0.20.0, published on 3 January 2022. The project has 800 stars on GitHub.
Open-source alternatives to Shrinkpack
See all
Tach
Developer Tools
A Python tool to visualize + enforce dependencies, using modular architecture π Open sour
MITβ 2.8k
PhpMetrics
Developer Tools
Beautiful and understandable static analysis tool for PHP
MITβ 2.6k
Statoscope
Developer Tools
Statoscope is a toolkit to analyze and validate webpack bundle
MITβ 1.6k
SwiftInfo
Developer Tools
π Extract and analyze the evolution of an iOS app's code.
MITβ 1.1k
Neovim
Developer Tools
Vim-fork focused on extensibility and usability
OSSvs Sublime Textβ 103k
Google Workspace CLI
Developer Tools
Google Workspace CLI β one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Cha
Apache-2.0β 31k
SaaS alternatives to Shrinkpack
See all
act101
Developer Tools
Codebase quality and refactoring toolkit for coding agents, with code porting and verification
SaaS
Amicro
Developer Tools
Open-source React library of micro-interactions and page transitions
SaaS
Angular Material Blocks
Developer Tools
Pre-built Angular Material UI blocks, templates and a CLI for rapid interface development
SaaS
BuildBuddy
Developer Tools
Remote build caching, execution and results UI for Bazel
SaaSCleanExtraSpace
Developer Tools
Native Mac app for developers that finds and purges Xcode, Android Gradle, npm and other build caches to reclaimβ¦
SaaS
Debtdrone
Developer Tools
Scans codebases for technical debt and opens AI-generated pull requests to fix it
SaaS