Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing viam module create step in hello world module docs #3744

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions docs/how-tos/hello-world-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -759,20 +759,28 @@ 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 <file>hello-world</file> directory:
1. Create the module in the registry, from within your <file>hello-world</file> directory, run the `viam module create` CLI command:

```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
viam module create --name <your-module-name> --org-id <your-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
```

This creates a tarball called <file>module.tar.gz</file>.

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
Expand All @@ -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 <file>hello-world</file> 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 <file>hello-world</file> directory, run the `viam module create` 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 <your-module-name> --org-id <your-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 >}}
Expand Down
Loading