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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dhub/cli

v1.0.4

Published

A CLI for managing dDatabases, dTrees and dDrives on the dWeb.

Downloads

10

Readme

dHub CLI

A CLI for peer-to-peer file sharing (and more) using the dWeb Protocol Suite.

Installation

Requires nodejs 14+

npm install -g @dhub/cli

Usage

Command overview:

Usage: dweb <command> [opts...]

General Commands:

  dweb info [urls...] - Show information about one (or more) hubs.
  dweb seed {urls...} - Download and make dweb data available to the dWeb.
  dweb unseed {urls...} - Stop making dweb data available to the dWeb.
  dweb create {drive|tree} - Create a new ddrive or dwebtree.

  dweb cast {pass_phrase} - Send a stream of data over the dWeb.

dDrive Commands:

  dweb drive ls {url} - List the entries of the given dDrive URL.
  dweb drive mkdir {url} - Create a new directory at the given dDrive URL.
  dweb drive rmdir {url} - Remove a directory at the given dDrive URL.

  dweb drive cat {url} - Output the content of the given dDrive URL.
  dweb drive put {url} [content] - Write a file at the given dDrive URL.
  dweb drive rm {url} - Remove a file or (if --recursive) a folder at the given dDrive URL.

  dweb drive diff {source_path_or_url} {target_path_or_url} - Compare two folders in your local filesystem or in dDrives. Can optionally "commit" the difference.
  dweb drive sync {source_path_or_url} [target_path_or_url] - Continuously sync changes between two folders in your local filesystem or in dDrives.

  dweb drive http {url} - Host a dDrive as using HTTP on the localhost.

dWebTree Commands:

  dweb tree ls {url} - List the entries of the given dWebTree URL.
  dweb tree get {url} - Get the value of an entry of the given dWebTree URL.
  dweb tree put {url} [value] - Set the value of an entry of the given dWebTree URL.
  dweb tree del {url} - Delete an entry of the given dWebTree URL.

Daemon Commands:

  dweb daemon status - Check the status of the dHub daemon.
  dweb daemon start - Start the dHub daemon.
  dweb daemon stop - Stop the dHub and mirroring daemons if active.

Aliases:

  dweb sync -> dweb drive sync
  dweb diff -> dweb drive diff
  dweb ls -> dweb drive ls
  dweb cat -> dweb drive cat
  dweb put -> dweb drive put

Overview

The dWeb Protocol Suite is a peer-to-peer network for sharing files and data. This command-line provides a convenient set of tools for accessing the dWeb.

There are two common kinds of "dDatabases":

  • dDrive A folder containing files.
  • dWebTree A key-value database (similar to leveldb).

All data has a URL which starts with dweb://. A URL will look like this:

dweb://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/

You use these URLs to access the dweb data over the peer-to-peer network. For example:

dweb ls dweb://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/
dweb cat dweb://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/file.txt
cat diagram.png | dweb put 515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/diagram.png

You can create a new ddrive or dwebtree using the create commands:

dweb create drive

You can then seed the hub (or seed a hub created by somebody else) using the seed command:

dweb seed dweb://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/

To see what hubs you are currently seeding, run info:

dweb info