GithubHelp home page GithubHelp logo

hyperdrive-cli's Introduction

hyperdrive-cli

Simpe CLI for a HyperDrive as a quick alternative to dat-cli.

Installation

$ npm install hyperdrive-cli -g

Usage

Usage: hyperdrive: [-hDV] [--help] [--version]
       hyperdrive: <command> [options] -- [pathspec]


Commands:
  init           Initialize a new archive
  info           Show public information about the archive
  stat           Stat a file or directory
  read           Read a range from a file (Requires public key)
  serve          Serve a hyperdrive over HTTP
  write          Write to a file (Requires secret key)
  unlink         Remove a file (Requires secret key)
  download       Download file or entire archive (Requires public key)

Aliases:
  init           i, initialize
  read           get, cat
  serve          http
  write          add, put, set
  unlink         rm, delete, del, remove
  upload         up
  readdir        list, ls, l
  download       down

Options:
  --help, -h     Show this message
  --version, -V  Output program version
  --key, -k      Hyperdrive archive public key
  --debug, -D    Enable debug output (DEBUG=hyperdrive:cli*)
  --start, -S    Range start offset when using ranged streams
  --end, -E      Range end offset when using ranged streams
  --length, -L   Range length when using ranged streams
  --port, -p     Port to bind HTTP server to
  --ram, -M      Store in random access memory

API

$ hyperdrive init

Initialize a new archive

$ hyperdrive info

Show public information about the archive

$ hyperdrive stat

Stat a file or directory

$ hyperdrive read

Read a range from a file (Requires public key)

$ hyperdrive write

Write to a file (Requires secret key)

$ hyperdrive serve

Serve a hyperdrive over HTTP

$ hyperdrive unlink

Remove a file (Requires secret key)

$ hyperdrive download

Download file or entire archive (Requires public key)

Configuration

This module uses rc to allow things like hyperdiscovery to be configured. Hyperdrive options like the secret key for hypercore can also be specified here. Create a .hyperdriverc file with your hyperdrive. See below for an example object.

{
  "drive": {
    "sparse": true,
    "secretKey": "..."
  },

  "discovery": {
    "live": true,
    "dns": {
      "server": ["discovery1.publicbits.org"],
      "domain": "dat.local"
    },
  }
}

License

MIT

hyperdrive-cli's People

Contributors

jwerle avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.