Skip to content

Omnikon-Org/PackVault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PackVault

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.


Features

⭐ 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.


Installation

JSR installation

You can install PackVault programmatically using JSR:

npx jsr add @omnikon-org/packvault

For Deno:

deno add jsr:@omnikon-org/packvault

npm installation

npm install -g packvault

Quick Start

Cache Packages While Online

packvault sync react vite tailwindcss

Or sync directly from a lockfile:

packvault sync --from-lockfile

Go Offline

Disconnect from the internet.

Install From Cache

packvault install react

CLI Usage

Sync

packvault sync react vite tailwindcss
packvault sync --from-lockfile
packvault sync --concurrency 10

Install

packvault install react
packvault install vite

Bundle

packvault bundle save my-stack react vite tailwindcss
packvault bundle list

Search

packvault search react

API Examples

Caching Packages Programmatically

import { 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();

Offline Installation

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();

Configuration

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
}

Architecture

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.

Examples

We provide several executable examples in the examples/ directory:


FAQ

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.


Contributing

We welcome contributions from developers of all levels. Please check our GitHub Issues and read the CONTRIBUTING.md guidelines.


License

MIT β€” See LICENSE


Roadmap

  • Core offline caching
  • Lockfile sync
  • Integrity verification
  • Project templates
  • LAN package sharing (mDNS)
  • Classroom mode
  • Web dashboard

About

Offline-first package caching and distribution CLI for JavaScript developers. Cache npm packages once, install anywhere without internet.

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages