Runtime Manager Command-Line Interface | MuleSoft Documentation
# Runtime Manager Command-Line Interface
Private Cloud Edition  Runtime Fabric 
Anypoint Platform provides a scripting and command-line tool for Runtime Manager. The command-line interface (CLI) supports both the interactive shell and standard CLI modes and works with:
  * Locally Deployed Applications Managed by Runtime Manager
  * Alerts for Locally Deployed Applications Managed by Runtime Manager
  * Local Servers
  * Local Server Groups
  * Local Cluster Servers
  * CLI for Cloudhub 2.0
  * CLI for CloudHub
  * CLI for Anypoint Runtime Fabric


## Locally Deployed Applications Managed by Runtime Manager
For the Anypoint Platform CLI to recognize your target servers, each server must be manually registered with the platform.   
---  
Command | Description  
---|---  
runtime-mgr:standalone-application:artifact |  Downloads a standalone application artifact binary  
runtime-mgr:standalone-application:copy |  Copies a standalone application  
runtime-mgr:standalone-application:delete |  Deletes a standalone application  
runtime-mgr:standalone-application:deploy |  Deploys or redeploys an application to an on-premises server, server group, or cluster  
runtime.mgr:standalone-application:describe |  Shows detailed information for a standalone application  
runtime-mgr:standalone-application:list |  Lists all standalone applications in the environment  
runtime-mgr:standalone-application:modify |  Changes a standalone application artifact  
runtime-mgr:standalone-application:restart |  Restarts a standalone application  
runtime-mgr:standalone-application:start |  Starts a standalone application  
runtime-mgr:standalone-application:stop |  Stops a standalone application  
### runtime-mgr:standalone-application:artifact
```
> runtime-mgr:standalone-application:artifact [flags] <identifier> <directory>
```

Downloads the application artifact of the `identifier` application, to the directory passed in `directory`. The `identifier` flag can be either an application ID or name.
This command accepts the default flags.
### runtime-mgr:standalone-application:copy
```
> runtime-mgr:standalone-application:copy [flags] <source> <target> <targetIdentifier>
```

Copies the standalone (on-premises) application passed in `source` to the target passed in `target` and the server, server group or cluster ID or Name passed in `targetIdentifier`.
Both arguments `source` and `destination` are represented using the format: `<organizationName>:<environmentName>/<appName>`, for example:
```
> runtime-mgr:standalone-application:copy Services:QA/application-1 Development:QA/application-2 123456
```

Copies the application named `application-1` from the QA environment of the _Services_ organization to the QA environment of the `_Development_`organization in the server ID 123456.
If the Anypoint Platform CLI is using the QA environment in the Services organization, the command can simply take the application name as a `source`:
```
> runtime-mgr:standalone-application:copy application-1 Development/QA/application-2 123456
```

Running this command requires for your user to have read/write access to the `/tmp` directory of the OS where the CLI is installed.   
---  
It isn’t possible to copy applications that have the same name but different targets within the same organization and environment. This can only be done through the UI.   
---  
This command accepts the default flags.
### runtime-mgr:standalone-application:delete
```
> runtime-mgr:standalone-application:delete [flags] <identifier>
```

Deletes the standalone (on-premises) application passed in `identifier`.
This command accepts the default flags.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation.   
---  
### runtime-mgr:standalone-application:deploy
```
> runtime-mgr:standalone-application:deploy [flags] <targetIdentifier> <name> <zipfile>
```

Deploys or redeploys the application passed as a ZIP file in the path `zipfile` to the on-premises target passed in `targetIdentifier`.
The `targetIdentifier` flag can be either a target ID or name.
A target can be either a server, server group, or cluster.
This command accepts the default flags.
To redeploy an app and set a logging level or turn on Insight event tracking, see runtime-mgr:standalone-application:modify.
### runtime-mgr:standalone-application:describe
```
> runtime-mgr:standalone-application:describe [flags] <identifier>
```

Shows detailed information, such as status, creation date, and last update, for the standalone (on-premises) application passed in `identifier`.
Use the flag `-o json` to get the raw JSON response of the application you specify in `<name>`.
This command accepts the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:standalone-application:list
```
> runtime-mgr:standalone-application:list [flags]
```

Lists all standalone (on-premises) applications.
In addition to the default flags, this command accepts the following flags:
Flag | Description | Example  
---|---|---  
Specifies the number of results to retrieve  
Offsets the number of applications passed  
Specifies the response format. |  `--output json`  
### runtime-mgr:standalone-application:modify
```
> runtime-mgr:standalone-application:modify [flags] <identifier> <zipfile>
```

