Repository navigation
Tray and CLI
opencode edited this page Aug 14, 2026
·
3 revisions
FlutLink is a tray-first application: closing the window hides it to the system tray instead of terminating, so sync keeps running in the background.
-
Setup —
setup_trayinsrc-tauri/src/lib.rscreates a tray icon with a two-item menu (Show FlutLink, Quit FlutLink). The icon comes from the default window icon (regenerated fromapp-icon.pngvianpm run tauri icon app-icon.png). -
Close to tray —
on_window_eventinterceptsCloseRequested. Unless a quit flag is set (tray Quit), the close is prevented and the window is hidden instead. -
Restore — the Show menu item and a left click on the tray icon both
call
show_main_window(unminimize + show + focus). -
Quit — the Quit menu item sets the quit flag and calls
app.exit(0).
Configured in tauri.conf.json under plugins.cli and parsed in handle_cli
(no capabilities needed for Rust-side parsing).
| Flag | Short | Argument | Behaviour |
|---|---|---|---|
--sync |
-s |
none | Run a sync pass after startup (sync.notify_one()) |
--path |
-p |
directory | Add a local folder to the two-way sync |
--url |
-u |
URL (ignored) | Open the login dialog for the FlutCloud server |
--tray |
-t |
none | Start minimized to the system tray |
Examples:
flutlink --tray --sync # start silently and sync once
flutlink --path "C:\Users\me\Documents" # add a sync folder
flutlink --url # open sign-in (the FlutCloud server is fixed)Frontend interaction:
-
--urlemitsflutlink:cli-open;App.vuelistens and opensLoginModal. The server URL is always the FlutCloud server (fetched via theget_flutcloud_urlcommand, which readsFLUTCLOUD_URLfrom.envinsrc-tauri/src/flutcloud.rs) — FlutLink is a dedicated client and never connects elsewhere. -
--pathrunscommands::sync_addand emitssync-folders-changedso the sync panel refreshes.
- EN: Home · DE: Startseite
- EN: Getting Started · DE: Erste Schritte
- EN: Install Scripts · DE: Installationsskripte
- EN: Features · DE: Funktionen
- EN: Architecture · DE: Architektur
- EN: Sync Engine · DE: Sync-Engine
- EN: FlutCloud App · DE: FlutCloud-App
- EN: Tray & CLI · DE: Tray & CLI
- EN: Security · DE: Sicherheit
- EN: Development · DE: Entwicklung