{"id":18860976,"url":"https://github.com/alvesvaren/mccli","last_synced_at":"2025-06-10T14:37:54.712Z","repository":{"id":53480031,"uuid":"307849316","full_name":"alvesvaren/mccli","owner":"alvesvaren","description":"Command-line interface to manage multiple (or one) Minecraft server on a Linux system.","archived":false,"fork":false,"pushed_at":"2021-03-29T19:01:34.000Z","size":201,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T12:53:22.406Z","etag":null,"topics":["automation","cli","command-line-interface","minecraft","minecraft-server","minecraft-server-software","minecraft-server-wrapper","paper","papermc","spigot","vanilla-minecraft"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvesvaren.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":"2020-10-27T23:03:36.000Z","updated_at":"2023-07-17T08:02:49.000Z","dependencies_parsed_at":"2022-08-18T01:46:02.002Z","dependency_job_id":null,"html_url":"https://github.com/alvesvaren/mccli","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvesvaren%2Fmccli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvesvaren%2Fmccli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvesvaren%2Fmccli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvesvaren%2Fmccli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvesvaren","download_url":"https://codeload.github.com/alvesvaren/mccli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvesvaren%2Fmccli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259093635,"owners_count":22804209,"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":["automation","cli","command-line-interface","minecraft","minecraft-server","minecraft-server-software","minecraft-server-wrapper","paper","papermc","spigot","vanilla-minecraft"],"created_at":"2024-11-08T04:27:25.951Z","updated_at":"2025-06-10T14:37:54.650Z","avatar_url":"https://github.com/alvesvaren.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mccli\n\nThis is a small program and library that makes it much easier to manage minecraft servers on GNU/Linux (and probably other) OSes. It provides some easy to use commands that allows you to for example, upgrade the server binary, create a new server or change the server port etc. just with one command. It also makes it easy to attach to the server console from the command line.\n\n## Install\n\nBefore installing, make sure the dependencies are installed.\n\n```bash\n# Ubuntu/Debian:\nsudo apt install python3-libtmux python3-dbus python3-requests dbus-user-session tmux python3-pip\n# You would probably want a java runtime too: \nsudo apt install openjdk-11-jre-headless\n\n# Arch:\nsudo pacman -S python-libtmux python-dbus python-requests\n# JRE: jre-openjdk-headless\n```\n\nThen just follow these steps for a standard installation:\n\n```bash\nsudo useradd minecraft\nsudo mkdir /home/minecraft \u0026\u0026 sudo chown minecraft:minecraft /home/minecraft\nsudo mkdir /opt/mccli \u0026\u0026 sudo chown minecraft:minecraft /opt/mccli\nsudo -u minecraft git clone https://github.com/alvesvaren/mccli.git /opt/mccli\ncd /opt/mccli\nsudo ./install.sh\n```\n\n## Update\n\n```bash\ncd /opt/mccli\nsudo ./update.sh\n```\n\n\u003e **Note:** If upgrading from 0.0.14 or earlier, run `sudo systemctl disable /etc/systemd/system/minecraft-server@.service` and `sudo rm /usr/bin/mccli` before upgrading\n\n\u003e **Another note:** If upgrading from between 0.1.6 and 0.1.9, you might need to run `sudo -u minecraft git reset --hard origin/master` and then re-run the script `./update.sh`\n\n## Usage\n\n### Basic usage\n\n```bash\nmccli create servername\nmccli enable --now servername\nmccli console servername\n```\n\n### All available commands\n\n| Command + arguments                                         | Description                                                                                | Example                                   |\n| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------- |\n| `mccli create [name] [--provider {vanilla,papermc,spigot}]` | Creates a new server                                                                       | `mccli create example --provider vanilla` |\n| `mccli update \u003cname\u003e [--provider {vanilla,papermc,spigot}]` | Change the server jar version                                                              | `mccli update example --provider papermc` |\n| `mccli status \u003cname\u003e`                                       | Shows the current (systemd) status for the specified server                                | `mccli status example`                    |\n| `mccli start \u003cname\u003e`                                        | Starts the specified server using systemd                                                  | `mccli start example`                     |\n| `mccli stop \u003cname\u003e`                                         | Stops the specified server using systemd                                                   | `mccli stop example`                      |\n| `mccli enable [--now] \u003cname\u003e`                               | Enable automatic starting of the server (on reboot). If called with `--now`, also start it | `mccli enable --now example`              |\n| `mccli disable [--now] \u003cname\u003e`                              | Disable automatic starting of the server. If called with `--now`, also stop it             | `mccli disable --now example`             |\n| `mccli restart \u003cname\u003e`                                      | Restart the server                                                                         | `mccli restart example`                   |\n| `mccli attach \u003cname\u003e`                                       | Attach to the server console. To detach, Press **_Ctrl+b_ followed by _d_**                | `mccli attach example`                    |\n| `mccli run \u003cname\u003e \u003ccommand\u003e`                                | Send the specified command to the server (using tmux send-keys)                            | `mccli run example say Hello everyone!`   |\n| `mccli runner [--tmux] \u003cname\u003e`                              | Run the specified server in this tty. If called with `--tmux`, starts in a tmux session    | `mccli runner example`                    |\n| `mccli list`                                                | List all running servers (that has an active tmux session) and their version               | `mccli list`                              |\n| `mccli modify [--file] \u003cname\u003e \u003ckey\u003e \u003cvalue\u003e`                | Modify the _server.properties_ file (if no other was specified).                           | `mccli modify example server-port 25566`  |\n| `mccli`                                                     | Shows the version and usage of mccli                                                       | `mccli`                                   |\n\n\u003e **Note:** You can run any command with the argument _-h_ to show the usage for that specific command\n\n## Help! My server doesn't start!\n\nYou are probably using the wrong java version or you are missing some dependency. Try running the server using `mccli runner \u003cname\u003e` and see why it errors out.\n\n## Develop\n\n\u003e This is sort of broken right now but it should work after you've installed mccli at least once using the \"Install\" instructions\n\n1. Clone the repository wherever you'd like\n2. `cd mccli`\n3. ```bash\n   git checkout dev\n   python -m venv env\n   source env/bin/activate\n   pip install -r requirements.txt\n   ```\n4. Make sure the mccli binary is correct (`whereis mccli` should return something that's in this repository)\n\n## Project status\n\n### Planned features:\n\n-   [x] Code to interface with server files\n    -   [x] Vanilla support\n    -   [x] Paper support\n    -   [x] Waterfall support\n-   [x] Code to manage virtual console sessions (for example tmux)\n-   [x] Systemd service (template) to start minecraft servers\n-   [x] Code to manage systemd service\n-   [ ] Backup system (both automatic and manual)\n-   [ ] LXC (or possibly systemd-nspawn) support for running the servers in separate file systems (safer and easier to backup)\n-   [ ] Colors when running some commands\n\n### Other features that I might add in the future\n\n-   [ ] Web interface\n-   [ ] Spigot/Buildtools support\n-   [ ] Bungeecord support\n-   [ ] SSH server that just handles mccli\n    -   [ ] Client that can communicate using said ssh server\n-   [ ] REST api for use with some sort of client\n-   [ ] Command scheduling (you could probably do this with crontab already)\n-   [ ] FTP server\n-   [ ] Access policies to manage user access to different servers\n-   [ ] Automatic port forwarding using UPnP\n-   [ ] YML file support when using modify command\n-   [ ] Plugin manager\n-   [ ] CLI autocompletion\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvesvaren%2Fmccli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvesvaren%2Fmccli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvesvaren%2Fmccli/lists"}