Modifies the standalone (on-premises) application passed in `identifier` with the ZIP file application passed in `zipfile` as a path.
The `identifier` option specifies the application identifier. To retrieve the identifier, see runtime-mgr:standalone-application:list.
In addition to the default flags, this command accepts the following flags:
Flag | Description | Example  
---|---|---  
Stores message metadata of every Mule transaction.  
`--log [level:scope]` |  Sets the logging level and scope pair:
  * `level`: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF
  * `scope`: package name of the class, connector, or module to log, such as `org.mule.extension.ftp` for Anypoint Connector for FTP

To set multiple logging levels, provide multiple `--log` flags. |  `--log INFO:org.apache --log WARN:org.mule`  
### runtime-mgr:standalone-application:restart
```
> runtime-mgr:standalone-application:restart [flags] <identifier>
```

Restarts the standalone (on-premises) application passed in `identifier`.
This command accepts the default flags.
### runtime-mgr:standalone-application:start
```
> runtime-mgr:standalone-application:start [flags] <identifier>
```

Starts the standalone (on-premises) application passed in `identifier`.
This command accepts the default flags.
### runtime-mgr:standalone-application:stop
```
> runtime-mgr:standalone-application:stop [flags] <identifier>
```

Stops the standalone (on-premises) application passed in `identifier`.
This command accepts the default flags.
## Alerts for Locally Deployed Applications Managed by Runtime Manager
Command | Description  
---|---  
runtime-mgr:standalone-alert:create |  Creates new alert for standalone runtime  
runtime-mgr:standalone-alert:describe |  Describes an alert  
runtime-mgr:standalone-alert:list |  Lists all alerts for standalone runtimes in the environment  
runtime-mgr:standalone-alert:modify |  Modifies alert for standalone runtime  
### runtime-mgr:standalone-alert:create
```
> runtime-mgr:standalone-alert:create <name> [flags]
```
Restarts the standalone (on-premises) application passed in `identifier`.
This command accepts the default flags.
### runtime-mgr:standalone-application:start
```
> runtime-mgr:standalone-application:start [flags] <identifier>
```

Starts the standalone (on-premises) application passed in `identifier`.
This command accepts the default flags.
### runtime-mgr:standalone-application:stop
```
> runtime-mgr:standalone-application:stop [flags] <identifier>
```

Stops the standalone (on-premises) application passed in `identifier`.
This command accepts the default flags.
## Alerts for Locally Deployed Applications Managed by Runtime Manager
Command | Description  
---|---  
runtime-mgr:standalone-alert:create |  Creates new alert for standalone runtime  
runtime-mgr:standalone-alert:describe |  Describes an alert  
runtime-mgr:standalone-alert:list |  Lists all alerts for standalone runtimes in the environment  
runtime-mgr:standalone-alert:modify |  Modifies alert for standalone runtime  
### runtime-mgr:standalone-alert:create
```
> runtime-mgr:standalone-alert:create <name> [flags]
```

Creates a new alert for a standalone runtime with the ID passed in `name`. The alert `name` is limited to 256 characters.
In addition to the default flags, this command accepts the following flags:
Flag | Description | Example  
---|---|---  
`--condition` | Alert trigger condition | `--condition cluster-up`  
`--content <string>` | Alert notification email body | `--content Email Body`  
Email address to send alert notification to Can be used multiple times to specify up to 20 email addresses | `--email user@mulesoft.com`  
`--operator` | Condition operator explaining values relation to threshold. | `--operator gt`  
Condition duration in minutes | `--period 15`  
`--recipient` | Username to send alert notification to Can be used multiple times to specify up to 20 platform user IDs | `--recipient 1fec0a49-1551-4199-bfcc-cf0352d0f29d`  
`--resource` | Alert resource ID. If not provided alert triggers for all resources. Depending on `resourceType`, the resource id can be of an application, server, server-group or cluster. | `--resource 12343`  
`--resourceType` | Alert resource type | `--resourceType server`  
`--severity` | Alert severity | `--severity 3`  
`--subject <string>` | Alert notification email subject | `--subject Email Subject`  
`--threshold` | Condition threshold number | `--threshold 10`  
This command has multi-option flags. When using multi-option flags in a command, either put the parameter before the flags or use a `-- ` (two dashes followed by a space) before the parameter.   
---  
### runtime-mgr:standalone-alert:describe
```
> runtime-mgr:standalone-alert:describe [flags] <alertId>
```

