@solvencino/arc

arc is a simple file and folder sharer.

Usage no npm install needed!

<script type="module">
  import solvencinoArc from 'https://cdn.skypack.dev/@solvencino/arc';
</script>

README

arcane (arc)

It is a simple file and folder sharer.

It uses hyperswarm for sharing over network.

Installation:

Prerequisite:

  1. Node.js
  2. To mount, configured fuse-native

Install

npm i -g @solvencino/arc

or (without installation)

npx arc <args>

Usage:

You can access shared files using 3 ways.

  1. browser
  2. mount
  3. repl

Example Usage:

Server :

arc -p 8080

Client :

arc -p 3000 -k <key>

Example Usage (Mount):

Client :

arc -k <key> -m /home/dir/

Example Usage (Repl):

Client :

arc -k <key> -r

Note : You need to provide either key or address on client

Options:

-p, --port <port> port to run on [optional]
-k, --key <key> dht key [required on client]
-m, --mount <path> mount path for fuse
-r, --repl use repl to access files
-a, --address <addr> local ip address for mount
-l, --local don't use hyperswarm, to share on local devices
-w, --allowWrite when using mount allow client all permissions. default READ-ONLY
-v, --version print version
-h, --help display help for command

Repl Commands:
.status                        print status
.ls                            print contents of current directory
.cd <path>                     chagne directory
.cp <path> <file system path>  copy files and directory
.cat <filename>                print contents of file
.help                          print help
.exit                          exit repl

ToDo:

  • handle more sophisticated commands in repl
  • add completer in repl

Limits:

  • when downloading tar packed dir in browser, tar gets corrupted if one of the file size is more than 8GB. GitHub issue
  • when using repl to copy directories is uses fs-stream.

License:

MIT

Files httpfs-client.js and httpfs-server.js are under license MPL 2.0.

Source for both files : httpfs