@peerbit/shared-fs-cli 0.0.1 → 0.0.2

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 +49 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -32,25 +32,30 @@ 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
38
  npm install -g @peerbit/shared-fs-cli
39
39
  peerbit-fs install-adapter
40
+ peerbit-fs status
40
41
  ```
41
42
 
42
43
  `peerbit-fs install-adapter` downloads a prebuilt
43
- `peerbit-shared-fs-native` binary into `~/.peerbit/shared-fs/bin`. `mount` and
44
+ `peerbit-shared-fs-native` binary into `~/.peerbit/shared-fs/bin`. The global
45
+ package install also tries this automatically, but the explicit command is safe
46
+ to rerun and is the easiest way to repair a missing adapter. `mount` and
44
47
  `status` auto-detect that managed adapter, a `peerbit-shared-fs-native` command
45
48
  on `PATH`, or `PEERBIT_SHARED_FS_NATIVE_ADAPTER`.
46
49
 
47
- Native runtime prerequisites are still platform-specific:
50
+ Native runtime prerequisites are platform-specific:
48
51
 
49
- - Linux: FUSE/libfuse.
50
- - macOS: macFUSE, with one-time approval in System Settings when required.
51
- - Windows: WinFsp runtime.
52
+ - Linux: FUSE/libfuse. On Debian or Ubuntu, install `fuse3` and
53
+ `libfuse3-dev`.
54
+ - macOS: macFUSE. With Homebrew, run `brew install --cask macfuse`, then approve
55
+ macFUSE in System Settings and reboot if macOS requires it.
56
+ - Windows: WinFsp runtime must be installed before mounting.
52
57
 
53
- Then create and mount:
58
+ Create and mount an authenticated shared filesystem:
54
59
 
55
60
  ```bash
56
61
  peerbit-fs status
@@ -59,6 +64,43 @@ mkdir -p "$HOME/PeerbitShared"
59
64
  peerbit-fs mount "$ADDRESS" "$HOME/PeerbitShared"
60
65
  ```
61
66
 
67
+ On Windows PowerShell:
68
+
69
+ ```powershell
70
+ peerbit-fs status
71
+ $address = peerbit-fs create
72
+ New-Item -ItemType Directory -Force "$env:USERPROFILE\PeerbitShared"
73
+ peerbit-fs mount $address "$env:USERPROFILE\PeerbitShared"
74
+ ```
75
+
76
+ Authentication is on by default. Use `peerbit-fs create --no-auth` only for
77
+ explicitly unauthenticated tests or demos.
78
+
79
+ ## Share With Another Machine
80
+
81
+ On the joining machine, print the local Peerbit writer key:
82
+
83
+ ```bash
84
+ peerbit-fs whoami
85
+ ```
86
+
87
+ On a machine that already owns or can write the filesystem, authorize that key:
88
+
89
+ ```bash
90
+ peerbit-fs trust "$ADDRESS" <public-key>
91
+ ```
92
+
93
+ The joining machine can then mount the same address:
94
+
95
+ ```bash
96
+ mkdir -p "$HOME/PeerbitShared"
97
+ peerbit-fs mount "$ADDRESS" "$HOME/PeerbitShared"
98
+ ```
99
+
100
+ Run `peerbit-fs status "$ADDRESS"` when diagnosing a host. It checks the native
101
+ adapter, platform prerequisites, local Peerbit state, and whether the address can
102
+ be opened.
103
+
62
104
  ## macOS from this repo
63
105
 
64
106
  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.2",
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.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "typescript": "^5.6.3"