---
title: "Modules Commands"
description: "Manage user interface modules with Cloud CMS CLI for seamless deployment, registration, and configuration from GitHub. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/developers/cli/modules"
---

# Modules Commands

The Cloud CMS command-line tool provides developers with a command-line driven mechanism that allows them to:

- register and unregister user interface modules
- deploy and undeploy user interface modules

User Interface Modules are deployed from public Git repositories (such as GitHub) and consist of AMD JavaScript modules. These modules contain JavaScript, HTML, CSS, a JSON configuration file, and any additional client-side assets that may be used (such as images).

For more information and to learn more, please see [User Interface Modules](/documentation/gitana/4.0/developers/cli/modules.md).

This article provides some examples of common commands.

## List

To list the registered modules:

```
cloudcms module list
```

## Register

To register a user interface module:

```
cloudcms module register --id <moduleId> --sourceType <sourceType> --sourceUrl <sourceUrl> --sourcePath <sourcePath> --sourceBranch <sourceBranch>
```

- The `moduleId` should be the ID of the module as identified in the module's `module.json` file.
- The `sourcePath` switch is optional. If not provided, the default is `/`.
- The `sourceBranch` switch is also optional. If not provided, the branch will be assumed to be `master`.

For example, to register the sample UI module, you could run:

```
cloudcms module register --id sample --sourceType github --sourceUrl https://github.com/gitana/cloudcms-ui-sample-addon --sourcePath /dist
```

## Unregister

To unregister a currently registered module:

```
cloudcms module unregister --id <moduleId>
```

For example, to unregister the sample UI module, you could run:

```
cloudcms module unregister --id sample
```

## Deploy

Once a module is registered with the Cloud CMS user interface, you can deploy it like this:

```
cloudcms module deploy --id <moduleId>
```

For example, to deploy the sample UI module, you could run:

```
cloudcms module deploy --id sample
```

## Undeploy

To undeploy a deployed module, you can run:

```
cloudcms module undeploy --id <moduleId>
```

For example, to undeploy the sample UI module, you could run:

```
cloudcms module undeploy --id sample
```

Note that undeploying the module will not unregister it. It will still be registered such that you could call `deploy` to redeploy it.

## Redeploy

You can also use the `redeploy` command to undeploy and deploy a module. If a module isn't already deployed, it will be deployed anew.

```
cloudcms module redeploy --id <moduleId>
```
