Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.58 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.58 KB

Note

This generator is now deprecated unless you are creating an entirely new API. To make a module that implements an existing API with a custom model, use the Viam CLI viam module generate command.

generator-viam-module

Generate Viam module scaffolding using Yeoman.

Example screen recording of usage

Current limitations

  • Only Python module generation is currently supported.
  • The generator currently only supports generation of modules that expose a single modular resource. These modules can be manually extended.

Usage

First, install node (>=16) and npm if you have not already. It is usually best to use nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install 16
nvm use 16

Now install Yeoman:

npm install -g yo

Then, install the Viam module generator:

npm install -g generator-viam-module

Now, go to the directory where you want to start creating your Viam module and run:

yo viam-module

You will be interactively prompted and your module scaffolding will be created. Then you will add your custom logic, and configure your module for use with your Viam robots. To read more about Viam modules and modular resources, read the docs.