LogoLogo
  • Pear by Holepunch
  • Pear runtime
    • Command-Line-Interface (CLI)
    • Application-Programming-Interface (API)
    • Application Configuration
    • Troubleshooting Applications
  • Bare reference
    • Overview
    • Application-Programming-Interface (API)
    • Node.js Compatibility with Bare
    • Bare Modules
    • Troubleshooting with Bare
  • Guides
    • Getting Started
    • Starting a Pear Desktop Project
    • Making a Pear Desktop Application
    • Starting a Pear Terminal Project
    • Making a Pear Terminal Application
    • Sharing a Pear Application
    • Marking a Release
    • Making a Bare Mobile Application
    • Debugging a Pear Terminal Application
    • Creating a Pear Init Template
  • Building blocks
    • Hypercore
    • Hyperbee
    • Hyperdrive
    • Autobase
    • HyperDHT
    • Hyperswarm
  • How-tos
    • Connect two peers
    • Connect many peers
    • Replicate & persist
    • Manage multiple Hypercores
    • Share append-only databases
    • Create a p2p filesystem
  • Helpers
    • Corestore
    • Localdrive
    • Mirrordrive
    • Secretstream
    • Compact encoding
    • Protomux
  • Tools
    • Hypershell
    • Hypertele
    • Hyperbeam
    • Hyperssh
    • Drives
  • Apps
    • Keet
  • Examples
    • Bare on Mobile
    • React App using Pear
Powered by GitBook

Copyright © 2024 - 2025 Holepunch, S.A. de C.V. All rights reserved.

On this page
  • Installation
  • Basic usage
  1. Tools

Drives

Last updated 1 year ago

CLI to download, seed, and mirror a Hyperdrive or Localdrive.

Installation

Install with :

npm install -g drives

Basic usage

drives [options] [command]

Commands:

Command
Options
Description

touch

[options]

Create a writable Hyperdrive

mirror

[options]

Mirror a drive into another drive

seed

[options] [key]

Seed a Hyperdrive to the DHT network

download

[options]

Download a Hyperdrive by key

serve

[options]

Creates a HTTP drive server

ls

[options]

List files of the drive

info

[options] [key]

Show info about the Hyperdrive

Create a writable Hyperdrive

drives touch
# New drive: <z32 key>

Mirror any drive into another

drives mirror <src> <dst>

Source and destination can be a folder path or a drive key. Use --live for real-time mirroring, and --verbose to show all logs.

Share a drive

drives seed [my-drive-key]

Download a Hyperdrive

drives download <my-drive-key>

Serve a drive via HTTP

drives serve <key or path>
# HTTP server on http://localhost:5000

URL requests are like /path/to/file, i.e., http://localhost:5000/index.js.

List files

drives ls <key or path>

Currently it ignores .git, .github, node_modules, and corestore entries.

Show storage size, version, etc

drives info [my-drive-key]

Use drives --help for more information, drives mirror --help, etc. Always add --corestore [path], by default it's ./corestore.

GitHub (drives)
npm
Installation
Basic usage