CLI mode
Run SoulFire from a terminal for automation, SSH, or a server without a desktop.
When to use the CLI
If you are not familiar with command-line tools, start with Connect your first bot.
Use the CLI for terminal automation, SSH sessions, or computers without a desktop. The desktop app has more features, but the CLI covers the most common tasks.
Set up the CLI
Install Java 25, then download the SoulFire CLI .jar from the download page.
The commands below use SoulFireCLI.jar; replace it with your downloaded filename.
Save the JVM flags in a shell variable so that the later commands stay short:
SF_JVM_FLAGS="-Djava.awt.headless=true -Xmx2G -XX:+EnableDynamicAgentLoading -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UseCompactObjectHeaders -XX:+AlwaysActAsServerClassMachine -XX:+UseNUMA -XX:+UseFastUnorderedTimeStamps -XX:+UseVectorCmov -XX:+UseCriticalJavaThreadPriority -Dsf.flags.v2=true"The base command is this:
java $SF_JVM_FLAGS -jar SoulFireCLI.jarThis syntax is for Bash and similar shells. In another shell, put the flags in place of $SF_JVM_FLAGS.
| Flag | Purpose |
|---|---|
-Djava.awt.headless=true | Runs Java without a display |
-Xmx2G | Sets the memory limit for the CLI process |
-XX:... flags | Performance tuning |
-Dsf.flags.v2=true | Confirms that you set the tuning flags. It hides the startup warning and does not apply the flags itself. |
Change -Xmx2G to fit your workload.
If you omit -Xmx, Java uses up to 25% of the total system memory.
When the bots run on a remote server, -Xmx1G is usually enough for the local CLI.
By default, the CLI starts its own SoulFire server on your computer, and the bots run there. In that case, continue to CLI flags. To use a remote dedicated server instead, set these JVM properties:
| Property | Description |
|---|---|
sf.remoteAddress | The server host and port, such as host:38765. The port defaults to 38765. |
sf.remoteToken | An API token for the server. See Server access. |
Put the properties before -jar:
java -Dsf.remoteAddress=soulfire.example.com:38765 -Dsf.remoteToken=YOUR_API_TOKEN $SF_JVM_FLAGS -jar SoulFireCLI.jarThe token appears in your shell history and in the process list.
On a shared machine, read it from a file instead, for example -Dsf.remoteToken="$(cat token.txt)".
CLI flags
After the CLI connects, it gets the available flags from the server. See CLI flags for the full list.
This example imports accounts and starts the bots:
java $SF_JVM_FLAGS -jar SoulFireCLI.jar \
--account-file accounts.txt \
--account-type OFFLINE \
--bot-address 127.0.0.1:25565 \
--bot-protocol-version "RELEASE|777" \
--bot-join-delay-min 1000 \
--bot-join-delay-max 3000 \
--startThe command imports the accounts in accounts.txt and connects them to 127.0.0.1:25565.
It starts each bot after a random delay of one to three seconds.
RELEASE|777 is the ID of Minecraft 26.3. Find other IDs in supported versions.
Keep the quotes, because | has a meaning in the shell.
Terminal flags
Set -Dterminal.jline=true or -Dterminal.jline=false to enable or disable the interactive terminal.
The interactive terminal uses JLine, the same library used by Minecraft and Velocity.
Set -Dterminal.ansi=true or -Dterminal.ansi=false to enable or disable terminal colors.
Importing data
Use --account-file with --account-type to import accounts, and --proxy-file to import proxies.
You must select an account type when you import accounts. See account formats for the values.
The proxy type is optional. SoulFire treats the file as a universal proxy file when you omit the type.
Run commands
The interactive shell accepts the same commands as GUI mode. See the command reference for details.
Last updated on
Was this page helpful?
