Usage
Installation
spsm can be installed using pip:
(.venv) $ pip install spsm
(.venv) $ spsm -v
Simple Python Server Manager, v0.1.2
Quick Start
Create a directory for your server
(.venv) $ mkdir my_server (.venv) $ cd my_server
Initialize the directory
(.venv) $ spsm init
Add a server jar and apply the new configuration
(.venv) $ spsm upsert -u [jar source url] server server_jar (.venv) $ spsm jars apply
Activate the server wrapper
(.venv) $ spsm server activate -a
5. Once in the interactive wrapper terminal, use the command start
to start the server.
help
can also be used to list available commands
spsm >> start
Note
Sometimes the output can be initially off by a line or two depending on the size of the terminal. Output can be scrolled up and down using the arrow keys
Note
The server will typically not successfully start the first time as you will have to update the
eula.txt
6. The interactive terminal can be exited without terminating the server using the exit
command
or by pressing CTRL+A CTRL+D
See also
The wrapper is managed using the screen
command.
see here for more information on screens.
Commands
spsm
spsm [OPTIONS] COMMAND [ARGS]...
Options
- -v, --version
Show the version and exit.
init
Inititialize the current directory as an spsm managed server
spsm init [OPTIONS]
list
Lists given resource
spsm list [OPTIONS] {jars|worlds}
Arguments
- RESOURCE
Required argument
spsm server
Server related commands
spsm server [OPTIONS] COMMAND [ARGS]...
activate
Activates the Minecraft server wrapper.
spsm server activate [OPTIONS]
Options
- -a, --attach
Immediately attach to the activated server
- -d, --debug
Toggles debug mode
console
Opens an interactive console to interact with the server
spsm server console [OPTIONS]
logs
Tail the latest log file.
spsm server logs [OPTIONS]
restart
Restarts the Minecraft Server
spsm server restart [OPTIONS]
send
Sends COMMAND to the Minecraft server Wrapper
spsm server send [OPTIONS] COMMAND
Arguments
- COMMAND
Required argument
start
Starts the Minecraft Server
spsm server start [OPTIONS]
status
Get the status of the server
spsm server status [OPTIONS]
stop
Stops the Minecraft Server
spsm server stop [OPTIONS]
spsm jars
Jarfile related commands
spsm jars [OPTIONS] COMMAND [ARGS]...
apply
apply the current state of jardata to the server
spsm jars apply [OPTIONS]
download
Downloads the jarfile for either all jars or the given jar based on its source URL
spsm jars download [OPTIONS]
Options
- -a, --all <all>
download all jars
- -j, --jar-name <jar_name>
name of a specific jar to download
upsert
Adds jar called JAR_NAME as a TYPE or updates it if it already exists
spsm jars upsert [OPTIONS] {server|plugin} JAR_NAME
Options
- -u, --source-url <source_url>
URL from which the jar will be downloaded
- -a, --apply
immediately apply the jardata after the upsert
Arguments
- TYPE
Required argument
- JAR_NAME
Required argument