Skip to content

Commit ba54db3

Browse files
vasfvitorsimonhyll
andauthored
[v2] add permission and capability cli docs (tauri-apps#2114)
Co-authored-by: Simon Hyll <[email protected]>
1 parent 9260ca6 commit ba54db3

File tree

1 file changed

+134
-1
lines changed

1 file changed

+134
-1
lines changed

src/content/docs/references/cli.mdx

Lines changed: 134 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ For CLI commands related to developing plugins visit the [Develop a Tauri Plugin
4040
| [`ios`](#ios) | iOS commands |
4141
| [`android`](#android) | Android commands |
4242
| [`migrate`](#migrate) | Migrate from v1 to v2 |
43+
| [`permission`](#permission) | Manage permissions |
44+
| [`capability`](#capability) | Manage permissions |
4345
| [`help`](#help) | Print this message or the help of the given subcommand(s) |
4446

4547
## `build`
@@ -75,8 +77,10 @@ Options:
7577
Space or comma separated list of features to activate
7678
-b, --bundles [<BUNDLES>...]
7779
Space or comma separated list of bundles to package.
78-
Each bundle must be one of `deb`, `appimage`, `msi`, `app` or `dmg` on MacOS and `updater` on all platforms. If `none` is specified, the bundler will be skipped.
80+
Each bundle must be one of `deb`, `appimage`, `msi`, `app` or `dmg` on MacOS and `updater` on all platforms.
7981
Note that the `updater` bundle is not automatically added so you must specify it if the updater is enabled.
82+
--no-bundle
83+
Bundler will be skipped
8084
-c, --config <CONFIG>
8185
JSON string or path to JSON file to merge with tauri.conf.json
8286
--ci
@@ -499,6 +503,135 @@ Options:
499503
-V, --version Print version
500504
```
501505

506+
## `permission`
507+
508+
<CommandTabs
509+
npm="npm tauri permission"
510+
yarn="yarn tauri permission"
511+
pnpm="pnpm tauri permission"
512+
cargo="cargo tauri permission"
513+
/>
514+
515+
```
516+
Permission commands
517+
518+
Usage: cargo tauri permission <COMMAND>
519+
520+
Commands:
521+
new Create a new permission file
522+
add Add a permission to capabilities
523+
rm Remove a permission file, and its reference from any capability
524+
ls List permissions available to your application
525+
```
526+
527+
### `new`
528+
529+
Create a new permission file
530+
531+
```
532+
Arguments:
533+
[IDENTIFIER] Permission identifier
534+
535+
Options:
536+
--description \<DESCRIPTION> Permission description
537+
-v, --verbose... Enables verbose logging
538+
-a, --allow \<ALLOW> List of commands to allow
539+
-d, --deny \<DENY> List of commands to deny
540+
--format \<FORMAT> Output file format [default: json] [possible values: json, toml]
541+
-o, --out \<OUT> The output file
542+
-h, --help Print help
543+
-V, --version Print version
544+
```
545+
546+
### `add`
547+
548+
Add a permission to capabilities
549+
550+
```
551+
Arguments:
552+
<IDENTIFIER> Permission to add
553+
[CAPABILITY] Capability to add the permission to
554+
555+
Options:
556+
-v, --verbose... Enables verbose logging
557+
-h, --help Print help
558+
-V, --version Print version
559+
```
560+
561+
### `rm`
562+
563+
Remove a permission file, and its reference from any capability
564+
565+
```
566+
Arguments:
567+
<IDENTIFIER> Permission to remove
568+
569+
Options:
570+
-v, --verbose... Enables verbose logging
571+
-h, --help Print help
572+
-V, --version Print version
573+
```
574+
575+
### `ls`
576+
577+
List permissions available to your application
578+
579+
```
580+
Arguments:
581+
[PLUGIN] Name of the plugin to list permissions
582+
583+
Options:
584+
-f, --filter \<FILTER> Permission identifier filter
585+
-v, --verbose... Enables verbose logging
586+
-h, --help Print help
587+
-V, --version Print version
588+
589+
```
590+
591+
592+
## `capability`
593+
594+
<CommandTabs
595+
npm="npm tauri capability"
596+
yarn="yarn tauri capability"
597+
pnpm="pnpm tauri capability"
598+
cargo="cargo tauri capability"
599+
/>
600+
601+
```
602+
Migrate from v1 to v2
603+
604+
Usage: cargo tauri capability [OPTIONS] <COMMAND>
605+
606+
Commands:
607+
new Create a new permission file
608+
help Print this message or the help of the given subcommand(s)
609+
610+
Options:
611+
-v, --verbose... Enables verbose logging
612+
-h, --help Print help
613+
-V, --version Print version
614+
```
615+
616+
### `new`
617+
618+
`Usage: cargo tauri capability new [OPTIONS] [IDENTIFIER]`
619+
620+
```
621+
Arguments:
622+
[IDENTIFIER] Capability identifier
623+
624+
Options:
625+
--description <DESCRIPTION> Capability description
626+
-v, --verbose... Enables verbose logging
627+
--windows <WINDOWS> Capability windows
628+
--permission <PERMISSION> Capability permissions
629+
--format <FORMAT> Output file format [default: json] [possible values: json, toml]
630+
-o, --out <OUT> The output file
631+
-h, --help Print help
632+
-V, --version Print version
633+
```
634+
502635
## `help`
503636

504637
<CommandTabs

0 commit comments

Comments
 (0)