Desktop

Desktop CLI

Create and update the Tauri project, run the app in a window, build installers and check your machine.

This page covers the frigear-desktop command and what each OS needs to build the app. Set up the module first: Overview.

Commands

frigear-desktop init [--force] [--cwd <dir>]    # create src-tauri/, then sync
frigear-desktop sync [--cwd <dir>]              # merge the desktop settings into src-tauri/
frigear-desktop dev [--cwd <dir>] [-- <args>]   # sync, then tauri dev
frigear-desktop build [--cwd <dir>] [-- <args>] # sync, then tauri build
frigear-desktop sidecar [--cwd <dir>] [--target <triple>] # local mode: the compiled server only
frigear-desktop doctor [--fix] [--cwd <dir>]    # Rust, @tauri-apps/cli, OS prerequisites, project

init, sync, dev, build and sidecar run nuxt prepare first, so they always use the current desktop options. They stop when desktop.appId is not set.

  • init creates src-tauri/: Cargo.toml with Tauri 2 and the opener, deep-link and store plugins (and single-instance with its deep-link feature, autostart and updater when those options are on), src/main.rs and src/lib.rs that register them, build.rs, a .gitignore for target/ and placeholder icons. Then it runs sync. Files that exist are kept, unless you pass --force. src/lib.rs is yours from then on: sync never changes it.
  • sync merges .nuxt/desktop/tauri.json into src-tauri/tauri.conf.json, keeping every key the module does not own, and writes src-tauri/capabilities/frigear.json. Running it again changes nothing. See What the module writes.
  • dev runs tauri dev. Its beforeDevCommand (npx nuxt dev --port 3000, written by init) starts the dev server, and the window opens on devUrl. In local mode there is no sidecar under dev: the window loads nuxt dev, which uses NuxtHub's own database in .data/.
  • build runs tauri build. Its beforeBuildCommand (npx nuxt generate) builds the SPA into .output/public, and Tauri bundles it. The installers end up in src-tauri/target/release/bundle/. In local mode it runs nuxt build and compiles the server with Bun into src-tauri/binaries/<binaryName>-<target triple> first, then tauri build without the beforeBuildCommand. The target is that of -- --target <triple>, else this machine's.
  • sidecar (local mode) runs nuxt build and compiles the server, without Tauri. Use --target <triple> to cross-compile, for example x86_64-pc-windows-msvc from a Mac.
  • doctor checks the machine and the app (in local mode also Bun and tauri-plugin-shell), prints a fix for each problem, and exits with 1 when something blocks a build. It works before nuxt prepare too, without the package checks.
  • doctor --fix sets up what is missing, then checks again. See Set up a machine.

Options after -- go to the Tauri CLI, such as frigear-desktop build -- --debug or frigear-desktop build -- --bundles dmg.

Change beforeDevCommand and beforeBuildCommand in tauri.conf.json if your app starts differently, for example with pnpm dev. sync does not own them, except that it keeps the npx nuxt dev --port <port> that init wrote on the port of devUrl when you change the dev port.

Icons

init writes a plain placeholder icons/icon.png and icons/icon.ico, so the project compiles. Replace them with your logo before a release:

npx tauri icon path/to/logo.png   # a square PNG, 1024px, into src-tauri/icons/

tauri icon writes more sizes than the placeholders. List them in bundle.icon of tauri.conf.json.

Prerequisites

Every OS needs Rust (cargo and rustc) from rustup.rs and @tauri-apps/cli in the app. Local mode also needs Bun on the build machine: in BUN, on the PATH, or where bun.sh's installer puts it ($BUN_INSTALL/bin, ~/.bun/bin), in that order. frigear-desktop doctor checks all of them, and frigear-desktop doctor --fix installs most of them.

Set up a machine

npx frigear-desktop doctor --fix

It runs nuxt prepare, then fixes what it can without help, and runs doctor again:

MissingWhat --fix does
Rust (macOS, Linux)Runs the rustup installer unattended: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal.
Bun (local mode)Runs bun.sh's installer: curl -fsSL https://bun.sh/install | bash (PowerShell's irm bun.sh/install.ps1 | iex on Windows), into ~/.bun.
@tauri-apps/cli, Tauri plugin packagesAdds them with the app's package manager (the one running the command, else the lockfile's, else pnpm).
src-tauri/Runs init.
Xcode Command Line Tools (macOS)Runs xcode-select --install, which opens Apple's dialog. Run --fix again once it is done.

It never runs sudo: the Linux system packages and the Windows installers below stay yours to install.

You do not need a new terminal after the installs. When cargo is not on the PATH but in $CARGO_HOME/bin or ~/.cargo/bin, doctor says so and dev and build put that folder on the PATH of tauri. Bun is found in ~/.bun/bin the same way.

OSAlso needsChecked by doctor
macOSThe Xcode Command Line Tools: xcode-select --install.Yes
WindowsThe Microsoft C++ Build Tools ("Desktop development with C++") and WebView2.Noted only
Linuxpkg-config and WebKitGTK 4.1 with its build dependencies.Yes

Windows. WebView2 ships with Windows 10 (version 1803 and later) and Windows 11. On older systems install the Evergreen runtime from Microsoft.

Linux. Install WebKitGTK 4.1 and the other build dependencies:

# Debian / Ubuntu
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev \
  libayatana-appindicator3-dev librsvg2-dev
# Fedora
sudo dnf install webkit2gtk4.1-devel openssl-devel libappindicator-gtk3-devel librsvg2-devel
# Arch
sudo pacman -S webkit2gtk-4.1 base-devel openssl libappindicator-gtk3 librsvg
On some Linux setups (often NVIDIA drivers or Wayland) WebKitGTK shows a blank or white window. Start the app with WEBKIT_DISABLE_DMABUF_RENDERER=1, for example WEBKIT_DISABLE_DMABUF_RENDERER=1 npx frigear-desktop dev.

macOS registers the deep-link schemes when the app bundle is installed, so a scheme link reaches the app only from a built and installed app. On Linux, and on Windows in development, the generated src/lib.rs registers the schemes when the app starts.

Under dev Auth signs in with a redirect inside the window instead, so the dev server's callback (http://localhost:3000/auth/callback) has to be a redirect URI on the issuer. See Register the client on the issuer.

Copyright © 2026