@peerbit/shared-fs-cli 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +53 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -32,25 +32,33 @@ authorize that writer.
32
32
 
33
33
  ## Install
34
34
 
35
- Install the CLI and native adapter:
35
+ Install the CLI, then make sure the native adapter is installed:
36
36
 
37
37
  ```bash
38
- npm install -g @peerbit/shared-fs-cli
38
+ npm install -g --omit=peer @peerbit/shared-fs-cli
39
39
  peerbit-fs install-adapter
40
+ peerbit-fs status
40
41
  ```
41
42
 
43
+ `--omit=peer` keeps npm from auto-installing optional browser and React Native
44
+ peer packages that are not needed by the Node.js CLI.
45
+
42
46
  `peerbit-fs install-adapter` downloads a prebuilt
43
- `peerbit-shared-fs-native` binary into `~/.peerbit/shared-fs/bin`. `mount` and
47
+ `peerbit-shared-fs-native` binary into `~/.peerbit/shared-fs/bin`. The global
48
+ package install also tries this automatically, but the explicit command is safe
49
+ to rerun and is the easiest way to repair a missing adapter. `mount` and
44
50
  `status` auto-detect that managed adapter, a `peerbit-shared-fs-native` command
45
51
  on `PATH`, or `PEERBIT_SHARED_FS_NATIVE_ADAPTER`.
46
52
 
47
- Native runtime prerequisites are still platform-specific:
53
+ Native runtime prerequisites are platform-specific:
48
54
 
49
- - Linux: FUSE/libfuse.
50
- - macOS: macFUSE, with one-time approval in System Settings when required.
51
- - Windows: WinFsp runtime.
55
+ - Linux: FUSE/libfuse. On Debian or Ubuntu, install `fuse3` and
56
+ `libfuse3-dev`.
57
+ - macOS: macFUSE. With Homebrew, run `brew install --cask macfuse`, then approve
58
+ macFUSE in System Settings and reboot if macOS requires it.
59
+ - Windows: WinFsp runtime must be installed before mounting.
52
60
 
53
- Then create and mount:
61
+ Create and mount an authenticated shared filesystem:
54
62
 
55
63
  ```bash
56
64
  peerbit-fs status
@@ -59,6 +67,43 @@ mkdir -p "$HOME/PeerbitShared"
59
67
  peerbit-fs mount "$ADDRESS" "$HOME/PeerbitShared"
60
68
  ```
61
69
 
70
+ On Windows PowerShell:
71
+
72
+ ```powershell
73
+ peerbit-fs status
74
+ $address = peerbit-fs create
75
+ New-Item -ItemType Directory -Force "$env:USERPROFILE\PeerbitShared"
76
+ peerbit-fs mount $address "$env:USERPROFILE\PeerbitShared"
77
+ ```
78
+
79
+ Authentication is on by default. Use `peerbit-fs create --no-auth` only for
80
+ explicitly unauthenticated tests or demos.
81
+
82
+ ## Share With Another Machine
83
+
84
+ On the joining machine, print the local Peerbit writer key:
85
+
86
+ ```bash
87
+ peerbit-fs whoami
88
+ ```
89
+
90
+ On a machine that already owns or can write the filesystem, authorize that key:
91
+
92
+ ```bash
93
+ peerbit-fs trust "$ADDRESS" <public-key>
94
+ ```
95
+
96
+ The joining machine can then mount the same address:
97
+
98
+ ```bash
99
+ mkdir -p "$HOME/PeerbitShared"
100
+ peerbit-fs mount "$ADDRESS" "$HOME/PeerbitShared"
101
+ ```
102
+
103
+ Run `peerbit-fs status "$ADDRESS"` when diagnosing a host. It checks the native
104
+ adapter, platform prerequisites, local Peerbit state, and whether the address can
105
+ be opened.
106
+
62
107
  ## macOS from this repo
63
108
 
64
109
  For repository development, the macOS installer builds the TypeScript CLI and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peerbit/shared-fs-cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "author": "dao.xyz",
5
5
  "repository": "https://github.com/dao-xyz/peerbit-examples",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "chalk": "^5.3.0",
38
38
  "peerbit": "^5.2.19",
39
39
  "yargs": "^17.7.2",
40
- "@peerbit/shared-fs": "0.0.1"
40
+ "@peerbit/shared-fs": "0.0.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "typescript": "^5.6.3"