This is a command-line interface (CLI) tool that interacts with a MCConsoleAPI to start and stop servers, as well as list running servers.
- Install Python 3.11+
- Clone (or download) the repo:
git clone https://github.com/Column01/MCConsoleCLI && cd MCConsoleCLI - Install with pip:
python -m pip install .
-
Edit the
config.jsonfile inside the CLI directory and enter the url and port for your API server -
Create an
api_key.txtfile in the same directory as the script and place your API key in it as a single line of text.
To use the CLI tool, you can run the main script with the following command:
mcc-cli <command> [server_name] [server_path]-
start: Start a server with the specified server name and optional server path.server_name: Required argument specifying the name of the server to start.server_path: Optional argument specifying the path of the server to start.
-
stop: Stop a server with the specified server name.server_name: Required argument specifying the name of the server to stop.
-
list: List all running servers. -
attach: Starts an instance of the (WIP) terminal UI
Start a server:
mcc-cli start my_server /path/to/serverStop a server:
mcc-cli stop my_serverList running servers:
mcc-cli listStart the (wip) terminal UI:
mcc-cli attach