npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@vltpkg/vsr

1.0.0-rc.13

@GitHub Actions

npmHomeRepoSnykSocket
Downloads:361
$ npm install @vltpkg/vsr
DailyWeeklyMonthlyYearly

vlt serverless registry (vsr)

A modern, npm-compatible serverless registry that's fast, secure, and ridiculously easy to deploy.

vsr is a minimal yet powerful npm-compatible registry that replicates core npm features while adding cutting-edge capabilities. Built for the modern web, it runs seamlessly on Cloudflare's global edge network.

vsr api screenshot

πŸš€ Quick Start

Local Development

Get up and running in seconds:

# Try it locally
npx @vltpkg/vsr

# Or install globally
npm install -g @vltpkg/vsr
vsr

Boom! πŸ’₯ Your registry is live at http://localhost:1337

Deploy to Production

Deploy to Cloudflare Workers with one command:

# Deploy to production
vsr deploy --env=prod

# Or preview what would be deployed
vsr deploy --dry-run --env=prod

That's it! πŸŽ‰ Your registry is now running globally on Cloudflare's edge network.

✨ Why Choose VSR?

  • ⚑ Blazing Fast: Edge-optimized with global CDN distribution
  • πŸ” Secure by Default: Package integrity validation and granular access control
  • πŸ’° Cost Effective: Generous free tier on Cloudflare (100k requests/day)
  • πŸ›  npm Compatible: Drop-in replacement for existing workflows
  • πŸ“¦ Zero Config: Works out of the box, configure when you need to
  • 🌍 Global Scale: Deploy worldwide in under 5 minutes

🎯 Perfect For

  • Teams who need private package management
  • Organizations requiring granular access control
  • Developers wanting fast, reliable package hosting
  • Companies needing npm-compatible enterprise solutions

πŸƒβ€β™‚οΈ Getting Started

Local Development

# Start with defaults (port 1337)
vsr

# Or explicitly use dev command
vsr dev

# Custom port
vsr --port 3000

# Enable debug mode
vsr --debug

# Use config file
vsr --config ./vlt.json

Production Deployment

Deploy to Cloudflare Workers in under 5 minutes:

Option 1: Using VSR Deploy Command (Recommended)

# Clone and setup
git clone https://github.com/vltpkg/vsr.git
cd vsr
vlt install

# Deploy to development environment
vsr deploy

# Deploy to production
vsr deploy --env=prod

# Preview deployment configuration
vsr deploy --dry-run --env=prod

Option 2: Using Wrangler Directly

# Clone and setup
git clone https://github.com/vltpkg/vsr.git
cd vsr
vlt install

# Deploy to production
wrangler deploy

The VSR deploy command offers better configuration management, environment-specific settings, and integration with your vlt.json configuration.

Coming Soon: One-click Cloudflare deployment button! πŸŽ‰

Deploy to Cloudflare Workers

βš™οΈ Configuration

VSR is designed to work with zero configuration, but when you need more control:

Commands

CommandDescription
devStart development server (default)
deployDeploy to Cloudflare Workers

CLI Options

OptionAliasDefaultDescription
--port-p1337Server port
--config-c-Config file path
--debug-dfalseDebug mode
--daemon-trueLocal filesystem daemon
--help-h-Show help

Deploy Options

OptionDefaultDescription
--envdevEnvironment (dev/staging/prod)
--db-name-Override D1 database name
--bucket-name-Override R2 bucket name
--queue-name-Override queue name
--dry-runfalsePreview deployment

Advanced Configuration

Create a vlt.json file for shared configuration between VLT and VSR:

{
  "registry": {
    "port": 4000,
    "debug": true,
    "telemetry": false,
    "deploy": {
      "sentry": {
        "dsn": "https://your-sentry-dsn@sentry.io/project-id"
      },
      "environments": {
        "prod": {
          "databaseName": "vsr-prod-database",
          "bucketName": "vsr-prod-bucket",
          "queueName": "vsr-prod-cache-refresh-queue",
          "sentry": {
            "environment": "production"
          }
        }
      }
    }
  }
}

πŸ“š Learn More About Configuration β†’
πŸš€ Deployment Guide β†’

🌟 Key Features

Core Registry Features

  • βœ… npm-compatible API - Drop-in replacement
  • βœ… Semver range resolution - Smart version handling
  • βœ… Scoped packages - Full @scope/package support
  • βœ… Dist-tag management - Version tagging and lifecycle
  • βœ… Search & discovery - Find packages fast

Security & Access Control

  • πŸ” Granular access tokens - Fine-grained permissions
  • πŸ›‘οΈ Package integrity validation - Tamper detection
  • πŸ”’ Manifest confusion protection - Security by design

Performance & Reliability

  • ⚑ Edge-optimized responses - Global performance
  • πŸ“¦ Minimal JSON responses - Faster installs
  • πŸ”„ Background data refresh - Always up-to-date
  • 🌐 Upstream proxying - Seamless package access

Developer Experience

  • πŸ“– Interactive API docs - Built-in Scalar documentation
  • πŸ› οΈ Rich CLI interface - Powerful command-line tools
  • βš™οΈ Flexible configuration - Adapt to your workflow

πŸ“Š How It Compares

VSR stands out in the registry landscape:

  • vs npm: Private, customizable, edge-deployed
  • vs Verdaccio: Serverless, zero-maintenance, global scale
  • vs GitHub Packages: More flexible, better performance
  • vs Enterprise solutions: Open source, cost-effective

πŸ“ˆ See Detailed Comparisons β†’

πŸ’» Requirements

Production

  • Cloudflare Account (free tier available)
    • Workers: 100k requests/day
    • D1 Database: 5GB storage + 5M reads/day
    • R2 Storage: 10GB + 10M reads/day

Development

  • Node.js (latest LTS)
  • VLT package manager
  • Git

πŸ”— API Access

Once running, access your registry:

  • Registry API: http://localhost:1337
  • Interactive Docs: http://localhost:1337/-/docs
  • Filesystem Daemon: http://localhost:3000 (if enabled)

The API includes complete npm compatibility plus enhanced features like URL-encoded semver ranges and optimized install responses.

πŸ›£οΈ What's Next?

We're actively developing exciting features:

  • 🌐 Web UI for package management
  • πŸ‘₯ User management with web authentication
  • 🏒 Enterprise features and integrations
  • πŸ“Š Analytics & insights dashboard

πŸ—ΊοΈ View Full Roadmap β†’

🀝 Contributing

We welcome contributions! VSR is built with modern tools and follows best practices:

  • TypeScript for type safety
  • Comprehensive testing with 100% coverage
  • Clean architecture with separated concerns
  • Detailed documentation and examples

πŸ”§ Contributing Guide β†’

πŸ“š Documentation

  • Configuration Guide - Advanced setup and options
  • Deployment Guide - Deploy to Cloudflare Workers
  • Access Control - Security and permissions
  • Testing Guide - Running and writing tests
  • Project Structure - Codebase overview
  • Database Setup - Storage configuration

πŸ’¬ Support

Need help? We've got you covered:

  • πŸ“– Documentation - Comprehensive guides and examples
  • πŸ› Issues - Report bugs and request features
  • πŸ’¬ Discussions - Community support and questions

πŸ†˜ Get Support β†’

πŸ“„ License

VSR is licensed under the Functional Source License (FSL-1.1-MIT) - free for most use cases, with commercial restrictions that convert to MIT after two years.


Ready to revolutionize your package management? πŸš€
Get started β€’ Deploy to production β€’ Join the community