0.0.57 • Published 4 months ago

braidfs v0.0.57

Weekly downloads
-
License
-
Repository
github
Last release
4 months ago

BraidFS: Braid your Filesystem with the Web

Provides interoperability between web pages via http and your OS filesystem.

  • Using collaborative CRDTs and the Braid extensions for HTTP.

The braidfs daemon performs bi-directional synchronization between remote Braid-HTTP resources and your local filesystem.

Web resources map onto your filesystem

It creates a ~/http folder in your home directory to synchronize webpages with:

~/http/
  ├── example.com/
  │   ├── document.html
  │   ├── notes.md
  │   └── assets/
  │       └── style.css
  └── braid.org/
      └── meeting-53

https://github.com/user-attachments/assets/4fb36208-e0bd-471b-b47b-bbeee20e4f3f

Two-way sync edits between files and web

As long as braidfs is running, it will keep the file and web resources in sync!

  • Edit to the file → web resource
  • Edit to the web resource → file

Each edit to the file is diffed and sent as a CRDT patch, so you can edit files offline, and even collaboratively edit them, with one caveat:

Caveat

For the period of time that you have edited the file in your editor but not saved it, external edits cannot be integrated.

Installation

Install braidfs globally using npm:

npm install -g braidfs

Usage

To start the braidfs daemon:

braidfs run

To sync a URL:

braidfs sync <url>

When you run braidfs sync <url>, it creates a local file mirroring the content at that URL. The local file path is determined by the URL structure. For example:

  • If you sync https://example.com/path/file.txt
  • It creates a local file at ~/http/example.com/path/file.txt

To unsync a URL:

braidfs unsync <url>

Configuration

braidfs looks for a configuration file at ~/http/.braidfs/config, or creates it if it doesn't exist. You can set the following options:

  • sync: An object where the keys are URLs to sync, and the values are simply true
  • cookies: An object for setting domain-specific cookies for authentication
  • port: The port number for the internal daemon (default: 45678)

Example config:

{
  "sync": {
    "https://example.com/document1.txt": true,
    "https://example.com/document2.txt": true
  },
  "cookies": {
    "example.com": "secret_pass"
  },
  "port": 45678
}

The cookies configuration allows you to set authentication cookies for specific domains. In the example above, any requests to example.com will include the specified cookie value.

Security

braidfs is designed to run locally and only accepts connections from localhost (127.0.0.1 or ::1) for security reasons. The cookies configuration enables secure communication with servers that require authentication by allowing you to set domain-specific cookie values.

0.0.55

4 months ago

0.0.56

4 months ago

0.0.57

4 months ago

0.0.53

6 months ago

0.0.54

6 months ago

0.0.52

6 months ago

0.0.51

7 months ago

0.0.50

7 months ago

0.0.47

7 months ago

0.0.48

7 months ago

0.0.49

7 months ago

0.0.46

7 months ago

0.0.43

7 months ago

0.0.44

7 months ago

0.0.45

7 months ago

0.0.40

7 months ago

0.0.41

7 months ago

0.0.42

7 months ago

0.0.38

7 months ago

0.0.39

7 months ago

0.0.37

7 months ago

0.0.34

7 months ago

0.0.35

7 months ago

0.0.36

7 months ago

0.0.30

9 months ago

0.0.31

9 months ago

0.0.32

9 months ago

0.0.33

9 months ago

0.0.25

10 months ago

0.0.26

10 months ago

0.0.27

10 months ago

0.0.28

10 months ago

0.0.29

10 months ago

0.0.24

10 months ago

0.0.21

11 months ago

0.0.22

11 months ago

0.0.23

11 months ago

0.0.20

11 months ago

0.0.16

11 months ago

0.0.17

11 months ago

0.0.18

11 months ago

0.0.19

11 months ago

0.0.14

11 months ago

0.0.15

11 months ago

0.0.13

11 months ago

0.0.12

11 months ago