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

bitweb-cli

v1.0.1

Published

A CLI for the bit:// web.

Downloads

20

Readme

BitWeb CLI

A CLI for peer-to-peer file sharing (and more) using the BIT protocol.

Installation

Requires nodejs 14+

npm install -g bitweb-cli

To start using the network, run:

bit daemon start

This will run in the background, sync data for you, until you run:

bit daemon stop

Usage

Command overview:

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

General Commands:

  bit info [urls...] - Show information about one (or more) bitweb data.
  bit seed {urls...} - Download and make data available to the network.
  bit unseed {urls...} - Stop making data available to the network.
  bit create {drive|tree} - Create a new bitdrive or bittree.

  bit beam {pass_phrase} - Send a stream of data over the network.

Bitdrive Commands:

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

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

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

  bit drive http {url} - Host a bitdrive as using HTTP on the localhost.

BitTree Commands:

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

Daemon Commands:

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

Aliases:

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

Overview

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

BitWeb data exists within a data structure known as a UniChain. There are two common kinds of "UniChains":

  • BitDrive A folder containing files.
  • BitTree A key-value database (similar to leveldb).

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

bit://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/

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

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

You can create a new bitdrive or bittree using the create commands:

bit create drive

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

bit seed bit://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/

To see what bitweb data you are currently seeding, run info:

bit info

Documentation

The website documentation have a lot of useful guides: