# vhsm plugin register

The `plugin register` command adds a new plugin to vHSM's plugin catalog. Registration is a prerequisite before the plugin can be used in mounts for auth methods, secrets engines, or database plugins.

You must specify the plugin type  such as`auth`, `database`, or `secret`and provide a SHA256 checksum of the plugin binary to ensure integrity.

**Usage**

```bash
vhsm plugin register [options] <plugin-type> <plugin-name>
```

* `<plugin-type>`: The type of plugin (e.g., `auth`, `database`, or `secret`).
* `<plugin-name>`: The name to register the plugin under in the catalog.

&#x20;**Available Flags**

| Flag                  | Description                                                   |
| --------------------- | ------------------------------------------------------------- |
| `-sha256=<string>`    | **(Required)** SHA256 checksum of the plugin binary.          |
| `-command=<string>`   | Optional custom command for executing the plugin binary.      |
| `-args=<string>`      | Optional arguments to pass to the plugin binary on execution. |
| `-version=<string>`   | Optional semantic version to associate with the plugin.       |
| `-builtin`            | Register the plugin as a built-in plugin.                     |
| `-runtime=<string>`   | Optional runtime to use (e.g., OCI image runtime).            |
| `-oci-image=<string>` | OCI image reference for plugins that use container runtimes.  |

{% hint style="info" %}
**Note**: `-sha256` is always required, even if other flags are not used.
{% endhint %}

**Examples**

Register a new secret plugin

```bash
vhsm plugin register \
  -sha256=d3f0a8be02f6c074cf38c9c99d4d04c9c6466249 \
  secret my-custom-plugin
```

**Output**

```
Success! Registered plugin: my-custom-plugin
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.enclaive.cloud/virtual-hsm/cli/configuration-and-management/vhsm-plugin/vhsm-plugin-register.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
