You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -628,7 +628,7 @@ This includes:
628
628
- Building your module for different architectures using cloud runners
629
629
- Building a module locally and running it on a target device. Rebuilding & restarting if already running.
630
630
631
-
See [Upload a custom module](/how-tos/upload-module/) and [Update an existing module](/how-tos/manage-modules/#update-an-existing-module) for more information.
631
+
See [Upload a module](/how-tos/upload-module/) and [Update an existing module](/how-tos/manage-modules/#update-an-existing-module) for more information.
632
632
633
633
If you update and release your module as part of a continuous integration (CI) workflow, you can also
634
634
[automatically upload new versions of your module on release](/how-tos/manage-modules/#update-an-existing-module-using-a-github-action) using a GitHub Action.
@@ -718,7 +718,7 @@ viam module upload --version=1.0.0 --platform=darwin/arm64 packaged-module.tar.g
718
718
|`--org-id`| The organization ID to associate the module to. See [Using the `--org-id` argument](#using-the---org-id-and---public-namespace-arguments)|`create`, `upload`|**Required**|
719
719
|`--public-namespace`| The [namespace](/cloud/organizations/#create-a-namespace-for-your-organization) to associate the module to. See [Using the `--public-namespace` argument](#using-the---org-id-and---public-namespace-arguments)|`create`, `upload`|**Required**|
720
720
|`--platform`| The architecture of your module binary. See [Using the `--platform` argument](#using-the---platform-argument)|`upload`, `build logs`|**Required**|
721
-
| `--tags` | Comma-separated list of platform tags that determine to which this binary can be deployed. Examples: `distro:debian,distro:ubuntu, os_version:22.04,os_codename:jammy`. For a machine to use an uploaded binary, all tags must be satisfied as well as the `--platform` field. <ul><li>`distro`: Distribution. You can find this in `/etc/os-release`. `"debian"` or `"ubuntu"`.</li><li>`os_version`: Operating System version. On Linux, you can find this in `/etc/os-release`. Example for linux: `22.04`. On Mac, run `sw_vers --productVersion` and use the major version only. Example for mac: `14`.</li><li>`codename`: The operating system codename. Find this in `/etc/os-release`. For example: `"bullseye"`, `"bookworm"`, or `"jammy"`.</li><li>`cuda`: Whether using CUDA compiler. Run `nvcc --version`. For example: `"true"`.</li><li>`cuda_version`: The CUDA compiler version. Run `nvcc --version`. For example: `"11"` or `"12"`.</li><li>`jetpack`: Version of the NVIDIA JetPack SDK. Run `apt-cache show nvidia-jetpack`. For example: `"5"`.</li><li>`pi`: Version of the raspberry pi: `"4"` or `"5"`.</li><li>`pifull`: Compute module or model number, for example `cm5p` or `5B`.</li></ul> | `upload` | Optional |
721
+
| `--tags` | Comma-separated list of platform tags that determine to which platforms this binary can be deployed. Examples: `distro:debian,distro:ubuntu, os_version:22.04,os_codename:jammy`. For a machine to use an uploaded binary, all tags must be satisfied as well as the `--platform` field. <ul><li>`distro`: Distribution. You can find this in `/etc/os-release`. `"debian"` or `"ubuntu"`.</li><li>`os_version`: Operating System version. On Linux, you can find this in `/etc/os-release`. Example for linux: `22.04`. On Mac, run `sw_vers --productVersion` and use the major version only. Example for mac: `14`.</li><li>`codename`: The operating system codename. Find this in `/etc/os-release`. For example: `"bullseye"`, `"bookworm"`, or `"jammy"`.</li><li>`cuda`: Whether using CUDA compiler. Run `nvcc --version`. For example: `"true"`.</li><li>`cuda_version`: The CUDA compiler version. Run `nvcc --version`. For example: `"11"` or `"12"`.</li><li>`jetpack`: Version of the NVIDIA JetPack SDK. Run `apt-cache show nvidia-jetpack`. For example: `"5"`.</li><li>`pi`: Version of the raspberry pi: `"4"` or `"5"`.</li><li>`pifull`: Compute module or model number, for example `cm5p` or `5B`.</li></ul> | `upload` | Optional |
722
722
|`--version`| The version of your module to set for this upload. See [Using the `--version` argument](#using-the---version-argument)|`upload`|**Required**|
723
723
|`--wait`| Wait for the build to finish before outputting any logs |`build logs`| Optional |
724
724
@@ -863,7 +863,7 @@ In the example above, the model namespace is set to `acme` to match the owning o
863
863
If the two namespaces do not match, the command will return an error.
864
864
{{% /alert %}}
865
865
866
-
See [Upload a custom module](/how-tos/upload-module/) and [Update an existing module](/how-tos/manage-modules/#update-an-existing-module) for a detailed walkthrough of the `viam module` commands.
866
+
See [Upload a module](/how-tos/upload-module/) and [Update an existing module](/how-tos/manage-modules/#update-an-existing-module) for a detailed walkthrough of the `viam module` commands.
867
867
868
868
See [Modular resources](/registry/) for a conceptual overview of modules and the modular resource system at Viam.
Copy file name to clipboardExpand all lines: docs/how-tos/hello-world-module.md
+20-5
Original file line number
Diff line number
Diff line change
@@ -205,7 +205,7 @@ First let's generate the camera component files, and we'll add the sensor code l
205
205
We will add the sensor later.
206
206
- Model name: `hello-camera`
207
207
- Enable cloud build: `No`
208
-
- Register module: `No`
208
+
- Register module: `Yes`
209
209
210
210
1. Hit your Enter key and the generator will generate a folder called <file>hello-world</file> containing stub files for your modular camera component.
211
211
@@ -764,7 +764,10 @@ The hello world module you created is for learning purposes, not to provide any
764
764
765
765
{{< /expand >}}
766
766
767
-
To package and upload your module and make it available to configure on machines in your organization:
767
+
To package (for Python) and upload your module and make it available to configure on machines in your organization:
768
+
769
+
{{< tabs >}}
770
+
{{% tab name="Python" %}}
768
771
769
772
1. Package the module as an archive, run the following command from inside the <file>hello-world</file> directory:
770
773
@@ -780,10 +783,22 @@ To package and upload your module and make it available to configure on machines
780
783
viam module upload --version 1.0.0 --platform any module.tar.gz
781
784
```
782
785
783
-
1. Now, if you look at the [Viam Registry page](https://app.viam.com/registry) while logged into your account, you'll be able to find your private module listed.
784
-
You can configure the hello-sensor and hello-camera on your machines just as you would configure other components and services; there's no more need for local module configuration.
786
+
{{% /tab %}}
787
+
{{% tab name="Go" %}}
788
+
789
+
From within your <file>hello-world</file> directory, run the `viam module upload` CLI command to upload the module to the registry:
viam module upload --version 1.0.0 --platform any .
793
+
```
794
+
795
+
{{% /tab %}}
796
+
{{< /tabs >}}
797
+
798
+
Now, if you look at the [Viam Registry page](https://app.viam.com/registry) while logged into your account, you'll be able to find your private module listed.
799
+
You can configure the hello-sensor and hello-camera on your machines just as you would configure other components and services; there's no more need for local module configuration.
785
800
786
-

801
+

787
802
788
803
For more information about uploading modules, see [Upload a module](/how-tos/upload-module/).
Copy file name to clipboardExpand all lines: docs/how-tos/upload-module.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ Edit the newly-created `meta.json` file, and provide the required configuration
111
111
<td><code>module_id</code></td>
112
112
<td>string</td>
113
113
<td><strong>Required</strong></td>
114
-
<td>The module ID, which includes either the module <a href="/cloud/organizations/#create-a-namespace-for-your-organization">namespace</a> or <a href="/cloud/organizations/">organization-id</a>, followed by its name (pre-populated using the <code>--name</code> you provided in the <code>viam module create</code> command).
114
+
<td>The module ID, which includes either the module <a href="/cloud/organizations/#create-a-namespace-for-your-organization">namespace</a> or <a href="/cloud/organizations/">organization ID</a>, followed by its name (pre-populated using the <code>--name</code> you provided in the <code>viam module create</code> command).
115
115
<div class="alert alert-caution" role="alert">
116
116
<h4 class="alert-heading">Caution</h4>
117
117
@@ -264,7 +264,7 @@ where:
264
264
You can only provide one `platform` argument at a time to the `viam module upload` command.
265
265
See [Using the `--platform` argument](/cli/#using-the---platform-argument) for the full list of supported architectures.
266
266
- `module-path`: provide the path to the file, directory, or compressed archive (with `.tar.gz` or `.tgz` extension) that contains your custom module code.
267
-
- `tags`: provide a comma-separated list of platform tags that determine to which this binary can be deployed. See [`viam module upload`](/cli/#module).
267
+
- `tags`: provide a comma-separated list of platform tags that determine to which platforms this binary can be deployed. See [`viam module upload`](/cli/#module).
268
268
269
269
{{% alert title="Important" color="note" %}}
270
270
The `viam module upload`command only supports one `platform` argument at a time.
@@ -275,19 +275,19 @@ The Viam Registry page for your module displays the platforms your module suppor
275
275
276
276
For example:
277
277
278
-
- To upload a custom module that is defined in a single file named `my-module-file`in a local`bin` directory:
278
+
- To upload a module that is defined in a single file named `my-module-file`in a local`bin` directory:
0 commit comments