Metadata-Version: 2.4
Name: MinecraftDockerCLI
Version: 0.1.1
Summary: CLI tool to enhance and simplify containerization of Minecraft servers
License: MIT
License-File: LICENSE
Keywords: minecraft,docker,server
Author: Dtar380
Maintainer: Dtar380
Requires-Python: >=3.13,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Other Audience
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: System :: Installation/Setup
Requires-Dist: click (>=8.3.0,<9.0.0)
Requires-Dist: importlib-resources (>=6.5.2,<7.0.0)
Requires-Dist: inquirerpy (>=0.3.4,<0.4.0)
Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
Requires-Dist: psutil (>=7.1.3,<8.0.0)
Requires-Dist: yaspin (>=3.3.0,<4.0.0)
Project-URL: Bug Tracker, https://github.com/Dtar380/Minecraft-Dockerfile-CLI/issues
Project-URL: Documentation, https://github.com/dtar380/Minecraft-Dockerfile-CLI
Project-URL: Homepage, https://github.com/dtar380/Minecraft-Dockerfile-CLI
Project-URL: Repository, https://github.com/dtar380/Minecraft-Dockerfile-CLI
Description-Content-Type: text/markdown

# MinecraftDockerCLI
## Set up your Minecraft network blazingly fast

<div align="center">
    <img alt="license" title="License" src="https://custom-icon-badges.demolab.com/github/license/Dtar380/MinecraftDockerCLI?style=for-the-badge&logo=law&logoColor=white&labelColor=1155BA&color=236AD3" height=30>
    <img alt="stars" title="stars" src="https://custom-icon-badges.demolab.com/github/stars/Dtar380/MinecraftDockerCLI?style=for-the-badge&logo=star&logoColor=white&label=STARS&labelColor=9133D4&color=A444E0" height=30>
    <img alt="downloads" title="downloads" src="https://custom-icon-badges.demolab.com/pypi/dm/MinecraftDockerCLI?style=for-the-badge&logo=download&logoColor=white&label=Downloads&labelColor=488207&color=55960C" height=30>
    <img alt="Visitors" title="Visitors" src="https://viewcounterpython.onrender.com/Dtar380/MinecraftDockerCLI">
    <img alt="open issues" title="open issues" src="https://custom-icon-badges.demolab.com/github/issues/Dtar380/MinecraftDockerCLI?style=for-the-badge&logo=issue-opened&logoColor=white&label=open%20issues&labelColor=CE4630&color=E05D44" height=30>
</div>

**MinecraftDockerCLI** is a python CLI application to allow minecraft server admins to set up in a fast and easy way a server or a network using docker containers.
**MinecraftDockerCLI** is orientated towards minecraft server admins that administrate networks, since a single server cannot fully use the advantages of Docker containers. Docker containers make minecraft networks easier and cleaner because of how docker containers work and intercomunicate on the same machine.

## **Installation**

**Prerequisites:**
- Docker Engine (Docker Desktop on Windows) running and configured.
- Docker Compose (bundled with modern Docker Desktop installations).
- Python 3.13+ and `pip`.

**Recommended Installation:**

```shell
# Create a Virtual Environment
python3 -m venv .venv
.\.venv\Scripts\Activate.ps1

# Install the python package
pip install MinecraftDockerCLI
```
<br>

**Clone repo:**

Extra requirement: `Poetry`.

```shell
# Clone the repository
git clone https://github.com/Dtar380/Minecraft-Dockerfile-CLI.git
cd Minecraft-Dockerfile-CLI

poetry install
```

> [!NOTE]
> When running the program you would need to be using the poetry environment and run it like `poetry run MinecraftDockerCLI`

## **Usage**

To use this app you simply need to type `MinecraftDockerCLI` in your terminal followed by the command you want to execute and the options you want to use.

> [!WARNING]
> To ensure the app runs correctly, make sure the ENV you installed the app to is activated and that you are on the folder of your server project.

### **Builder commands**
Create:
- Help: Create all files for the containerization.
- Description: This command will ask the user with prompts everything to build a docker-compose.yml and .envs for all the services the user will run. Running this command on a existing project will overwrite the files.
- Arguments:
    - --network: Flag for creating network insteat of single server (required)

Update:
- Help: Update the contents of the containers.
- Description: This command will either delete a service or add a service with the same method as Create.
- Arguments:
    - --add: Flag to state the addition of a service.
    - --remove: Flag to state the removal of a service.
    - --service: Parameter to specify the name of the service.

Build:
- Help: Build the files for the containerization.
- Description: This command will build the files based on `data.json` in case they were not built when running create.

> [!NOTE]
> None of the Builder commands will build nor start the containers.

### **Manager commands**
Backup:
- Help: Create a backup of the containers.
- Description: This command will create a backup of every service in a tar file with the format `{service_name}_{date}.tar.gz` inside a `.backup` directory.

Up:
- Help: Set up the containers and start them.
- Arguments:
    - --detached: Flat to run the containers in detached mode.

Down:
- Help: Stop the containers and delete them.
- Arguments:
    - --rm-volumes: Flag to remove volumes.

> [!WARNIGN]
> Running Up will overwrite the inside volumes of the container with host ones and down with --rm-files will remove the volumes inside the containers, make sure to create a backup and replace the files on host with the backups every time.

Start:
- Help: Start the containers.
- Description: This command will

Stop:
- Help: Stop the containers.
- Description: This command will

## **Tips & Troubleshooting**
- Ensure Docker Desktop is running and you can run `docker ps` without errors before invoking the CLI.
- On Windows, run PowerShell as Administrator or ensure your user has permissions for Docker.
- If `data.json` is missing, run `builder create` first to scaffold services.

## **Kown Issues**
There is no known issues on the project, you can submit yours to [issues](https://github.com/Dtar380/MinecraftDockerCLI/issues/new/choose).

## **License**
This project is distributed under the MIT license.
See the [LICENSE](LICENSE).

## **Sponsorship**
You can support me and the project with a donation to my Ko-Fi.

