meta.json reference

The meta.json file is a JSON file that describes your module. It contains information about the module, such as its name, version, and the resource models it provides.

The meta.json file has the following fields:

NameTypeInclusionDescription
module_idstringRequiredThe module ID, which includes either the module namespace or organization ID, followed by its name.
visibilitystringRequiredWhether 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 change it back to private if it is not configured on any machines outside of your organization.
urlstringRequired for cloud buildThe 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.
descriptionstringRequiredA description of your module and what it provides.
modelsobjectRequired

A list of one or more models provided by your custom module. You must provide at least one model, which consists of an api and model key pair. If you are publishing a public module ("visibility": "public"), the namespace of your model must match the namespace of your organization.

You are strongly encouraged to include a markdown_link to the section of the README containing configuration information about each model, so that the section will be displayed alongside the configuration panel when configuring the model. For example, "README.md#configure-your-meteo_pm-sensor". Please also include a short_description describing what hardware the model supports.

entrypointstringRequiredThe name of the file that starts your module program. This can be a compiled executable, a script, or an invocation of another program. 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.
buildobjectOptionalAn 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 this with the Viam CLI's build subcommand.
markdown_linkstringOptionalLink to the documentation (README) for this module. The Viam app uses this to render your README on your module's page in the registry. Similar to the markdown_link within the models object (described above), which allows the app to render info for a specific model in the configuration panel.
$schemastringOptionalEnables VS Code hover and autocomplete as you edit your module code. Gets auto-generated when you run viam module generate or viam module create. Has no impact on the module's function.