getMatches
getMatches():
Promise
<CliMatches
>
Defined in: index.ts:66
Parse the arguments provided to the current process and get the matches using the configuration defined tauri.cli
in tauri.conf.json
Promise
<CliMatches
>
import { getMatches } from '@tauri-apps/plugin-cli';const matches = await getMatches();if (matches.subcommand?.name === 'run') { // `./your-app run $ARGS` was executed const args = matches.subcommand?.matches.args if ('debug' in args) { // `./your-app run --debug` was executed }} else { const args = matches.args // `./your-app $ARGS` was executed}
2.0.0
© 2025 Tauri Contributors. CC-BY / MIT