{"id":22441210,"url":"https://github.com/kintsdev/automountify","last_synced_at":"2025-03-27T10:14:37.004Z","repository":{"id":266528257,"uuid":"898587527","full_name":"kintsdev/automountify","owner":"kintsdev","description":"Automountify is a Go-based CLI tool to format, mount disks, and update /etc/fstab for persistent mounting","archived":false,"fork":false,"pushed_at":"2024-12-04T18:00:24.000Z","size":155,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T14:45:35.510Z","etag":null,"topics":["go","golang","sre","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kintsdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-04T16:58:48.000Z","updated_at":"2024-12-04T18:03:47.000Z","dependencies_parsed_at":"2024-12-04T23:02:40.651Z","dependency_job_id":null,"html_url":"https://github.com/kintsdev/automountify","commit_stats":null,"previous_names":["kintsdev/automountify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kintsdev%2Fautomountify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kintsdev%2Fautomountify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kintsdev%2Fautomountify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kintsdev%2Fautomountify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kintsdev","download_url":"https://codeload.github.com/kintsdev/automountify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245823316,"owners_count":20678173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go","golang","sre","ubuntu"],"created_at":"2024-12-06T02:13:25.644Z","updated_at":"2025-03-27T10:14:36.998Z","avatar_url":"https://github.com/kintsdev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automountify\n\nAutomountify is a terminal-based utility written in Go that allows users to select a disk, format it with the `ext4` filesystem, create a mount point, assign permissions, and mount the disk. It also automatically updates the `/etc/fstab` file for persistent mounting.\n\nThis utility provides a simple, interactive interface using the `bubbletea` package for building TUI (Text User Interface) applications.\n\n## Features\n\n- **Disk Selection**: Displays available disks for formatting and mounting.\n- **Mount Point Setup**: Allows the user to input a custom mount point (e.g., `/mnt/data`).\n- **Permissions Setup**: Lets the user specify permissions (e.g., `0755`) for the mount point directory.\n- **Formatting**: Formats the selected disk with the `ext4` filesystem.\n- **Mounting**: Mounts the disk to the specified mount point.\n- **Persistent Mounting**: Adds the new mount entry to the `/etc/fstab` file to ensure it persists across reboots.\n- **Loading Indicator**: Displays a loading spinner during disk formatting and mounting.\n- **Error Handling**: Provides detailed error messages if any step fails.\n\n## Prerequisites\n\nBefore using this utility, ensure that you have the following installed:\n\n- **Go** (v1.18 or higher) - Go programming language environment\n- **sudo** privileges - Required for running commands like `mkfs.ext4`, `mount`, and updating `/etc/fstab`\n- **bubbletea** - A Go package for creating TUI applications\n  - Install it with the following:\n    ```bash\n    go get github.com/charmbracelet/bubbletea\n    ```\n\n## Installation\n\nTo install and run this utility:\n\n1. Clone this repository:\n    ```bash\n    git clone https://github.com/kintsdev/automountify.git\n    cd automountify\n    ```\n\n2. Install the necessary Go dependencies:\n    ```bash\n    go mod tidy\n    ```\n\n3. Build the application:\n    ```bash\n    go build -o automountify\n    ```\n\n4. Run the application:\n    ```bash\n    sudo ./automountify\n    ```\n\n\u003e **Note:** Running the program requires `sudo` privileges, as it performs system-level operations like formatting a disk and modifying the `/etc/fstab` file.\n\n## Usage\n\n1. **Select a Disk**: The program will list available disks. Use the arrow keys to select a disk and press Enter to proceed.\n2. **Enter Mount Point**: After selecting a disk, enter the mount point where the disk should be mounted (e.g., `/mnt/data`).\n3. **Enter Permissions**: Enter the permissions for the mount point directory (e.g., `0755`).\n4. **Format and Mount**: The program will format the disk with the `ext4` filesystem, create the mount point directory with the specified permissions, mount the disk, and update `/etc/fstab` for persistent mounting.\n5. **Completion**: Once the process is complete, a success message will be displayed, and you can press `q` to quit.\n\n### Example Usage\n\n![example](example.gif)\n\n\n## Error Handling\n\nThe program will display an error message if any step fails, such as if:\n\n- The disk cannot be formatted.\n- The mount point cannot be created.\n- The disk cannot be mounted.\n- There is an issue with updating `/etc/fstab`.\n\nThe error message will be shown in the `stateDone` step of the program.\n\n## Commands\n\n- **Enter**: Proceed with the selected action or input (e.g., format the disk, enter mount point).\n- **q**: Quit the program.\n\n\n## Contributing\n\nContributions are welcome! If you'd like to improve the utility, please fork the repository and create a pull request. Ensure that your code adheres to the project's coding standards and passes tests before submitting.\n\n1. Fork the repository.\n2. Create a new branch.\n3. Make your changes.\n4. Commit your changes with clear messages.\n5. Open a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkintsdev%2Fautomountify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkintsdev%2Fautomountify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkintsdev%2Fautomountify/lists"}