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

pear-install

v1.0.7

Published

Install Pear and Pear Applications

Readme

Install Pear and Pear Applications

CLI

The published binary. With no link, installs the Pear platform. With a pear:// link, installs that application and/or its binaries.

npx pear-install [link]

Flags

  • --to <dir> — target directory (overrides platform default)
  • --only <paths> — comma-separated filenames to install
  • --timeout <seconds> — network timeout (default 30)
  • --dht-bootstrap <nodes> — comma-separated host:port
  • --json — newline-delimited JSON output (one { cmd: 'install', tag, data } per line)

Default install destinations

  • macOS — apps to /Applications, bins to /usr/local/bin
  • Linux — apps to ~/Applications, ~/AppImages, or ~/.local/bin; bins to ~/.local/bin
  • Windows — apps and bins installed as MSIX packages

API

const Install = require('pear-install')

const install = new Install(opts)

  • link (string)pear:// link
  • to (string, optional) — target directory
  • only (string, optional) — comma-separated filenames
  • bootstrap (array, optional)[{ host, port }, ...] DHT nodes
  • timeout (number, optional) — milliseconds, default 30000
  • corestore (Corestore, optional) — inject an existing corestore; not closed by install.close()
  • swarm (Hyperswarm, optional) — inject an existing swarm; not destroyed by install.close()

If corestore or swarm is omitted, Install creates and owns its own.

await install.ready()

Runs the install. Throws on failure.

await install.close()

Releases the drive, the owned swarm and corestore, and removes the temp dir.

Reusing a corestore and swarm

const corestore = new Corestore('./store')
const swarm = new Hyperswarm()
swarm.on('connection', (c) => corestore.replicate(c))

for (const link of links) {
  const install = new Install({ link, corestore, swarm })
  await install.ready()
  await install.close()
}

await swarm.destroy()
await corestore.close()

Events

  • installing{ link, host }
  • app{ app, name, version, upgrade, verlink, key, dest }
  • stats{ download, upload, peers }
  • final{ success, installed, exists }

Command Integration: /cmd

For embedding in another CLI. Wraps Install as a pear-opstream of { tag, data } records with stdout formatters.

const InstallCmd = require('pear-install/cmd')

const stream = new InstallCmd({ link, to, only, bootstrap, timeout })
await InstallCmd.output(json, stream)

Tags

  • installing{ link, host }
  • app{ app, name, version, upgrade, verlink, key, dest }
  • stats{ download, upload, peers }
  • error{ code, message, stack, info, success: false }
  • final{ success, installed, exists }

await InstallCmd.output(json, stream)

Drains stream to STDOUT.

  • json truthy — emits each record as { cmd: 'install', tag, data }, newline-delimited.
  • json falsy — formats per-tag; stats updates in place via ANSI; static tags stack above.

Returns the final record.

await InstallCmd.runner(cmd)

Pass directly as a paparam command runner. Creates InstallCmd instance and passes it to InstallCmd.output

License

Apache-2.0