feat(cli): detach tray mode from terminal (#11230)

Validated on the combined batch board over tip 0b41259f: static gates clean, typecheck:core clean, 430+ focused tests green across 5 groups.

--tray returns after readiness and survives terminal close, with tray-mode autostart on macOS/Windows/Linux while headless Linux keeps the systemd user service. tray-detached + autostart suites green. Closes #11229. Thank you @tuandinh0801!
This commit is contained in:
Tuan Dinh
2026-08-23 19:48:16 +07:00
committed by GitHub
parent fb421bc580
commit 8d59ab363b
11 changed files with 504 additions and 19 deletions

View File

@@ -357,6 +357,49 @@ omniroute --port 3000
The CLI automatically loads `.env` from `~/.omniroute/.env` or `./.env`.
### Tray mode
Start OmniRoute in the system tray:
```bash
omniroute serve --tray
```
The command returns after the server and tray are ready.
The server continues without the terminal.
Tray mode supports macOS, Windows, and graphical Linux sessions. Tray mode does not open the dashboard automatically.
Use the tray menu for these actions:
- Open the dashboard.
- Open `/dashboard/logs`.
- Change auto-start.
- Stop OmniRoute.
Do not combine `--tray` with these options:
- `--daemon`
- `--log`
- `--no-recovery`
These modes require different process ownership.
Enable startup at the next machine login:
```bash
omniroute autostart enable
```
Auto-start uses tray mode on macOS, Windows, and graphical Linux sessions. Headless Linux uses the existing systemd user service.
Disable startup at login:
```bash
omniroute autostart disable
```
### Uninstalling
When you no longer need OmniRoute, we provide two quick scripts for a clean removal: