Skip to Content
Documentation

Use Trestle from the command line

List, install, launch, and export Trestle instances from a terminal with the desktop command line.

The desktop packages include command-line operations. They use the same instances and accounts as the Trestle window, so they run only while the window is closed. Only one command runs at a time.

trestle --list
trestle --install <id-or-name>
trestle --launch <id-or-name>
trestle --export <id-or-name> [path]
trestle --help

You can refer to an instance by its ID or by its exact name. Names ignore letter case.

Commands

  • --list prints one line per instance: its ID, name, Minecraft version, mod loader, and installation state.
  • --install installs or repairs an instance and prints its download progress.
  • --launch starts an installed instance and writes the Minecraft output to the terminal.
  • --export writes a portable instance archive with Prism-compatible metadata. Without a path, Trestle writes <id>.zip to its exports folder.

Exit codes

--launch returns the exit code of the game process. Other codes mean that Trestle did not start the game:

CodeMeaning
1The command failed. Trestle prints the error.
2The command, instance, or installation state is not valid. For example, the instance is not installed yet.
3The instance cannot launch, for example because it has no account. Trestle lists what is missing.
75Trestle is already running, in a window or another command. Close it or wait, then try again.
130The launch was cancelled.

Find the command

  • Linux: the DEB and RPM packages add the trestle command. Run the AppImage with the command after its name, for example ./Trestle-<version>-linux-x64.AppImage --list. In the portable archive, run trestle/bin/Trestle.
  • Windows: run trestle-cli.exe in the Trestle install folder, by default %LOCALAPPDATA%\Trestle. It prints to the terminal and waits for the command to finish. Trestle.exe opens the window and does not print to the terminal.
  • macOS: run /Applications/Trestle.app/Contents/MacOS/Trestle.
Improve this page