Previous
Update and manage modules
The
The
| Name | Type | Inclusion | Description |
|---|---|---|---|
module_id | string | Required | The module ID, which includes either the module namespace or organization ID, followed by its name: <namespace>:<module-name> or <org-id>:<module-name>.CautionThe |
visibility | string | Required | Whether the module is accessible only to members of your organization (private), or visible to all Viam users (public). You can later make a private module public using the viam module update command. Once you make a module public, you can only change it back to private if it is not configured on any machines outside of your organization. |
url | string | Required for cloud build | The URL of the GitHub repository containing the source code of the module. Cloud build will fail if you do not provide this. Optional for local modules. |
description | string | Required | The description of your module and what it provides. |
models | array | Optional | Deprecated. An array of objects describing the models provided by your module. Specified models are ignored. Models are inferred from the module itself. |
entrypoint | string | Optional | The name of the file that starts your module. This can be a compiled executable or a script. If you are providing your module as a single file to the upload command, provide the path to that single file. If you are providing a directory containing your module to the upload command, provide the path to the entry point file contained within that directory. Required if you are shipping a model. |
build | object | Optional | An object containing the command to run to build your module, as well as optional fields for the path to your dependency setup script, the target architectures to build for, and the path to your built module. Use with the Viam CLI build subcommand.
|
markdown_link | string | Optional | Link to the documentation (README) for this module. Viam uses this to render your README on your module's page in the registry. |
$schema | string | Optional | Enables VS Code hover and autocomplete as you edit your module code. Auto-generated when you run viam module generate or viam module create. Has no impact on the module's function. |
applications | array | Optional | Objects that provide information about the applications provided by the module. For more information see Applications. |
The applications field is an array of application objects with the following properties:
| Property | Type | Description |
|---|---|---|
name | string | The name of your application, which is part of the application’s URL (name_publicnamespace.viamapplications.com). For more information on valid names see Valid application identifiers. |
type | string | The type of application: "single_machine" or "multi_machine". Whether the application can access and operate one machine or multiple machines. |
entrypoint | string | The path to the HTML entry point for your application. The entrypoint field specifies the path to your application’s entry point. For example:
|
fragmentIds | []string | Specify the fragment or fragments that a machine must contain to be selectable from the machine picker screen. Only for single machine applications. |
logoPath | string | The URL or the relative path to the logo to display on the machine picker screen for a single machine application. |
customizations | object | Override the branding heading and subheading to display on the authentication screen for single machine applications:
{ "heading": "Air monitoring dashboard", "subheading": "Sign in and select your devices to view your air quality metrics in a dashboard" }. |
If your module includes a Viam application, you need to define the application name in your module’s meta.json file.
Application names have the following requirements:
a-z and 0-9) and hyphen (-) characters.The URL for accessing your Viam app will contain your application name:
https://app-name_your-public-namespace.viamapps.com
For example, if your organization namespace is acme and your application name is dashboard, your application will be accessible at:
https://dashboard_acme.viamapps.com
When uploading modules to the Viam Registry, you must set a unique namespace for your organization to associate your module with.
To create a new namespace for your organization, click on the org’s Settings in the top right of the navigation bar, then click the Set a public namespace button.
Enter a name or use the suggested name for your namespace, and then click Set namespace.
A namespace may only contain letters, numbers, and the dash (-) character.
You can change your organization’s namespace on your organization settings page:
model field in the configuration of any machines that use the module to use the new namespace.
Machine configurations that reference the old namespace will continue to work, but we recommend updating them to use the new namespace to avoid confusion.When you rename a namespace, Viam reserves the old namespace for backwards compatibility and you cannot reuse it.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!