From 2245fac0ed3a85861233eac3daa8db8b4cdc4cdd Mon Sep 17 00:00:00 2001 From: Andrew Schulmonds Date: Mon, 9 Dec 2024 17:21:16 -0500 Subject: [PATCH 1/3] add missing step in hello world module docs --- docs/how-tos/hello-world-module.md | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/docs/how-tos/hello-world-module.md b/docs/how-tos/hello-world-module.md index 8bc6242c54..bebb598345 100644 --- a/docs/how-tos/hello-world-module.md +++ b/docs/how-tos/hello-world-module.md @@ -759,12 +759,20 @@ The hello world module you created is for learning purposes, not to provide any {{< /expand >}} -To package (for Python) and upload your module and make it available to configure on machines in your organization: +To create the module in the registry, package your code (for Python), and upload your module to make it available for use on machines in your organization: {{< tabs >}} {{% tab name="Python" %}} -1. Package the module as an archive, run the following command from inside the hello-world directory: +1. Create the module in the registry, from within your hello-world directory, run the `viam module upload` CLI command: + + ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} + viam module create --name --org-id + ``` + + Get the `org-id` for your {{< glossary_tooltip term_id="organization" text="organization" >}} from your organization's **Settings** page in the [Viam app](https://app.viam.com/). + +2. Package the module as an archive, run the following command: ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} tar -czf module.tar.gz run.sh setup.sh requirements.txt src @@ -772,7 +780,7 @@ To package (for Python) and upload your module and make it available to configur This creates a tarball called module.tar.gz. -1. Run the `viam module upload` CLI command to upload the module to the registry: +3. Run the `viam module upload` CLI command to upload the module to the registry: ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} viam module upload --version 1.0.0 --platform any module.tar.gz @@ -781,11 +789,19 @@ To package (for Python) and upload your module and make it available to configur {{% /tab %}} {{% tab name="Go" %}} -From within your hello-world directory, run the `viam module upload` CLI command to upload the module to the registry: +1. Create the module in the registry, from within your hello-world directory, run the `viam module upload` CLI command: -```sh {id="terminal-prompt" class="command-line" data-prompt="$"} -viam module upload --version 1.0.0 --platform any . -``` + ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} + viam module create --name --org-id + ``` + + Get the `org-id` for your {{< glossary_tooltip term_id="organization" text="organization" >}} from your organization's **Settings** page in the [Viam app](https://app.viam.com/). + +2. Run the `viam module upload` CLI command to upload the module to the registry: + + ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} + viam module upload --version 1.0.0 --platform any . + ``` {{% /tab %}} {{< /tabs >}} From 3a06d919ddf8cc732f729ee6eba810ffdaf263f9 Mon Sep 17 00:00:00 2001 From: Andrew Schulmonds Date: Mon, 9 Dec 2024 17:22:57 -0500 Subject: [PATCH 2/3] fix typo --- docs/how-tos/hello-world-module.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/how-tos/hello-world-module.md b/docs/how-tos/hello-world-module.md index bebb598345..7cd78b3d20 100644 --- a/docs/how-tos/hello-world-module.md +++ b/docs/how-tos/hello-world-module.md @@ -764,7 +764,7 @@ To create the module in the registry, package your code (for Python), and upload {{< tabs >}} {{% tab name="Python" %}} -1. Create the module in the registry, from within your hello-world directory, run the `viam module upload` CLI command: +1. Create the module in the registry, from within your hello-world directory, run the `viam module create` CLI command: ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} viam module create --name --org-id @@ -789,7 +789,7 @@ To create the module in the registry, package your code (for Python), and upload {{% /tab %}} {{% tab name="Go" %}} -1. Create the module in the registry, from within your hello-world directory, run the `viam module upload` CLI command: +1. Create the module in the registry, from within your hello-world directory, run the `viam module create` CLI command: ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} viam module create --name --org-id From 90ae1d093262583d3e86bf1a4cf9f4f7191a1be6 Mon Sep 17 00:00:00 2001 From: Andrew Schulmonds Date: Mon, 9 Dec 2024 17:35:06 -0500 Subject: [PATCH 3/3] prettify --- docs/how-tos/hello-world-module.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/how-tos/hello-world-module.md b/docs/how-tos/hello-world-module.md index 7cd78b3d20..c403d6a2c1 100644 --- a/docs/how-tos/hello-world-module.md +++ b/docs/how-tos/hello-world-module.md @@ -766,11 +766,11 @@ To create the module in the registry, package your code (for Python), and upload 1. Create the module in the registry, from within your hello-world directory, run the `viam module create` CLI command: - ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} - viam module create --name --org-id - ``` + ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} + viam module create --name --org-id + ``` - Get the `org-id` for your {{< glossary_tooltip term_id="organization" text="organization" >}} from your organization's **Settings** page in the [Viam app](https://app.viam.com/). + Get the `org-id` for your {{< glossary_tooltip term_id="organization" text="organization" >}} from your organization's **Settings** page in the [Viam app](https://app.viam.com/). 2. Package the module as an archive, run the following command: @@ -791,17 +791,17 @@ To create the module in the registry, package your code (for Python), and upload 1. Create the module in the registry, from within your hello-world directory, run the `viam module create` CLI command: - ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} - viam module create --name --org-id - ``` + ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} + viam module create --name --org-id + ``` - Get the `org-id` for your {{< glossary_tooltip term_id="organization" text="organization" >}} from your organization's **Settings** page in the [Viam app](https://app.viam.com/). + Get the `org-id` for your {{< glossary_tooltip term_id="organization" text="organization" >}} from your organization's **Settings** page in the [Viam app](https://app.viam.com/). 2. Run the `viam module upload` CLI command to upload the module to the registry: - ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} - viam module upload --version 1.0.0 --platform any . - ``` + ```sh {id="terminal-prompt" class="command-line" data-prompt="$"} + viam module upload --version 1.0.0 --platform any . + ``` {{% /tab %}} {{< /tabs >}}