Skip to main content
Prism Launcher provides extensive command-line interface (CLI) support for automation, scripting, and advanced workflows.

Synopsis

prismlauncher [OPTIONS] [URL...]

Basic Options

Help and Version

--help
flag
default:"false"
Display help text and exit
prismlauncher --help
--version
flag
default:"false"
Display program version and exit
prismlauncher --version
Shows the launcher version, Git commit hash, and build information.

Data Directory

--dir
string
-d
string
Use a custom directory as the application root
Linux/macOS
prismlauncher --dir /path/to/data
Windows
prismlauncher.exe --dir "C:\PrismData"
Special value:
Use current directory
prismlauncher --dir .
This overrides the PRISMLAUNCHER_DATA_DIR environment variable and the default data directory location.

Instance Management

Launching Instances

--launch
string
-l
string
Launch the specified instance by its ID
prismlauncher --launch "MyInstance"
The instance ID is typically the folder name in your instances directory.
The launcher window will open and the instance will start automatically. Use with --server or --world to join specific servers or worlds.
--show
string
Open the window for the specified instance without launching it
prismlauncher --show "MyInstance"
This opens the instance window, allowing you to configure settings before launch.

Launch Modifiers

These options modify how instances are launched and must be used in combination with --launch.
--server
string
-s
string
Join the specified server on launch
prismlauncher --launch "MyInstance" --server "mc.hypixel.net"
For servers with custom ports:
prismlauncher --launch "MyInstance" --server "example.com:25565"
Only valid in combination with --launch. Using without --launch will result in an error.
--world
string
-w
string
Join the specified world on launch (singleplayer)
prismlauncher --launch "MyInstance" --world "My Survival World"
The world name must match exactly as it appears in the saves folder.
Requires Minecraft 1.20+ with quick play support. Only valid with --launch.

Account Selection

--profile
string
-a
string
Use the account specified by its profile name
prismlauncher --launch "MyInstance" --profile "PlayerName"
The profile name is shown in the Accounts page of the launcher.
Only valid in combination with --launch.
--offline
string
-o
string
Launch in offline mode with the specified player name
prismlauncher --launch "MyInstance" --offline "Steve"
This bypasses authentication and launches without a valid account. Only valid with --launch.

Resource Import

--import
string
-I
string
Import instance or resource from specified local path or URL
Local file
prismlauncher --import "/path/to/modpack.zip"
URL
prismlauncher --import "https://example.com/modpack.mrpack"
Multiple imports
prismlauncher --import "pack1.zip" --import "pack2.mrpack"
Supported formats:
  • .mrpack - Modrinth modpacks
  • .zip - CurseForge, ATLauncher, Technic modpacks
  • Modrinth URLs
  • CurseForge URLs

Positional URL Arguments

You can also specify URLs as positional arguments (equivalent to --import):
prismlauncher "https://modrinth.com/modpack/example"
Multiple URLs
prismlauncher "url1" "url2" "url3"

Utility Options

--alive
flag
default:"false"
Write a small live.check file after the launcher starts
prismlauncher --alive
This creates a file that can be used by external scripts to verify the launcher started successfully.The file location is in the data directory and contains the application ID.

Complete Examples

Basic Launch Scenarios

prismlauncher --launch "FTB Infinity Evolved"

Advanced Workflows

prismlauncher --dir "/mnt/games/minecraft" --launch "Survival"

Automation Scripts

#!/bin/bash
LOG_FILE="$HOME/minecraft-launch.log"
echo "[$(date)] Launching instance" >> "$LOG_FILE"
prismlauncher --launch "MyInstance" >> "$LOG_FILE" 2>&1

Desktop Shortcuts

Create desktop shortcuts for quick instance launching:
[Desktop Entry]
Type=Application
Name=Launch Minecraft Server
Exec=prismlauncher --launch "ServerInstance" --server "mc.example.com"
Icon=prismlauncher
Terminal=false
Categories=Game;

Error Handling

Exit Codes

0
exit code
Success - Launcher started or command completed successfully
1
exit code
Failure - Syntax error, configuration error, or unexpected errorCommon causes:
  • Invalid command-line arguments
  • Instance not found
  • Data directory inaccessible
  • Missing required options (e.g., --server without --launch)

Common Errors

--server, --profile and --offline can only be used in combination with --launch!

Instance Communication

When a Prism Launcher instance is already running:
  1. New commands are forwarded to the existing instance
  2. The new process exits after forwarding the command
  3. The existing launcher window handles the request
This allows:
  • Launching multiple instances from scripts
  • Importing resources while launcher is open
  • Remote control via command-line
Example: Import while launcher is running
# Launcher is already open
prismlauncher --import "newmodpack.mrpack"
# Command is forwarded, import dialog appears in existing window

Platform-Specific Notes

Linux AppImage

When running from AppImage:
./PrismLauncher.AppImage --launch "MyInstance"
The $APPIMAGE environment variable is automatically set and used for updates.

Windows Portable

For portable installations:
prismlauncher.exe --dir "."
Or create a portable.txt file in the launcher directory.

macOS Bundle

Access the binary inside the app bundle:
/Applications/Prism\ Launcher.app/Contents/MacOS/prismlauncher --launch "Instance"
Or use open:
open -a "Prism Launcher" --args --launch "MyInstance"

Integration Examples

Game Server Management

Launch on server start
#!/bin/bash
# server-start.sh
prismlauncher --launch "AdminClient" --server "localhost:25565" &
./start-minecraft-server.sh

Mod Testing Workflow

#!/bin/bash
# test-mod.sh
MOD_FILE="$1"
TEST_INSTANCE="ModTesting"

# Copy mod to instance
cp "$MOD_FILE" "$HOME/.local/share/PrismLauncher/instances/$TEST_INSTANCE/minecraft/mods/"

# Launch instance
prismlauncher --launch "$TEST_INSTANCE"

Automated Modpack Updates

#!/bin/bash
# update-modpacks.sh
for pack in pack1.mrpack pack2.mrpack pack3.mrpack; do
    echo "Importing $pack..."
    prismlauncher --import "$pack"
    sleep 2
done

Debugging

Enable verbose logging:
Linux/macOS
export QT_LOGGING_RULES="*.debug=true"
prismlauncher --launch "MyInstance"
Windows
$env:QT_LOGGING_RULES="*.debug=true"
prismlauncher.exe --launch "MyInstance"

Limitations

  • Interactive operations (like account login) cannot be automated via CLI
  • Instance names with spaces must be quoted
  • Some operations require the GUI (e.g., initial setup wizard)
  • World names must match exactly (case-sensitive)