Describes the alert passed in `alertId`.
This command accepts the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:standalone-alert:list
```
> runtime-mgr:standalone-alert:list [flags]
```

Lists all alerts for standalone Mules in the current environment.
This command accepts the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:standalone-alert:modify
```
> runtime-mgr:standalone-alert:modify <alertId> [flags]
```

Modifies the alert passed in `alertId`.
In addition to the default flags, this command accepts the following flags:
Flag | Description | Example  
---|---|---  
`--condition` | Alert trigger condition | `--condition server-load-average`  
`--content <string>` | Alert notification email body | `--content Email Body`  
Email address to send alert notification to Can be used multiple times to specify up to 20 email addresses | `--email user@mulesoft.com`  
Alert name | `--name testAlert`  
`--operator` | Condition operator explaining values relation to threshold. | `--operator lt-`  
Condition duration in minutes | `--period 15`  
`--recipient` | Username to send alert notification to Can be used multiple times to specify up to 20 platform user IDs | `--recipient 1fec0a49-1551-4199-bfcc-cf0352d0f29d`  
`--resource` | Alert resource ID. If not provided alert triggers for all resources. Depending on `resourceType`, the resource id can be of an application, server, server-group or cluster. | `--resource 12343`  
`--resourceType` | Alert resource type | `--resourceType server`  
`--severity` | Alert severity | `--severity 3`  
`--subject <string>` | Alert notification email subject | `--subject Email Subject`  
`--threshold` | Condition threshold number | `--threshold 10`  
This command has multi-option flags. When using multi-option flags in a command, either put the parameter before the flags or use a `-- ` (two dashes followed by a space) before the parameter.   
---  
## Local Servers
Command | Description  
---|---  
runtime-mgr:server:describe |  Describes server  
runtime-mgr:server:delete |  Deletes server  
runtime-mgr:server:list |  Changes an standalone application artifact  
runtime-mgr:server:modify |  Modifies server  
runtime-mgr:server:token |  Gets server registration token. This token needs to be used to register a new server  
### runtime-mgr:server:describe
```
> runtime-mgr:server:describe [flags] <serverId>
```

Describes the server passed in `serverId`.
This command accepts the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:server:delete
```
> runtime-mgr:server:delete [flags] <serverId>
```

Deletes the server passed in `serverId`.
This command accepts the default flags.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation.   
---  
### runtime-mgr:server:list
```
> runtime-mgr:server:list [flags]
```

Lists all servers in your environment.
This command accepts the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:server:modify
```
> runtime-mgr:server:modify [flags] <serverId>
```

Modifies the server passed in `serverId`.
In order to update the id for the cluster, you need to pass the `--name` flag.
This command accepts the default flags.
### runtime-mgr:server:token
```
> runtime-mgr:server:token [flags]
```

Gets server registration token. This token needs to be used to register a new server.
This command accepts the default flags.
## Local Server Groups
Command | Description  
---|---  
runtime-mgr:serverGroup:add:server |  Adds server to a server group  
runtime-mgr:serverGroup:create |  Creates server group from servers  
runtime-mgr:serverGroup:describe |  Describes server group  
runtime-mgr:serverGroup:delete |  Deletes server group  
runtime-mgr:serverGroup:list |  Lists all server groups in the environment  
runtime-mgr:serverGroup:modify |  Modifies server group  
runtime-mgr:serverGroup:remove:server |  Removes server from a server group  
### runtime-mgr:serverGroup:add:server
```
> runtime-mgr:serverGroup:add:server [flags] <serverGroupId> <serverId>
```

Adds the server passed in `serverId` to the server group passed in `serverGroupId`.
This command accepts the default flags.
### runtime-mgr:serverGroup:create
```
> runtime-mgr:serverGroup:create [flags] <name> [serverIds...]
```

Creates a server group with the name passed in `name` using the server Id(s) passed as argument(s) thereafter.
This command accepts the default flags.
### runtime-mgr:serverGroup:describe
```
> runtime-mgr:serverGroup:describe [flags] <serverGroupId>
```

Describes the server group passed in `serverGroupId`.
This command accepts the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:serverGroup:delete
```
> runtime-mgr:serverGroup:delete [flags] <serverGroupId>
```

Deletes the server groups passed in `serverGroupId`.
This command accepts the default flags.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation.   
---  
### runtime-mgr:serverGroup:list
```
> runtime-mgr:serverGroup:list [flags]
```
Adds the server passed in `serverId` to the server group passed in `serverGroupId`.
This command accepts the default flags.
### runtime-mgr:serverGroup:create
```
> runtime-mgr:serverGroup:create [flags] <name> [serverIds...]
```

