Offline-first package caching and distribution CLI for JavaScript and TypeScript developers.
Built by Omnikon β Developer tools for the next generation.
π Website: https://pack-vault-website.vercel.app/
PackVault is an offline-first package caching and distribution library for JavaScript developers. Download package tarballs while online, install them later without internet access, share them across your LAN, and bootstrap entire projects from a local package vault.
β Offline-first: Cache packages online, use them completely offline.
π LAN package sharing: Share packages over the local network via mDNS.
π¦ Project templates: Bootstrap projects with dependencies completely offline.
π Integrity verification: Ensures SHA-512 and shasum consistency.
β‘ Peer-to-peer package sync: P2P synchronization with authorization tokens.
You can install PackVault programmatically using JSR:
npx jsr add @omnikon-org/packvaultFor Deno:
deno add jsr:@omnikon-org/packvaultnpm install -g packvaultpackvault sync react vite tailwindcssOr sync directly from a lockfile:
packvault sync --from-lockfileDisconnect from the internet.
packvault install reactpackvault sync react vite tailwindcss
packvault sync --from-lockfile
packvault sync --concurrency 10packvault install react
packvault install vitepackvault bundle save my-stack react vite tailwindcss
packvault bundle listpackvault search reactimport { CacheManager } from "@omnikon-org/packvault";
async function cachePackages() {
const cache = new CacheManager();
await cache.syncPackages(["vite", "typescript"]);
const pkgPath = await cache.getPackagePath("vite", "latest");
console.log("Vite is cached at:", pkgPath);
}
cachePackages();import { PackageManager } from "@omnikon-org/packvault";
async function runOffline() {
const manager = new PackageManager();
const pkg = await manager.installOffline("react", "^18.0.0");
console.log("Offline installation successful!", pkg);
}
runOffline();The default configuration is stored in ~/.packvault/config.json. You can modify it or use environment variables to adjust cache paths, registry URLs, and peer-to-peer settings.
Example:
{
"cacheDirectory": "~/.packvault/cache",
"registry": "https://registry.npmjs.org/",
"p2pPort": 8000
}npm Registry
β
βΌ
PackVault Sync
β
βΌ
Local Vault
β
ββββββ΄βββββ
βΌ βΌ
Offline LAN
Install Sharing
β
βΌ
Peer Sync
The core components include:
- CacheManager: Handles metadata and tarball caching.
- PackageManager: Orchestrates installations.
- PeerManager: Discovers and syncs with peers via mDNS.
- LocalRegistryServer: Exposes the local cache as a standard npm registry.
We provide several executable examples in the examples/ directory:
- basic.ts - Basic package resolution.
- cache.ts - Sync and caching workflow.
- offline.ts - Demonstrates offline installation fallback.
- sync.ts - Peer-to-peer LAN syncing.
- template.ts - Offline template scaffolding.
Q: Does PackVault replace npm or Yarn?
A: No, it works alongside them. It acts as a smart cache and offline registry proxy.
Q: Can I use it in CI environments?
A: Yes! You can point PackVault to a shared cache directory to drastically speed up CI times.
Q: Is it compatible with Deno and Bun?
A: Yes, PackVault's core APIs and CLI are designed to be runtime agnostic where possible.
We welcome contributions from developers of all levels. Please check our GitHub Issues and read the CONTRIBUTING.md guidelines.
MIT β See LICENSE
- Core offline caching
- Lockfile sync
- Integrity verification
- Project templates
- LAN package sharing (mDNS)
- Classroom mode
- Web dashboard