Overview
LiquidLauncher exposes its backend functionality through Tauri commands that can be invoked from the frontend. These commands are organized into four main categories:- Authentication Commands - Handle Minecraft and LiquidBounce account authentication
- Client API Commands - Interact with the LiquidBounce API for builds, mods, and game launching
- Data Management Commands - Store and retrieve launcher configuration
- System Commands - Access system information and perform checks
Command Categories
Authentication
Commands for managing Minecraft and LiquidBounce accounts.Microsoft Login
Authenticate with a Microsoft account
Offline Login
Create an offline Minecraft account
Client Authentication
Authenticate with LiquidBounce account
Refresh Token
Refresh authentication tokens
Client API
Commands for interacting with the LiquidBounce API and managing the game client.Launch Client
Start the Minecraft client with LiquidBounce
Request Branches
Get available LiquidBounce branches
Request Builds
Get builds for a specific branch
Manage Mods
Install and manage custom mods
Data Management
Commands for managing launcher configuration and data.Options Management
Get and store launcher options
System
Commands for system information and checks.System Information
Get launcher version and system memory
Using Commands
All commands are invoked using Tauri’sinvoke function from the frontend:
Error Handling
All commands that can fail returnResult<T, String> on the Rust side, which translates to a Promise that can reject with a string error message:
Type Definitions
The Rust types used in commands are serialized to JSON when crossing the Tauri bridge:- Enums are serialized with a
typefield (e.g.,MinecraftAccount) - Structs become JavaScript objects with camelCase field names
- Options become
nullwhenNone, or the contained value whenSome - Results throw exceptions on
Err, or return the value onOk
Source Code Location
All Tauri commands are defined in:src-tauri/src/app/gui/commands/auth.rs- Authentication commandssrc-tauri/src/app/gui/commands/client.rs- Client API commandssrc-tauri/src/app/gui/commands/data.rs- Data management commandssrc-tauri/src/app/gui/commands/system.rs- System commands