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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@peardrive/cli

v4.0.0

Published

A command-line interface for managing PearDrive networks - decentralized file sharing and storage.

Downloads

6

Readme

PearDrive CLI

A command-line interface for managing PearDrive networks - decentralized file sharing and storage.

Contents

Installation

Method 1: Install via npm (Recommended)

Step 1: (Optional) Install Pear Runtime

npm install -g pear

Step 2: Install PearDrive CLI

npm install -g @peardrive/cli

Step 3: Run the application

Runs from directory once you've installed globally!

peardrivecli

Method 2: Clone and run locally

Step 1: Install Pear Runtime (if not already installed)

npm install -g pear

Step 2: Clone the repository

git clone https://github.com/peardrive/PearDriveCLI.git
cd PearDriveCLI

Step 3: Install dependencies

npm install

Step 4: Run the application

npm run start

Usage

Getting Started

Once the application starts, you'll see an interactive menu with the following options:

  • Create a new PearDrive network - Start your own decentralized file sharing network
  • Join an existing network - Connect to a network using a network key
  • List your networks - View all your PearDrive networks
  • Delete a network - Remove a network from your local storage (not yet implemented as of 2.0.3)

Main Features

File Management

  • Upload files to your PearDrive network
  • Download files from network peers
  • List local and network files
  • Share files with other network participants

Network Management

  • Generate QR codes for easy network sharing
  • Set custom network nicknames
  • Toggle archive mode
  • View connected peers and their public keys

Example Workflow

  1. Start the CLI with npm run start or pear run .
  2. Create a new network or join an existing one
  3. Upload files you want to share
  4. Share your network key with others (via QR code or text)
  5. Download files shared by other network participants

Archive Mode (Automatically save all new files on network)

Archive mode transforms your device into a complete archive node for the PearDrive network. When enabled:

  • Your device automatically downloads and stores every file shared on the network
  • Acts as a persistent backup ensuring data availability even when original uploaders go offline
  • Helps strengthen network resilience by maintaining complete copies of all shared content
  • Requires sufficient storage space as it will download all network content

Development

Running in Development Mode

pear run -d .

Running Tests

npm test

Troubleshooting

Common Issues and Solutions

"pear: command not found"

  • Solution: Install Pear runtime globally with npm install -g pear
  • Verify installation with pear --version

"Cannot find module '@peardrive/cli'"

  • Solution: Install the CLI globally with npm install -g @peardrive/cli
  • Or clone the repository and run npm install in the project directory

Permission errors during global installation

  • Solution: Use sudo npm install -g pear on macOS/Linux
  • Or configure npm to use a different directory: npm config set prefix ~/.local

Application won't start after installation

  • Check that both Pear runtime and PearDrive CLI are installed
  • Try running pear run . directly in the cloned repository
  • Check console for specific error messages

Network connection issues

  • Ensure your firewall allows the application to access the network
  • Check that you're using the correct network key when joining

Files not syncing between peers

  • File syncing for file changes will not work as intended until PearDriveCore 3.0
  • Verify all peers are connected to the same network
  • Ensure sufficient peers are online and connected

Changelog