Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (offline-npm-manager) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
📦 Offline NPM Manager - CLI Tool
A command-line tool for downloading npm packages when online and installing them offline later.
Features
✅ Add Packages - Download packages and dependencies for offline use
✅ Install Packages - Install from local cache without internet
✅ List Packages - View all cached packages
✅ Remove Packages - Clean up cached packages
✅ Dependency Management - Automatically cache package dependencies
✅ Smart Caching - Detect already-cached packages
✅ Scoped Packages - Full support for @scope/package naming
✅ Cross-Platform - Works on Windows, macOS, and Linux
✅ Version Control - Store and manage multiple versions
✅ Real-time Feedback - Progress indicators and error messages
Installation
Prerequisites
- Node.js 16 or higher
- npm 8 or higher
Install Globally
npm install -g offline-npm-managerThis installs the offline-npm command globally.
uninstall Globally
npm uninstall -g offline-npm-managerUsage
Add a Package
Download and store a package locally (requires internet):
offline-npm add <package>Examples:
offline-npm add axios
offline-npm add react --deps
offline-npm add react@17.0.2
offline-npm add @babel/coreOptions:
-d, --deps→ Download all dependencies recursively-s, --storage <path>→ Custom storage directory
Install a Package
Install from local cache (works offline):
offline-npm install <package>Examples:
offline-npm install axios --save
offline-npm install lodash --save-dev
offline-npm install react@17.0.2Options:
--save→ Add to dependencies--save-dev→ Add to devDependencies-s, --storage <path>→ Custom storage
List Cached Packages
offline-npm list
offline-npm lsExample output:
📦 offline-npm list
Storage: ~/.offline-npm-cache
┌──────────┬─────────┬──────────┬───────────────────────┬─────────┐
│ Package │ Version │ Size │ Downloaded │ Status │
├──────────┼─────────┼──────────┼───────────────────────┼─────────┤
│ lodash │ 4.17.23 │ 307.5 KB │ 3/24/2026, 9:48 AM │ ✔ ready │
│ express │ 5.2.1 │ 22.6 KB │ 3/24/2026, 10:15 AM │ ✔ ready │
└──────────┴─────────┴──────────┴───────────────────────┴─────────┘Remove a Package
offline-npm remove <package>Example:
offline-npm remove lodashStorage
Default locations:
- Windows →
%USERPROFILE%\.offline-npm-cache - macOS/Linux →
~/.offline-npm-cache
Override storage:
offline-npm add react --storage /custom/pathStorage Structure
~/.offline-npm-cache/
├── lodash/
│ └── 4.17.23/
│ ├── lodash-4.17.23.tgz
│ └── meta.json
├── express/
│ └── 5.2.1/
│ ├── express-5.2.1.tgz
│ └── meta.json
└── @babel/
└── core/
└── 7.20.5/
├── core-7.20.5.tgz
└── meta.jsonmeta.json Example
{
"name": "express",
"version": "5.2.1",
"size": 23150,
"downloadedAt": "2026-03-24T10:15:30Z",
"hasDeps": true
}Uninstall
npm uninstall -g offline-npm-managerThis removes the CLI.
(Optional: manually delete cache if needed)
rm -rf ~/.offline-npm-cacheExample Workflow
# Step 1: Online
offline-npm add express@4.18.2 --deps
offline-npm add lodash
offline-npm list
# Step 2: Go Offline
# Step 3: Install
mkdir my-project && cd my-project
npm init -y
offline-npm install express@4.18.2 --save
offline-npm install lodash --saveHow It Works
| Operation | Description |
|---|---|
| Add Package | Uses npm pack to download .tgz |
| Install | Installs from local .tgz |
| List | Reads cached metadata |
| Remove | Deletes cached files |
| Dependencies | Recursively cached with --deps |
Requirements
- Node.js ≥ 16
- npm ≥ 8
Troubleshooting
npm not found
npm --versionInstall Node.js or fix PATH.
Package not found
offline-npm add lodashCheck spelling or internet connection.
Missing dependencies
offline-npm add express --depsChangelog
Version 1.0.11 (Latest)
License
MIT