CLI
The tauri.js cli is composed in TypeScript and published as JavaScript.
info
#
- Yarn
- npm
- cargo
- Global
yarn tauri info
npm run tauri info
cargo tauri info
tauri info
Description
Returns the known state of tauri dependencies and configuration
It shows a concise list of information about the environment, Rust, Node.js and their versions as well as some relevant configurations.
init
#
- Yarn
- npm
- cargo
- Global
yarn tauri init
npm run tauri init
cargo tauri init
tauri init
Description
Inits the Tauri template. If Tauri cannot find the src-tauri/tauri.conf.json
it will create one.
Usage
$ tauri init
Options
--help, -h Displays this message
--force, -f Force init to overwrite [conf|template|all]
--log, -l Logging [boolean]
--directory, -d Set target directory for init
--tauriPath, -t Path of the Tauri project to use (relative to the cwd)
dev
#
- Yarn
- npm
- cargo
- Global
yarn tauri dev
npm run tauri dev
cargo tauri dev
tauri dev
Description
Tauri dev.
Usage
$ tauri dev
Options
--help, -h Displays this message
This command will open the WebView in development mode. It makes use of the build.devPath
property from your src-tauri/tauri.conf.json
file.
If you have entered a command to the build.beforeDevCommand
property, this one will be executed before the dev
command.
If you're not using build.beforeDevCommand
, make sure your build.devPath
is correct and, if using a development server, that it's started before using this command.
deps
#
- Yarn
- npm
- cargo
- Global
yarn tauri deps update
npm run tauri deps update
cargo tauri deps update
tauri deps update
Description
Tauri dependency management script
Usage
$ tauri deps [install|update]
build
#
- Yarn
- npm
- cargo
- Global
yarn tauri build
npm run tauri build
cargo tauri build
tauri build
Description
Tauri build.
Usage
$ tauri build
Options
--help, -h Displays this message
--debug, -d Build a tauri app with debugging
This command will bundle your application, either in production mode or debug mode if you used the --debug
flag. It makes use of the build.distDir
property from your src-tauri/tauri.conf.json
file.
If you have entered a command to the build.beforeBuildCommand
property, this one will be executed before the build
command.
icon
#
- Yarn
- npm
- cargo
- Global
yarn tauri icon
npm run tauri icon
cargo tauri icon
tauri icon
Description
Create all the icons you need for your Tauri app.
Usage
$ tauri icon
Options
--help, -h Displays this message
--log, -l Logging [boolean]
--icon, -i Source icon (png, 1240x1240 with transparency)
--target, -t Target folder (default: 'src-tauri/icons')
--compression, -c Compression type [pngquant|optipng|zopfli]
This command will generate a set of icons, based on the source icon you've entered.
version
#
- Yarn
- npm
- cargo
- Global
yarn tauri --version
npm run tauri -- --version
cargo tauri --version
tauri --version
Description
Returns the current version of tauri
This command will show the current version of Tauri.
#
CLI usageSee more about the usage through this complete guide.