← 返回命令列表

Linux command

tauri 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize a new Tauri project

tauri init

Start development server

tauri dev

Build production application

tauri build

Build with debug symbols

tauri build --debug

Build for specific target

tauri build --target [x86_64-apple-darwin]

Build specific bundle types

tauri build --bundles [deb,appimage]

Generate icons

tauri icon [icon.png]

Display version

tauri --version

说明

tauri is the command-line interface for building Tauri applications. Tauri is a framework for building tiny, fast desktop applications with web technologies (HTML, CSS, JavaScript) and a Rust backend. The CLI manages the complete application lifecycle: project initialization, development with hot-reload, production builds, and distribution packaging. It integrates with the frontend build process and handles platform-specific bundling. Applications can be built for Windows (MSI, NSIS), macOS (DMG, app bundle), and Linux (DEB, RPM, AppImage). The framework produces small binaries by using the system webview rather than bundling a browser engine. Install via Cargo: `cargo install tauri-cli` or npm: `npm add -D @tauri-apps/cli`

参数

-v, --verbose
Enable verbose logging.
-d, --debug
Build with debug profile.
-t, --target _target_
Target triple (e.g., x86_64-unknown-linux-gnu).
-f, --features _features_
Comma-separated Rust features to enable.
-b, --bundles _bundles_
Bundle types: deb, rpm, appimage, msi, app, dmg, updater.
-r, --runner _runner_
Build tool to use (default: cargo).
-c, --config _file_
Path to tauri.conf.json or config JSON string.
-h, --help
Display help information.

FAQ

What is the tauri command used for?

tauri is the command-line interface for building Tauri applications. Tauri is a framework for building tiny, fast desktop applications with web technologies (HTML, CSS, JavaScript) and a Rust backend. The CLI manages the complete application lifecycle: project initialization, development with hot-reload, production builds, and distribution packaging. It integrates with the frontend build process and handles platform-specific bundling. Applications can be built for Windows (MSI, NSIS), macOS (DMG, app bundle), and Linux (DEB, RPM, AppImage). The framework produces small binaries by using the system webview rather than bundling a browser engine. Install via Cargo: `cargo install tauri-cli` or npm: `npm add -D @tauri-apps/cli`

How do I run a basic tauri example?

Run `tauri init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -v, --verbose do in tauri?

Enable verbose logging.