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 --helpYou can refer to an instance by its ID or by its exact name. Names ignore letter case.
Commands
--listprints one line per instance: its ID, name, Minecraft version, mod loader, and installation state.--installinstalls or repairs an instance and prints its download progress.--launchstarts an installed instance and writes the Minecraft output to the terminal.--exportwrites a portable instance archive with Prism-compatible metadata. Without a path, Trestle writes<id>.zipto its exports folder.
Exit codes
--launch returns the exit code of the game process. Other codes mean that Trestle did not start the game:
| Code | Meaning |
|---|---|
| 1 | The command failed. Trestle prints the error. |
| 2 | The command, instance, or installation state is not valid. For example, the instance is not installed yet. |
| 3 | The instance cannot launch, for example because it has no account. Trestle lists what is missing. |
| 75 | Trestle is already running, in a window or another command. Close it or wait, then try again. |
| 130 | The launch was cancelled. |
Find the command
- Linux: the DEB and RPM packages add the
trestlecommand. Run the AppImage with the command after its name, for example./Trestle-<version>-linux-x64.AppImage --list. In the portable archive, runtrestle/bin/Trestle. - Windows: run
trestle-cli.exein the Trestle install folder, by default%LOCALAPPDATA%\Trestle. It prints to the terminal and waits for the command to finish.Trestle.exeopens the window and does not print to the terminal. - macOS: run
/Applications/Trestle.app/Contents/MacOS/Trestle.