# hypermount

> A FUSE-mountable distributed filesystem, built on Hyperdrive

Latest version **1.0.0-rc4** (published 2019-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install hypermount
pnpm add hypermount
yarn add hypermount
bun add hypermount
```

Provides the command `hypermount`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-rc4 |
| Published | 2019-04-24 |
| First published | 2019-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 21 |
| Unpacked size | 20.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 152 |
| Author | Andrew Osheorff |
| Maintainers | andrewosh |
| Keywords | hyperdrive, fuse, daemon |

## Links

- npm: https://www.npmjs.com/package/hypermount
- Repository: https://github.com/andrewosh/hypermount
- Homepage: https://github.com/andrewosh/hypermount#readme
- Issues: https://github.com/andrewosh/hypermount/issues
- npm.io page: https://npm.io/package/hypermount

## Dependencies (21)

- [ora](https://npm.io/package/ora.md) ^3.4.0
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [level](https://npm.io/package/level.md) ^4.0.0
- [yargs](https://npm.io/package/yargs.md) ^13.2.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [express](https://npm.io/package/express.md) ^4.16.4
- [forever](https://npm.io/package/forever.md) ^0.15.3
- [request](https://npm.io/package/request.md) ^2.88.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.1
- [through2](https://npm.io/package/through2.md) ^3.0.1
- [corestore](https://npm.io/package/corestore.md) ^1.2.2
- [hypercore](https://npm.io/package/hypercore.md) ^6.26.0
- [hyperdrive](https://npm.io/package/hyperdrive.md) ^10.0.0-rc0
- [dat-encoding](https://npm.io/package/dat-encoding.md) ^5.0.1
- [collect-stream](https://npm.io/package/collect-stream.md) ^1.2.1
- [prettier-bytes](https://npm.io/package/prettier-bytes.md) ^1.0.4
- [forever-monitor](https://npm.io/package/forever-monitor.md) ^1.7.1
- [hyperdrive-fuse](https://npm.io/package/hyperdrive-fuse.md) ^1.0.0-rc0
- [sodium-universal](https://npm.io/package/sodium-universal.md) ^2.0.0
- [random-access-memory](https://npm.io/package/random-access-memory.md) ^3.1.1
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.7

## Recent versions

- 1.0.0-rc4 (latest) — 2019-04-24
- 1.0.0-rc3 — 2019-04-24
- 1.0.0-rc2 — 2019-04-16
- 1.0.0-rc1 — 2019-04-12
- 1.0.0-rc0 — 2019-04-12

## README

# ⛰️ hypermount
A FUSE-mountable distributed filesystem, built with Hyperdrive.

Hypermount lets your mount Hyperdrives as directories on both OSX and Linux. To generate and seed a new Hyperdrive, mounted at a  just run:
```
❯ hypermount mount me
Mounted 8a18b05e95e2e20eca9e66cdeff5b926c7c553edc34c7ffc06054edbb1810f7e at friends/me
```
This command will give you a Hyperdrive key you can share with others. A friend can subsequently mount this drive:
```
❯ hypermount mount andrew 8a18b05e95e2e20eca9e66cdeff5b926c7c553edc34c7ffc06054edbb1810f7e
Mounted 8a18b05e95e2e20eca9e66cdeff5b926c7c553edc34c7ffc06054edbb1810f7e at friends/andrew
```

Once your drives are mounted, you can treat them as you would any other directory!

To make it easier to mount multiple drives, Hypermount runs as a daemonized HTTP server. It maintains a database of mounted Hyperdrives, which it will automatically remount when the daemon is started and unmount when it's stopped.

Under the hood, this module uses [corestore](https://github.com/andrewosh/corestore) to manage and seed your library of hypercores.

## Installation
```
npm i hypermount -g
```

### Setup

When you first install Hypermount, you'll need to perform a setup step that will install native, prebuilt FUSE bindings. We currently only provide bindings for OSX and Linux. The setup step is the only step that requires `sudo`.
```
❯ hypermount setup
Configuring FUSE...
[sudo] password for andrewosh:
Successfully configured FUSE!
```

You should only need to perform this step once (it will persist across restarts).

### Starting the Daemon

After installing/configuring, you'll need to start the daemon before running any other commands. To do this, first pick a storage directory for your mounted Hyperdrives.

From within this storage directory, run:
```
❯ hypermount start
Daemon started at http://localhost:3101
```

If you want to stop the daemon, you can run:
```
❯ hypermount stop
The Hypermount daemon has been stopped.
```

## Usage

Hypermount provides an HTTP interface for mounting, unmounting, and providing status information about all current mounts. There's also a bundled CLI tool which wraps the HTTP interfaces and provides the following commands:

#### `hypermount setup`
Performs a one-time configuration step that installs FUSE. This command will prompt you for `sudo`.

#### `hypermount mount <mountpoint> [key]`
If a key is specified, create a Hyperdrive using that key. If not, generate a new one. Once the drive has been created, mount it at `mountpoint`.

This command takes options:
```
--sparse          Create a sparse content feed.      [boolean] [default: true]
--sparseMetadata  Create a sparse metadata feed.     [boolean] [default: true]
```

#### `hypermount unmount <mountpoint>`
Unmount a Hyperdrive that's been previously mounted at `mountpoint`, if it exists.

*Note: This command will currently not delete or unseed the Hyperdrive. Support for this will be added soon.*

#### `hypermount list`
Display information about all mounted Hyperdrives.

The output takes the form:
```
❯ hypermount list
35127c7db33e884a8b5b054aa8bef510c6faf3688265f0d885241731bf0354b4 => /home/andrewosh/friends/a
  Network Stats:
    Metadata:
      Uploaded:   0 MB
      Downloaded: 0 MB
    Content:
      Uploaded:   0 MB
      Downloaded: 0 MB
1fb343ab8362b84155e7554a42d023b376aa71cdc9d94ca9a4efee8a58326d03 => /home/andrewosh/friends/b
  Network Stats:
    Metadata:
      Uploaded:   0 MB
      Downloaded: 0 MB
    Content:
      Uploaded:   0 MB
      Downloaded: 0 MB
...
```

#### `hypermount status`
Display status information about the Hypermount daemon.

#### `hypermount start`
Launch the Hypermount daemon. When this command is executed, it will use the current working directory as its storage/logging directory. This command must be run before any additional commands (except for `setup`) will work.

Takes these options:
```
  --port             The HTTP port that the daemon will bind to. [number] [default: 3101]
  --replicationPort  The port that the hypercore replicator will bind to. [number] [default: 3102]
```

#### `hypermount stop`
Unmount all mounted Hyperdrives and stop the daemon.

## License

MIT

---
_Source: https://npm.io/package/hypermount · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
