npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@scriptgun/crossdeps

v0.1.0

Published

Cross-platform system dependency manager. Define deps in a config file, run crossdeps install.

Readme

@scriptgun/crossdeps

Cross-platform system dependency manager. Define your project's system dependencies in a config file, then install them on any OS with a single command.

Install

npm install -D @scriptgun/crossdeps
# or
bun add -D @scriptgun/crossdeps

Quick Start

Create crossdeps.config.ts in your project root:

import { defineConfig } from "@scriptgun/crossdeps"

export default defineConfig({
  packageJsonPath: "package.json",
  deps: {
    node: {
      description: "JavaScript runtime",
      required: true,
      version: "22.12.0",
      os: {
        macos: "curl -fsSL https://nodejs.org/dist/v{{version}}/node-v{{version}}-darwin-{{arch}}.tar.gz | sudo tar -xz -C /usr/local --strip-components=1",
        "linux-apt": "curl -fsSL https://nodejs.org/dist/v{{version}}/node-v{{version}}-linux-x64.tar.gz | sudo tar -xz -C /usr/local --strip-components=1",
        windows: "choco install nodejs --version={{version}}",
      },
    },
    bun: {
      description: "JavaScript runtime and package manager",
      required: true,
      version: "1.3.5",
      os: {
        all: "curl -fsSL https://bun.sh/install | bash -s \"bun-v{{version}}\"",
        windows: "powershell -c \"irm bun.sh/install.ps1|iex\" && bun upgrade --to {{version}}",
      },
    },
  },
})

CLI Usage

# Install all dependencies
npx crossdeps install

# Install a single dependency
npx crossdeps install node

# Check installed versions
npx crossdeps check

# Check a single dependency
npx crossdeps check bun

# Setup environment variables (for deps that define env)
npx crossdeps env

# Sync packageManager field in package.json (for bun)
npx crossdeps sync-pm

# Use a custom config path
npx crossdeps install --config ./my-config.ts

Config Reference

defineConfig(options)

| Field | Type | Description | |-------|------|-------------| | packageJsonPath | string? | Path to package.json for sync-pm. Default: "package.json" | | deps | Record<string, SystemDepConfig> | Map of dependency name to config |

SystemDepConfig

| Field | Type | Description | |-------|------|-------------| | description | string | Human-readable description | | required | boolean | Whether installation failure should exit with error | | version | string | Version string (or "latest") | | os | OsCommands | Per-OS install commands | | check | { command: string }? | Custom version check command. Default: "{{name}} --version" | | dependsOn | string[]? | Deps that must be installed first (by key name) | | env | EnvVar[]? | Environment variables to configure after install |

OsCommands

Per-OS install commands. Supported targets: macos, linux-apt, linux-dnf, linux-pacman, windows.

  • Use specific OS keys for platform-specific commands
  • Use "all" for commands identical across all platforms
  • Per-OS keys override "all" when both are present
  • Set an OS key to false to mark explicitly unavailable

Template Variables

Available in os commands and check.command:

| Variable | Example | Description | |----------|---------|-------------| | {{name}} | node | Dependency key name | | {{version}} | 22.12.0 | Full version string | | {{major}} | 22 | Major version number | | {{arch}} | arm64 / amd64 | CPU architecture (auto-detected) |

EnvVar

| Field | Type | Description | |-------|------|-------------| | key | string | Environment variable name | | value | string? | Static value | | appendToPath | boolean? | If true, appends to PATH | | detect | string[]? | Auto-detect from these paths (first existing wins) | | fallback | string? | Fallback if detect finds nothing |

Library API

import {
  defineConfig,
  interpolate,
  resolveOsCommand,
  resolveCheckCommand,
  detectOs,
  commandExists,
} from "@scriptgun/crossdeps"

OS Detection

Auto-detects: macos, linux-apt, linux-dnf, linux-pacman, windows.

Linux distro detection uses package manager availability (apt-get, dnf, pacman).

License

MIT