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

open-resource

v1.0.2

Published

Cross-platform utility to open URLs or files with the system default application.

Readme

🪄 open-resource

platform License Node

A simple, cross-platform Node.js CLI and library to open URLs or files using the system’s default application — works on macOS, Windows, and Linux.


✨ Features

  • 🧠 Automatically detects OS and runs the appropriate command (open, start, or xdg-open)
  • 🌍 Opens URLs in your default browser
  • 📄 Opens local files and directories with their associated apps
  • ⚙️ Works both as a CLI and an importable module
  • 🪶 Zero dependencies — lightweight, fast, and easy to use

🚀 Installation

Global (CLI)

npm install -g open-resource

Local (Project)

npm install open-resource

🧰 CLI Usage

open-resource <file-or-url>

Examples:

# Open a website
open-resource https://www.salesforce.com

# Open a local PDF file
open-resource ./docs/report.pdf

# Open a directory
open-resource ./src

🧩 Node.js API

import { openResource } from "open-resource";

openResource("https://google.com");      // Open a URL in default browser
openResource("./files/myfile.txt");      // Open a file in associated app
openResource("./images");                // Open folder in file explorer

⚙️ How It Works

| Platform | Command Used | Example | | -------- | ------------ | ------------------------------- | | macOS | open | open "https://google.com" | | Windows | start | start "" "https://google.com" | | Linux | xdg-open | xdg-open "https://google.com" |


💻 Development Setup

git clone https://github.com/mchinnappan100/open-resource
cd open-resource
npm install
npm link

Test it locally:

open-resource https://www.salesforce.com

📦 Publish to npm

npm login
npm publish --access public

💡 Roadmap

  • [ ] Add --app flag to specify custom app (e.g., Chrome, VSCode)
  • [ ] Add --wait flag to block until app closes
  • [ ] Add verbose logging option
  • [ ] Support for WSL environments

⚖️ License

MIT © 2025 Mohan Chinnappan