Command line#

The mciwb command starts and stops a Minecraft server, runs build scripts against it, backs up and restores its world, and renders regions of it to images. This page is generated from the command’s own help, the same text that mciwb --help and mciwb COMMAND --help print.

Every command that talks to the server takes the RCON password from --password, else --password-file, else the MCIWB_PASSWORD environment variable, else the default (default_pass).

Minecraft Interactive World Builder

Usage:

$ mciwb [OPTIONS] COMMAND [ARGS]...

Options:

  • --version: Print the version of mciwb and exit

  • --help: Show this message and exit.

Commands:

  • shell: Start an interactive iPython shell with a…

  • run: Run a Python build script against your…

  • start: Start a minecraft server in the background.

  • stop: Stop the minecraft server started by…

  • backup: Backup the current state of the world.

  • restore: Restore the world from a backup, stopping…

  • render: Render a region of the world to a PNG…

mciwb shell#

Start an interactive iPython shell with a predefined world object connected to your Minecraft server.

Usage:

$ mciwb shell [OPTIONS]

Options:

  • --server <str>: [default: localhost]

  • --port <int>: [default: 20100]

  • --password, --passwd <str>: the RCON password, which other users can see with ps: prefer --password-file or $MCIWB_PASSWORD [default: $MCIWB_PASSWORD, else default_pass]

  • --password-file, --passwd-file <path>: a file holding the RCON password on its first line; make it private with chmod 600

  • --player <str>

  • --debug / --no-debug: [default: no-debug]

  • --test / --no-test: [default: no-test]

  • --help: Show this message and exit.

mciwb run#

Run a Python build script against your Minecraft server, then exit.

The script runs with the same names available as in mciwb shell: a world object connected to the server, plus everything in mciwb.imports (Item, Vec3, Direction, polygon …). Background monitors are stopped when the script ends.

Usage:

$ mciwb run [OPTIONS] {script}

Arguments:

  • script: the Python script to run [required]

Options:

  • --server <str>: [default: localhost]

  • --port <int>: [default: 20100]

  • --password, --passwd <str>: the RCON password, which other users can see with ps: prefer --password-file or $MCIWB_PASSWORD [default: $MCIWB_PASSWORD, else default_pass]

  • --password-file, --passwd-file <path>: a file holding the RCON password on its first line; make it private with chmod 600

  • --player <str>

  • --debug / --no-debug: [default: no-debug]

  • --help: Show this message and exit.

mciwb start#

Start a minecraft server in the background. Default options automatically work with mciwb shell.

The server runs the Minecraft Java Edition release given by --minecraft-version. Your Minecraft client must use the same release.

If the server’s container already exists, it is started with the settings that it was created with. Run mciwb stop first to change them.

Usage:

$ mciwb start [OPTIONS]

Options:

  • --password, --passwd <str>: the RCON password, which other users can see with ps: prefer --password-file or $MCIWB_PASSWORD [default: $MCIWB_PASSWORD, else default_pass]

  • --password-file, --passwd-file <path>: a file holding the RCON password on its first line; make it private with chmod 600

  • --world-type <str>: [default: normal]

  • --server-name <str>: [default: mciwb-server]

  • --folder <path>: [default: ~/mciwb-server]

  • --port <int>: [default: 20100]

  • --minecraft-version <str>: [default: 26.3]

  • --debug / --no-debug: [default: no-debug]

  • --help: Show this message and exit.

mciwb stop#

Stop the minecraft server started by mciwb start and remove its container.

The server folder and its world are kept, so mciwb start with the same --folder brings the world back in a new container.

Usage:

$ mciwb stop [OPTIONS]

Options:

  • --server-name <str>: [default: mciwb-server]

  • --debug / --no-debug: [default: no-debug]

  • --help: Show this message and exit.

mciwb backup#

Backup the current state of the world.

If the server is running, it saves the world to disk and pauses saving while the backup is made. Use the --port and --password that you gave to mciwb start.

Usage:

$ mciwb backup [OPTIONS]

Options:

  • --folder <path>: [default: ~/mciwb-server]

  • --backup-name <str>

  • --backup-folder <path>: [default: ~/mciwb-backups]

  • --port <int>: [default: 20100]

  • --password, --passwd <str>: the RCON password, which other users can see with ps: prefer --password-file or $MCIWB_PASSWORD [default: $MCIWB_PASSWORD, else default_pass]

  • --password-file, --passwd-file <path>: a file holding the RCON password on its first line; make it private with chmod 600

  • --debug / --no-debug: [default: no-debug]

  • --help: Show this message and exit.

mciwb restore#

Restore the world from a backup, stopping and restarting the server.

Use the same options that you gave to mciwb start.

Usage:

$ mciwb restore [OPTIONS] [backup_name]

Arguments:

  • backup_name: defaults to the latest backup

Options:

  • --debug / --no-debug: [default: no-debug]

  • --folder <path>: [default: ~/mciwb-server]

  • --backup-folder <path>: [default: ~/mciwb-backups]

  • --server-name <str>: [default: mciwb-server]

  • --port <int>: [default: 20100]

  • --password, --passwd <str>: the RCON password, which other users can see with ps: prefer --password-file or $MCIWB_PASSWORD [default: $MCIWB_PASSWORD, else default_pass]

  • --password-file, --passwd-file <path>: a file holding the RCON password on its first line; make it private with chmod 600

  • --world-type <str>: [default: normal]

  • --minecraft-version <str>: [default: 26.3]

  • --keep-old / --no-keep-old: keep the replaced world folder as /world-old [default: no-keep-old]

  • --help: Show this message and exit.

mciwb render#

Render a region of the world to a PNG image, to see what you built.

Give the region as two corners, or as --centre and --size. Blocks are read from the world files in --folder (after asking a running server to save), or over RCON one block at a time (with --rcon, or when --folder has no world): use the --port and --password that you gave to mciwb start.

Usage:

$ mciwb render [OPTIONS] [corners]...

Arguments:

  • corners...: two opposite corners of the region: X1 Y1 Z1 X2 Y2 Z2

Options:

  • --centre <int int int>...: the centre of the region, with --size

  • --size <int int int>...: the size of the region in blocks, with --centre

  • --view <str>: repeat for several views: top, south, north, east, west, iso, iso_se, iso_ne, iso_nw, iso_sw

  • --output <path>: the PNG file to write [default: render.png]

  • --scale <int>: pixels per block (default: automatic)

  • --labels / --no-labels: add titles and world coordinate labels [default: labels]

  • --folder <path>: the server folder, as for mciwb start [default: ~/mciwb-server]

  • --rcon / --no-rcon: read blocks over RCON, not from the world files [default: no-rcon]

  • --port <int>: [default: 20100]

  • --password, --passwd <str>: the RCON password, which other users can see with ps: prefer --password-file or $MCIWB_PASSWORD [default: $MCIWB_PASSWORD, else default_pass]

  • --password-file, --passwd-file <path>: a file holding the RCON password on its first line; make it private with chmod 600

  • --debug / --no-debug: [default: no-debug]

  • --help: Show this message and exit.