Skip to content

Commit

Permalink
docs: auto-generate references
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed May 13, 2024
1 parent bf0847d commit a7c71fa
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 5 deletions.
4 changes: 3 additions & 1 deletion docs/docs/references/configuration/cli/trivy_plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Manage plugins
* [trivy plugin install](trivy_plugin_install.md) - Install a plugin
* [trivy plugin list](trivy_plugin_list.md) - List installed plugin
* [trivy plugin run](trivy_plugin_run.md) - Run a plugin on the fly
* [trivy plugin search](trivy_plugin_search.md) - List Trivy plugins available on the plugin index and search among them
* [trivy plugin uninstall](trivy_plugin_uninstall.md) - Uninstall a plugin
* [trivy plugin update](trivy_plugin_update.md) - Update an existing plugin
* [trivy plugin update](trivy_plugin_update.md) - Update the local copy of the plugin index
* [trivy plugin upgrade](trivy_plugin_upgrade.md) - Upgrade installed plugins to newer versions

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Install a plugin

```
trivy plugin install URL | FILE_PATH
trivy plugin install NAME | URL | FILE_PATH
```

### Options
Expand Down
31 changes: 31 additions & 0 deletions docs/docs/references/configuration/cli/trivy_plugin_search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## trivy plugin search

List Trivy plugins available on the plugin index and search among them

```
trivy plugin search [KEYWORD]
```

### Options

```
-h, --help help for search
```

### Options inherited from parent commands

```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```

### SEE ALSO

* [trivy plugin](trivy_plugin.md) - Manage plugins

4 changes: 2 additions & 2 deletions docs/docs/references/configuration/cli/trivy_plugin_update.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## trivy plugin update

Update an existing plugin
Update the local copy of the plugin index

```
trivy plugin update PLUGIN_NAME
trivy plugin update
```

### Options
Expand Down
31 changes: 31 additions & 0 deletions docs/docs/references/configuration/cli/trivy_plugin_upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## trivy plugin upgrade

Upgrade installed plugins to newer versions

```
trivy plugin upgrade [PLUGIN_NAMES]
```

### Options

```
-h, --help help for upgrade
```

### Options inherited from parent commands

```
--cache-dir string cache directory (default "/path/to/cache")
-c, --config string config path (default "trivy.yaml")
-d, --debug debug mode
--generate-default-config write the default config to trivy-default.yaml
--insecure allow insecure server connections
-q, --quiet suppress progress bar and log output
--timeout duration timeout (default 5m0s)
-v, --version show version
```

### SEE ALSO

* [trivy plugin](trivy_plugin.md) - Manage plugins

2 changes: 1 addition & 1 deletion pkg/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ func NewPluginCommand() *cobra.Command {
Use: "search [KEYWORD]",
SilenceErrors: true,
DisableFlagsInUseLine: true,
Short: "List available plugins and search among them",
Short: "List Trivy plugins available on the plugin index and search among them",
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
return plugin.Search(cmd.Context(), args)
Expand Down

0 comments on commit a7c71fa

Please sign in to comment.