Skip to content

Commit 69d2fc4

Browse files
write-a-driver-module: align prompts table with logic-module page
Prompts table now uses the verbatim huh titles from rdk/cli/module_generate.go (Set a module name:, Specify the language for the module:, Visibility:, Namespace/Organization ID, Select a resource to be added to the module:, Set a model name of the resource:, Register module) so the docs match what the CLI actually displays. Visibility description expanded with proto-verified text from api/proto/viam/app/v1/app.proto covering all three values (private, public, public_unlisted). Resource row value changed from `sensor` to `Sensor Component` — matches the title-cased label shown in the CLI's flat dropdown. Sensor is unambiguous in the list (no -component flag form needed). A framing sentence above the table notes the flag equivalents for non-interactive use.
1 parent cce5c25 commit 69d2fc4

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

docs/build-modules/write-a-driver-module.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,17 @@ viam module generate
6363

6464
The generator creates a new directory named after your module (for example, `my-sensor-module`) in your current working directory. `cd` into that directory for the rest of the steps.
6565

66-
| Prompt | What to enter | Why |
67-
| ---------------- | --------------------------- | -------------------------------- |
68-
| Module name | `my-sensor-module` | A short, descriptive name |
69-
| Language | `python` or `go` | Your implementation language |
70-
| Visibility | `private` | Keep it private while developing |
71-
| Namespace | Your organization namespace | Scopes the module to your org |
72-
| Resource subtype | `sensor` | The resource API to implement |
73-
| Model name | `my-sensor` | The model name for your sensor |
74-
| Register | `yes` | Registers the module with Viam |
66+
When run without flags, the generator prompts for each value below. If you pass these as `--name`, `--language`, `--visibility`, `--public-namespace`, `--resource-subtype`, `--model-name`, and `--register` flags instead, use the flag forms noted in the table (where different from the interactive labels).
67+
68+
| Prompt | What to enter | Why |
69+
| -------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
70+
| Set a module name: | `my-sensor-module` | A short, descriptive name |
71+
| Specify the language for the module: | `python` or `go` | Your implementation language |
72+
| Visibility: | `private` | `private`: visible only within your org. `public`: visible to everyone. `public_unlisted`: usable by anyone who knows the module ID, but hidden from the registry page. You can change visibility later. |
73+
| Namespace/Organization ID | Your organization namespace | Scopes the module to your org |
74+
| Select a resource to be added to the module: | `Sensor Component` | The resource API to implement |
75+
| Set a model name of the resource: | `my-sensor` | The model name for your sensor |
76+
| Register module | `yes` | Registers the module with Viam |
7577

7678
The generator creates a complete project with the following files:
7779

0 commit comments

Comments
 (0)