{"id":13711272,"url":"https://github.com/aloknerurkar/bee-afs","last_synced_at":"2026-03-09T08:31:07.622Z","repository":{"id":53929731,"uuid":"502335731","full_name":"aloknerurkar/bee-afs","owner":"aloknerurkar","description":"Active FUSE Filesystem","archived":false,"fork":false,"pushed_at":"2022-12-23T10:10:22.000Z","size":491,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T07:16:16.450Z","etag":null,"topics":["bee","filesystem","fuse","golang","storage","swarm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aloknerurkar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-11T11:59:12.000Z","updated_at":"2024-09-12T11:22:47.000Z","dependencies_parsed_at":"2023-01-30T18:15:16.222Z","dependency_job_id":null,"html_url":"https://github.com/aloknerurkar/bee-afs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aloknerurkar/bee-afs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2Fbee-afs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2Fbee-afs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2Fbee-afs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2Fbee-afs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aloknerurkar","download_url":"https://codeload.github.com/aloknerurkar/bee-afs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2Fbee-afs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30287801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bee","filesystem","fuse","golang","storage","swarm"],"created_at":"2024-08-02T23:01:06.423Z","updated_at":"2026-03-09T08:31:07.588Z","avatar_url":"https://github.com/aloknerurkar.png","language":"Go","funding_links":[],"categories":["Projects"],"sub_categories":["Tools"],"readme":"# bee-afs\nActive FUSE filesystem for bee\n\nAFS stands for Active File System, which means this filesystem implementation can be used to create dynamic FUSE mounts on Swarm which are mutable.\nEvery time the file is changed, it is synced with the Swarm network and updates are sent for it on the network using Feeds which can be used\nto get the latest version of the file by other clients.\n\nA postage batch can be configured per mount point. Optionally user can choose to encrypt the contents of the mount.\n\n`bee-afs` uses [billziss-gh/cgofuse](https://github.com/billziss-gh/cgofuse). This was chosen as it is supported on all the\nplatforms (Windows included! Phew!)\n\nThe FUSE implementation is based on the in-memory filesystem implementation inside `cgofuse`. Additionally, the implementation\nstores files using `bee-file (pkg/file)` instead of in-memory. This stores the writes in-memory till the file is `closed` or `synced` manually\nand written in the format used by `bee`.\n\n`bee-afs` is packaged as a CLI application. Users can create mounts or list their existing mounts. The flags can be provided\nusing a config file or on the command-line.\n\n```\n❯ ./bee-afs -h\nNAME:\n   bee-afs - Provides filesystem abstraction for Swarm decentralized storage\n\nUSAGE:\n   bee-afs [global options] command [command options] [arguments...]\n\nCOMMANDS:\n   create, c  Create a new FUSE Filesystem mount on Swarm\n   list, l    List mounts configured on Swarm\n   mount, m   Mount a FUSE Filesystem on Swarm locally\n   help, h    Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h  show help (default: false)\n```\n\n## Quickstart\n- Install [FUSE](http://github.com/libfuse/libfuse) for your OS.\n\n- Install `bee-afs`\\\n  `bee-afs` is a go project. So you can clone it locally and build the `cmd` package.\n  \n- Install `bee`\\\n  So this is a pre-requisite to run the application. It is advisable to run bee-afs against a local bee node for better latencies.\n  For testing you can use bee node in dev mode, which runs an in-mem node not connected to the network. Once the node is up, you need\n  to create a dummy postage batch using the dev node.\n  ```\n  ./bee dev\n  \n  curl -X POST http://localhost:1635/stamps/{amount}/{depth}\n  ```\n\n- Create a configuration file. A basic config would look like this. The config contains the common configuration required for all commands. The config can be provided using an environment variable `BEEAFS_CONFIG`.\n   ```\n   # if key and password is not provided we generate a dummy one. This will change on each restart so no data would be retrievable as all the\n   # data is tied to users private key. This could be useful for testing.\n   \n   # swarm-key: \u003cPATH TO KEY FILE\u003e\n   # password: \u003cPASSWORD\u003e                                                                                                                                               \n   api-host: \"localhost\"                                                                                                                                    api-port: 1633                                                                                                                                            root-batch: \u003cBATCH CREATED ABOVE\u003e                                                                              \n   ```\n   \n- Create a new mount\n  ```\n  ./bee-afs create --config \u003cPATH TO CONFIG\u003e --batch \u003cBATCH TO USE FOR THIS MOUNT\u003e \u003cUNIQUE NAME FOR MOUNT\u003e\n  ```\n- List you mounts\n  ```\n  ./bee-afs list --config \u003cPATH TO CONFIG\u003e\n  ```\n- Mount a directory. This will create the fuse mount and make it active. The program will not return, in order to stop it, you can use `Ctrl-C`.\n  ```\n  ./bee-afs mount --config \u003cPATH TO CONFIG\u003e \u003cUNIQUE NAME FOR MOUNT\u003e \u003cPATH TO DIRECTORY ON MACHINE\u003e\n  ```\n\n\n## Design\n`bee-afs` uses the concept of feeds. To read more about feeds please refer [the book of swarm](https://www.ethswarm.org/The-Book-of-Swarm.pdf). Feeds are\nuseful to perform versioning of a mutable resource. This allows us to get the latest updates to an item or even go back in time and construct the filesystem for that\nepoch. This way, we can store the filesystem along with all the historical data in the swarm network. Data is deduped at the chunk level, so only chunks\nwhich are unique are stored again.\n\nWhen user configures a mount, he has to name it. Each item in the FS (directory/file) is represented as a feed.\n\nFor a directory there will be only 1 feed which is the metadata feed. For files, we will have metadata and data feed. The latest update in the feed\npoints to the latest state of the file/directory. They topics for the feed are created as follows:\n\n```\nMOUNT_NAME/\u003cPATH TO DIR/FILE\u003e/mtdt\nMOUNT_NAME/\u003cPATH TO FILE\u003e/data\n```\n\nSo with this type of naming of the topics, we don't need to maintain any overarching manifest structure for the filesystem. We can query each item\nbased on their full path and knowing the mount we are working on. Also users can create separate unique mounts by simply naming them uniquely.\n\nMetadata feed will return a swarm reference to the metadata bytes which can be obtained from the network. Similarly the data feed will return the latest\nswarm reference of the file bytes.\n\nUsers can mount the same filesystems from different devices as long as they use the same private key on both of them. The topic is hashed using the keys\nso keys provide a different namespace as well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloknerurkar%2Fbee-afs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faloknerurkar%2Fbee-afs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloknerurkar%2Fbee-afs/lists"}