
Introducing WorldEditCLI and WorldEdit Golf
Updated on by Maddy Miller
Originally posted on
In Minecraft with tags Announcement, WorldEdit
566 words, 2 minutes to read
A typical task that people want to achieve with WorldEdit is to load in a schematic, replace a few blocks, and then save it again. With WorldEditCLI, this couldn't be easier!
https://madelinemiller.dev/blog/introducing-worldeditcli/A typical task that people want to achieve with WorldEdit is to load in a schematic, replace a few blocks, and then save it again. With WorldEditCLI, this couldn't be easier!
What is it?
WorldEditCLI is a command-line tool that enables running WorldEdit commands on a schematic file, without even having to boot up Minecraft! This initiative also allows for most WorldEdit commands to be run from the Minecraft server console. Gone are the days of having to join the server to perform some basic commands. WorldEditCLI only supports modern schematic at the current time, which are schem files created from 1.13 onwards.
WorldEditCLI is available from the EngineHub builds website and is named worldedit-cli-VERSION.jar.
What can it do?
WorldEditCLI can be used to modify a schematic file, batch modify multiple schematic files, and can even be used to create external programs that modify Minecraft worlds and schematics.
You can think of it as a way to integrate WorldEdit into another application. It would be possible to use WorldEditCLI and create a user interface for it, creating an external visual world editing program similar to the now-defunct MCEdit.
If you want to integrate WorldEditCLI into a project you're working on, feel free to reach out in the EngineHub Discord for some assistance.
How to use WorldEditCLI
WorldEditCLI is a Command Line Interface application. You use this through a command line, similar to the Minecraft server.
As it's a jar file, you run it using Java with java -jar worldeditcli.jar. Currently, it supports the file (-f filename) and script (-s scriptfile) arguments. If no filename is provided and the system supports it, a file browser dialogue will appear.
The script argument allows running a list of commands from a file, rather than entering them into the application. When the command stop is received, it shuts down.

Image transcript / description
Visible text
mm1@DESKTOP-N8A7L07 MINGW64 /c/workspaces/sk89q/worldEdit/worldedit-cli/build/libs (master)
$ java -jar worldedit-cli-7.1.0-SNAPSHOT-dist.jar
[16:09:18] [main/INFO]: WorldEdit CLI (version 7.1.0-SNAPSHOT) is loaded
[16:09:24] [main/INFO]: Got request to register class com.sk89q.worldedit.cli.CLIPlatform with WorldEdit [com.sk89q.worldedit.extension.platform.PlatformManager@69228e85]
[16:09:25] [main/INFO]: Registering commands with com.sk89q.worldedit.cli.CLIPlatform
//pos1 0,0,0
[16:09:31] [main/INFO]: First position set to (0, 0, 0).
//pos2 10,10,10
[16:09:35] [main/INFO]: Second position set to (10, 10, 10) (1331).
//replace cake air
[16:09:37] [main/INFO]: 0 block(s) have been replaced.
stop
[16:09:39] [main/INFO]: Stopping!
[16:09:39] [main/INFO]: Unregistering com.sk89q.worldedit.cli.CLIPlatform from WorldEditDescription
A wide screenshot of a terminal window with a black background and monospaced text, showing a command-line session running WorldEdit CLI from a Git Bash prompt. The top line shows the user/host and working directory, followed by the command to run a JAR file. Several timestamped INFO log lines appear, with some status messages highlighted in purple, indicating the CLI loading and registering commands. The user enters WorldEdit-style commands to set two positions (0,0,0 and 10,10,10), then runs a replace command and receives a message that zero blocks were replaced. The session ends with a typed “stop” command and final log lines indicating the platform is stopping and unregistering.
Batch Editing
As WorldEditCLI supports "script files", you can easily apply the same modification to a large number of schematics! You could use this to do anything from replacing all oak with spruce, to clearing entities.
A simple way to do this would be to use the POSIX find command. The following syntax would run worldeditcli.jar on every .schem file in the same directory, with the commands listed in commands.txt.
find . -maxdepth 1 -iname '*.schem' -type f -exec java -jar worldeditcli.jar -s "commands.txt" -f {} \;
Make sure to have your commands script end with stop so that it shuts down WorldEditCLI after it has run.
Planned Features
In the future, the goal of WorldEditCLI is to make large-scale changes to the Minecraft world in a fast and safe manner, without having to even start the game! This goal would allow removing all ores from the entire generated world without worrying about the Minecraft server's performance.
While it only supports schematics, the goal is to allow performing alterations directly to the Minecraft world, making the above goal relatively simple to accomplish.
WorldEdit Golf
To show off what WorldEditCLI can do, we've created WorldEdit Golf! Like CodeGolf and VimGolf, WorldEdit Golf is a competitive website where you can create and compete in challenges to turn one schematic into another with as few WorldEdit commands as possible.
If you're a builder looking for a server to work on, many server owners will be looking at WorldEdit Golf to find the best builders in the community, so have a go at some of the challenges.
WorldEdit Golf is now available at https://worldedit.golf/ and available for anyone to submit and compete in challenges!

Image transcript / description
Visible text
WorldEdit Golf
Switcheroo
Uploaded by Alex Barnier / @LordDeimos
Switch the cobble with the stone
Before
After
Commands
Help
Run
wizjany / @wizjany
13:13:34 Fri Sep 27 2019
1
/ @snowballbird
02:57:25 Thu Jun 18 2020
1
Maddy Miller / @me4502
23:04:50 Sun Sep 20 2020
1
Christopher Murray / @orthoplex64
04:16:40 Wed Sep 30 2020
1
Octavia Togami / @octylFractal
11:50:17 Tue Sep 03 2019
2
Mystiflow / @Mystiflow
05:33:36 Tue Sep 03 2019
3
Bennett Hardwick / @bennetthardwick
09:16:03 Tue Sep 03 2019
3
Andrew / @Inscrutable
21:15:31 Tue Sep 03 2019
3Description
A webpage titled “WorldEdit Golf” shows a challenge page named “Switcheroo,” with a short instruction line and two side-by-side preview images labeled “Before” and “After.” Each preview depicts a small 3D Minecraft-style block cross made of gray stone and cobblestone, with a blue download button beneath each image. Below the previews is a large empty “Commands” text area with “Help” and a blue “Run” button underneath. On the right side, a vertical purple sidebar lists user entries with small avatar squares, usernames/handles, timestamps, and large white numbers indicating scores or ranks.



