test1dweb

1.5.6 • Public • Published

./logo.png

Hyp

[ Demo Video | Installation | Usage | Overview | Website ]

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

📺 Watch The Demo Video

Installation

Requires nodejs 14+

npm install -g @hyperspace/cli

Usage

Command overview:

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

General Commands:

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

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

Hyperdrive Commands:

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

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

  test1dweb 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.
  test1dweb drive sync {source_path_or_url} [target_path_or_url] - Continuously sync changes between two folders in your local filesystem or in ddrives.

  test1dweb drive http {url} - Host a ddrive as using HTTP on the localhost.

DWebTree Commands:

  test1dweb dtree ls {url} - List the entries of the given dwebtree URL.
  test1dweb dtree get {url} - Get the value of an entry of the given dwebtree URL.
  test1dweb dtree put {url} [value] - Set the value of an entry of the given dwebtree URL.
  test1dweb dtree del {url} - Delete an entry of the given dwebtree URL.

Daemon Commands:

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

Aliases:

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

Overview

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

There are two common kinds of "Hypercores":

  • Hyperdrive A folder containing files.
  • DWebTree A key-value database (similar to leveldb).

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

test1dweb://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/

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

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

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

test1dweb create drive

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

test1dweb seed test1dweb://515bbbc1db2139ef27b6c45dfa418c8be6a1dec16823ea7cb9e61af8d060049e/

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

test1dweb info

Documentation

The website documentation have a lot of useful guides:

Readme

Keywords

Package Sidebar

Install

npm i test1dweb

Weekly Downloads

1

Version

1.5.6

License

MIT

Unpacked Size

104 kB

Total Files

49

Last publish

Collaborators

  • dwebprotocol