Desktop app for storing Riot accounts and automating Riot Client login/switch flow on Windows.
lswitch is a Wails application with a Go backend and React frontend. It solves the repetitive process of:
- closing running League client processes
- opening Riot Client
- clicking Riot UI elements in sequence
- typing account credentials automatically
- relaunching League after login
The app keeps accounts in a local SQLite database and lets users trigger automation from a simple desktop UI.
- Wails v2 (desktop shell + Go/JS bridge)
- Go (backend logic, database layer, Windows automation)
- React + TypeScript (frontend)
- TailwindCSS v4 (UI styling)
- SQLite via
modernc.org/sqlite(local account storage) - Win32 API calls (
user32.dll) for window detection, click posting, and key input - Vite (frontend tooling)
When the user clicks Log In, the frontend calls StartV1 with automation options and selected account credentials.
Backend flow:
- Kill
LeagueClientUx.exeandLeagueClient.exeif running. - Start Riot Client from
C:\Riot Games\Riot Client\RiotClientServices.exe. - Wait until a visible window containing
Riot Clientis found. - Convert configured grid cells to click points.
- Send click events and credential characters through window messages.
- Launch League with Riot client service arguments.
Automation uses a logical N x N grid over the Riot Client window (GridSize, default 30).
- Coordinates are
col,rowand are1-based. - Each coordinate maps to the center of that grid cell.
- This makes clicks resolution-independent as long as the Riot UI layout is consistent.
Configured targets:
Click1,Click2: pre-login UI clicks (for account/logout navigation)LoginUserCell: username fieldLoginPassCell: password fieldLoginButtonCell: sign-in button
- Frontend calls Go methods through Wails bindings (
frontend/wailsjs/go/main/App.*). - Account CRUD methods persist data in SQLite.
- Backend logs are emitted as Wails events (
app:log) and streamed live in the UI log panel.
- Windows (automation backend is Windows-only)
- Go
1.23+ - Node.js
18+and npm - Wails CLI v2
- Installed Riot Client in default path:
C:\Riot Games\Riot Client\RiotClientServices.exe
Install Wails CLI:
go install github.com/wailsapp/wails/v2/cmd/wails@latestcd frontend
npm install
cd ..From repository root:
wails devwails build- Start the app with
wails dev(or run a built binary). - Add one or more Riot accounts in the left panel.
- Select an account.
- Click
Log In. - Watch progress and errors in
Runtime Logs.
The app will execute the configured switch/login sequence and then launch League.
The current implementation expects fixed grid cell values passed in V1Options (currently set in frontend/src/App.tsx).
- A virtual
GridSize x GridSizemap of the Riot Client window. - Cell
(1,1)starts at top-left. - Clicks are sent to each cell center.
There is no built-in grid image generator in the current code path. Use this manual process:
- Open Riot Client to the target screen.
- Take a screenshot.
- Overlay a
30 x 30grid in any image tool. - Read target positions as
col,rowand update the values used byStartV1options.
- Avoids hard-coded pixel coordinates.
- Keeps automation more stable across window sizes/resolutions.
- No active CLI flags are implemented in the current application entrypoint.
- Runtime automation configuration is currently passed as
V1Optionsfrom the frontend.
Active V1Options fields:
GridSizeBetweenClickMsClick1,Click2LoginUserCell,LoginPassCell,LoginButtonCellAccountUsername,AccountPassword
Current defaults in frontend/src/App.tsx:
GridSize: 30BetweenClickMs: 1500Click1: "25,3"Click2: "21,12"LoginUserCell: "2,10"LoginPassCell: "2,12"LoginButtonCell: "4,25"
- Credentials are stored in local SQLite as plain text in the current implementation.
- Automation depends on Riot Client UI layout and expected window title.