Creates a server group with the name passed in `name` using the server Id(s) passed as argument(s) thereafter.
This command accepts the default flags.
### runtime-mgr:serverGroup:describe
```
> runtime-mgr:serverGroup:describe [flags] <serverGroupId>
```

Describes the server group passed in `serverGroupId`.
This command accepts the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:serverGroup:delete
```
> runtime-mgr:serverGroup:delete [flags] <serverGroupId>
```

Deletes the server groups passed in `serverGroupId`.
This command accepts the default flags.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation.   
---  
### runtime-mgr:serverGroup:list
```
> runtime-mgr:serverGroup:list [flags]
```

Lists all server groups in the environment.
This command has the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:serverGroup:modify
```
> runtime-mgr:serverGroup:modify [flags] <serverGroupId>
```

Modifies the server group passed in `serverGroupId`.
In order to update the id for the cluster, you need to pass the `--name` flag.
This command accepts the default flags.
### runtime-mgr:serverGroup:remove:server
```
> runtime-mgr:serverGroup:remove:server [flags] <serverGroupId> <serverId>
```

Removes the server passed in `serverId` from the server group passed in `serverGroupId`.
This command accepts the default flags.
## Local Cluster Servers
Command | Description  
---|---  
runtime-mgr:cluster:add:server |  Adds server to cluster  
runtime-mgr:cluster:create |  Creates new cluster  
runtime-mgr:cluster:describe |  Describes server cluster  
runtime-mgr:cluster:delete |  Deletes cluster  
runtime-mgr:cluster:modify |  Modifies cluster  
runtime-mgr:cluster:list |  Lists all clusters in the environment  
runtime-mgr:cluster:remove:server |  Removes server from a cluster  
### runtime-mgr:cluster:add:server
```
> runtime-mgr:cluster:add:server [flags] <clusterId> <serverId>
```

Adds the cluster in `clusterId` to the server passed in `serverId`.
This command accepts the default flags.
### runtime-mgr:cluster:create
```
> runtime-mgr:cluster:create <name> [flags]
```

This command creates a cluster using the id passed in `name`.
In addition to the default flags, this command accepts the following flags:
Flag | Description | Example  
---|---|---  
Whether cluster should be multicast  
Pair of server ID and IP address IP address is optional for multicast cluster Provide multiple values to add multiple servers |  `--server 903083:192.168.0.1`  
This command has multi-option flags. When using multi-option flags in a command, either put the parameter before the flags or use a `-- ` (two dashes followed by a space) before the parameter.   
---  
### runtime-mgr:cluster:describe
```
> runtime-mgr:cluster:describe [flags] <clusterId>
```

Describes the cluster passed in `clusterId`.
This command accepts the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:cluster:delete
```
> runtime-mgr:cluster:delete [flags] <clusterId>
```

Deletes the cluster passed in `clusterId`.
This command accepts the default flags.
This command does not prompt twice before deleting. If you send a delete instruction, it does not ask for confirmation.   
---  
### runtime-mgr:cluster:list
```
> runtime-mgr:cluster:list [flags]
```

Lists all clusters in the environment.
This command has the `--output` flag. Use the `--output` flag to specify the response format. Supported values are `table` (default) and `json`.
This command accepts the default flags.
### runtime-mgr:cluster:modify
```
> runtime-mgr:cluster:modify [flags] <clusterId>
```

Modifies the cluster passed in `clusterId`. In order to update the id for the cluster, you need to pass the `--name` flag.
This command accepts the default flags.
### runtime-mgr:cluster:remove:server
```
> runtime-mgr:cluster:remove:server [flags] <clusterId> <serverId>
```

Removes the server passed in `serverId` from the cluster passed in `clusterId`.
This command accepts the default flags.
## CLI for Cloudhub 2.0
You can use CLI commands for deploying and managing applications in Cloudhub 2.0.
  * Deploying Apps with Anypoint CLI


## CLI for CloudHub
Anypoint CLI supports managing these CloudHub features:
  * CloudHub Applications
  * CloudHub Dedicated Load Balancers
  * Anypoint Virtual Private Cloud


## CLI for Anypoint Runtime Fabric
Anypoint CLI supports managing these Runtime Fabric features:
  * Runtime Fabric App Management
  * Runtime Fabric Instances


## See Also
  * Anypoint Platform CLI 4.x Overview