2023-10-25 12:01:46 +00:00
<!--
# SPDX-License-Identifier: GPL-3.0-or-later
#
# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland <glenux@glenux.net>
# Copyright © 2023 Glenn Y. Rolland <glenux@glenux.net>
-->
2023-10-25 12:46:06 +00:00
[![Build Status ](https://cicd.apps.glenux.net/api/badges/glenux/mfm/status.svg )](https://cicd.apps.glenux.net/glenux/mfm)
2024-01-03 18:32:17 +00:00
![License LGPL3.0-or-later ](https://img.shields.io/badge/license-LGPL3.0--or--later-blue.svg )
[![Donate on patreon ](https://img.shields.io/badge/patreon-donate-orange.svg )](https://patreon.com/glenux)
> :information_source: This project is available on our self-hosted server and
> on CodeBerg and GitHub as mirrors. For the latest updates and comprehensive
> version of our project, please visit our primary repository at:
> <https://code.apps.glenux.net/glenux/mfm>.
2023-10-25 12:46:06 +00:00
2023-10-24 09:22:26 +00:00
# Minimalist Fuse Manager (MFM)
2023-10-20 09:33:12 +00:00
2023-10-25 12:02:51 +00:00
MFM is a Crystal-lang CLI designed to streamline the management of various FUSE filesystems, such as sshfs, gocryptfs, httpdirfs, and more. Through its user-friendly interface, users can effortlessly mount and unmount filesystems, get real-time filesystem status, and handle errors proficiently.
2023-10-20 09:33:12 +00:00
2023-10-24 09:22:26 +00:00
## Prerequisites & Dependencies
2023-10-20 09:33:12 +00:00
2023-10-25 12:02:51 +00:00
Before using MFM, make sure the following tools are installed on your system:
2023-10-20 09:33:12 +00:00
2023-10-24 09:22:26 +00:00
- **gocryptfs**: < https: // github . com / rfjakob / gocryptfs >
- **sshfs**: < https: // github . com / libfuse / sshfs >
- **httpdirfs**: < https: // github . com / fangfufu / httpdirfs >
- **fzf**: < https: // github . com / junegunn / fzf >
2023-11-02 15:58:39 +00:00
- libpcre3
- libevent-2.1
For Debian/Ubuntu you can use the following command:
```shell-session
$ sudo apt-get update & & sudo apt-get install libpcre3 libevent-2.1-7 fzf gocryptfs httpdirfs sshfs
```
## Building from source
2023-10-20 09:33:12 +00:00
2023-10-25 12:02:51 +00:00
To build from source, you'll also need:
2023-10-24 09:22:26 +00:00
2023-10-25 12:02:51 +00:00
- **crystal-lang**: < https: // crystal-lang . org />
2023-10-24 09:22:26 +00:00
2023-11-02 15:58:39 +00:00
For Debian/Ubuntu you can use the following command:
```shell-session
2024-01-24 13:15:42 +00:00
$ sudo apt-get update & & sudo apt-get install libpcre3-dev libevent-2.1-dev make
2023-11-02 15:58:39 +00:00
```
2023-10-24 09:22:26 +00:00
## Installation
### 1. From Source
2024-01-24 13:15:42 +00:00
To get started with MFM, ensure that you have the prerequisites installed on your system (see above).
Then follow these steps to install:
git clone https://code.apps.glenux.net/glenux/mfm
cd mfm
make prepare
make build
sudo make install # either to install system-wide
make install PREFIX=$HOME/.local # or to install as a user
2023-10-24 09:22:26 +00:00
### 2. Binary Download
2023-11-02 15:58:39 +00:00
Alternatively, download [a pre-compiled binary
version](https://code.apps.glenux.net/glenux/mfm/releases) of MFM.
2023-10-24 09:22:26 +00:00
## Usage
### Command Line Options
2023-10-20 09:33:12 +00:00
2024-01-14 19:32:23 +00:00
Global
2023-10-20 09:33:12 +00:00
```
2023-10-24 09:22:26 +00:00
Usage: mfm [options]
2023-10-20 09:33:12 +00:00
2023-11-24 09:29:12 +00:00
Global options
-c, --config FILE Set configuration file
-v, --verbose Set more verbosity
-o, --open Automatically open directory after mount
--version Show version
-h, --help Show this help
2023-10-20 09:33:12 +00:00
2023-10-25 14:34:24 +00:00
Commands (not implemented yet):
2024-01-14 19:32:23 +00:00
config Manage configuration file
mapping Manage filesystems
```
Config management
```
Usage: mfm filesystem [options]
Global options
-c, --config FILE Set configuration file
-v, --verbose Set more verbosity
-o, --open Automatically open directory after mount
--version Show version
-h, --help Show this help
Commands (not implemented yet):
init Create init file
```
Filesystem management
```
Usage: mfm mapping [options]
Global options
-c, --config FILE Set configuration file
-v, --verbose Set more verbosity
-o, --open Automatically open directory after mount
--version Show version
-h, --help Show this help
Commands (not implemented yet):
list List fuse mappings
create Create new fuse mapping
edit Edit fuse mapping
delete Create new fuse mapping
2023-10-24 09:22:26 +00:00
```
2023-10-20 09:33:12 +00:00
2023-10-24 10:50:42 +00:00
### Demo
2023-10-25 12:02:51 +00:00
< video src = "https://code.apps.glenux.net/glenux/mfm/media/branch/develop/doc/output.webm" width = "810" height = "595" style = "max-width: 100%;" controls = "controls" > < / video >
2023-10-20 09:33:12 +00:00
2023-10-24 09:22:26 +00:00
## Configuration
2023-10-20 09:33:12 +00:00
2023-11-02 15:58:39 +00:00
MFM uses a YAML configuration file, typically found at `~/.config/mfm.yml` , to
detail the filesystem names, types, and respective configurations.
2023-10-20 09:33:12 +00:00
2023-10-24 09:22:26 +00:00
### YAML File Format
2023-10-20 09:33:12 +00:00
```yaml
2023-11-24 09:52:05 +00:00
---
version: "1"
global:
mountpoint: "{{env.HOME}}/mnt"
2023-10-24 09:22:26 +00:00
2023-10-24 12:49:46 +00:00
filesystems:
2023-10-24 09:22:26 +00:00
- type: "gocryptfs"
name: "Work - SSH Keys"
2023-11-20 15:45:40 +00:00
encrypted_path: "/home/user/.ssh/keyring.work.vault"
2023-10-24 09:22:26 +00:00
- type: "sshfs"
name: "Personal - Media Server"
2023-11-20 15:45:40 +00:00
remote_user: "{{env.USER}}"
2023-10-24 09:22:26 +00:00
remote_host: "mediaserver.local"
remote_path: "/mnt/largedisk/music"
remote_port: 22
2023-10-24 15:14:14 +00:00
- type: httpdirfs
name: "Debian Repository"
url: "http://ftp.debian.org/debian/"
2023-11-02 15:58:39 +00:00
2023-10-25 12:02:51 +00:00
# Add more filesystems as needed
2023-10-20 09:33:12 +00:00
```
2023-10-24 09:22:26 +00:00
## Contribution Guidelines
2023-10-25 12:02:51 +00:00
Contributing to MFM:
2023-10-24 09:22:26 +00:00
2023-10-25 12:02:51 +00:00
1. **Fork the Repository** : Start by forking MFM's repository.
2. **Create a Feature Branch** : Develop each feature or fix in its own branch.
3. **Commit Changes** : Provide clear and informative commit messages.
4. **Run Tests** : Ensure that all features are operational.
5. **Push to Your Fork** : Push your changes to your fork on GitHub.
6. **Submit a Pull Request** : Begin a pull request to the main repository and explain your changes.
7. **Review** : Await feedback from the maintainers and respond as necessary.
2023-10-24 09:22:26 +00:00
2023-10-25 14:38:20 +00:00
By contributing, you agree to our code of conduct and license terms.
2023-10-24 09:22:26 +00:00
## Authors and Contributors
2023-10-20 09:33:12 +00:00
2023-10-24 09:22:26 +00:00
- Glenn Y. Rolland - *Initial Work*
2023-10-20 09:33:12 +00:00
2023-10-24 09:22:26 +00:00
## Inspired By
2023-10-20 09:33:12 +00:00
2023-10-25 12:02:51 +00:00
- **Qasim**: A user-friendly FUSE manager. < https: // code . apps . glenux . net / glenux / qasim >
- **Sirikali**: A Qt/C++ GUI front-end for various FUSE filesystems like cryfs, gocryptfs, securefs, ecryptfs, and encfs. < https: // mhogomchungu . github . io / sirikali />
2023-10-20 09:33:12 +00:00
## License
2023-10-25 12:01:46 +00:00
GNU GPL-3
2023-10-25 12:02:51 +00:00