The nextmv app
command set is used to manage and run custom decision applications.
For this first release you can push
new binaries to Nextmv Cloud and run
them remotely with Nextmv CLI or using the Nextmv Cloud REST API.
To display more information about a command, use the help
command or one of the help global flags: --help
, -h
.
Available Commands
Command | Description | Flags |
---|---|---|
create | Creates a new application in your account | --app-id, --description, --name |
delete | Deletes an application | --app-id, --confirm |
get | Gets an application configured in your account | --app-id |
list | Lists the applications configured for your account | |
promote | Promotes an application version | --app-id, --description, --name |
push | Pushes the current project to a cloud application | --app-id |
result | Gets the results of an application run | --app-id, --output, --run-id |
run | Runs an application instance configured in your account | --app-id, --default, --input, --instance, --timeout, --wait |
update | Updates an application | --app-id, --description, --instance-id, --name |
version | A subsuite of commands to manage the versions for your application | |
instance | A subsuite of commands to manage the instances for your application |
create
The create
subcommand creates a new application. An application represents a problem you are solving, for example pizza delivery
. It contains things like binaries, versions, and instances used in managing and running your application.
These are the available flags for the create
subcommand:
Flag | Description |
---|---|
-a , --app-id string | Required The id of the app. Must be unique within your account and can contain lower case letters, numbers, and dashes. The maximum length is 30 characters. |
-n , --name string | Required The name for the application. |
-d , --description string | Optional The description for the application. |
delete
The delete
subcommand deletes an application. When you delete an application all of the versions and instances are also deleted.
Flag | Description |
---|---|
-a , --app-id string | Required The id of the application to delete. |
get
The get
subcommand gets the information related to an application.
Flag | Description |
---|---|
-a , --app-id string | Required The id of the application to get. |
list
The list
subcommand lists all of the applications for your account.
promote
The promote
subcommand creates a new version of an application from the last pushed binary, and assigns that version to the default instance.
Note: For this release, a single default application instance is supported. In the future, an application will have the ability to contain multiple instances with different configurations and more.
Since the CLI is oriented towards the developer, remote runs made through the CLI that don't specify an instance will run the last pushed binary. (The default instance can be specified with the --default flag.)
Calls made to the Nextmv Cloud API endpoints that don't specify an instance will run the binary specified in the default instance. (The last pushed binary can be specified in the API call with the reserved instance name "devint" which designates the latest binary.)
Flag | Description |
---|---|
-a , --app-id string | Required The id of the application to promote. |
-n , --name string | Optional The name to assign to the version. Set to the app name + a unique ID if not specified. |
-d , --description string | Optional The description for the version. |
-v , --version-id string | Optional The ID to assign to the version. Set to app ID + a unique ID if not specified. |
-i , --instance-id string | Optional The ID to assign to the default instance. Set to the app ID if not specified. |
push
You must be inside your project when running this command.
The push
subcommand updates the latest binary in the cloud with your local application build. You must run this from the directory containing your application project.
Flag | Description |
---|---|
-a , --app-id string | Required The id of the application to push to. |
result
The result
subcommand gets the results for the application specified. Results contain the output of the run, and metadata related to the execution. If the run failed or is still in progress, then only metadata will be present in the results.
Flag | Description |
---|---|
-a , --app-id string | Required The id of the application for the run. |
-r , --run-id string | Required The id of the run. |
-o , --output string | Optional The output file to write. Stdout used if not specified. |
run
The run
subcommand starts a run of an application.
Flag | Description |
---|---|
-a , --app-id string | Required The id of the application to run. |
-i , --input string | Optional The input file to use (Stdin if not specified). |
-d , --input string | Optional Run the default instance. Runs the last pushed application binary if not specified. |
-w , --wait string | Optional Waits for the run to complete, and outputs results to stdout. |
-t , --timeout string | Optional The maximum time in seconds to poll for results (default 60 seconds). |
--instance string | Optional(Future) The id of the instance to use. |
update
The update
subcommand allows updating the mutable information on the specified application. The mutable information is limited to the name, description, and ID of the default instance. If the name, description, or default instance ID tag is undefined the corresponding value will not be updated.
Flag | Description |
---|---|
-a , --app-id string | Required The ID of the application to update. |
-d , --description string | Optional The application description. Will remain unchanged if not specified. |
-i , --instance-id string | Optional The default instance ID. Will remain unchanged if not specified. |
-n , --name string | Optional The application name. Will remain unchanged if not specified. |
version
The version
subsuite for the nextmv app
command set is used to directly and explicitly manage application versions. The default workflow for the nexmtmv app
command set handles most of the functionality of this subsuite implicitly.
Available commands for version
subsuite
Command | Description | Flags |
---|---|---|
version create | Creates a new version for your application | --app-id --version-id --name --description |
version delete | Deletes the specified application version. | --app-id --version-id --confirm |
version get | Gets the specified application version. | --app-id --version-id |
version list | Lists the versions for your application | --app-id |
version update | Updates information about an application version. | --app-id --version-id --name --description |
version create
The version create
subcommand creates a new application version with the underlying binary defined by the current active development instance (i.e. the latest binary pushed to the app)
Flag | Description |
---|---|
-a , --app-id string | Required The ID of the application to create a version for. |
-d , --description string | Optional The version description. |
-n , --name string | Optional The version name. Will be set to app name + unique id if not specified. |
-v , --version-id string | Optional The ID of the version to create. Must be unique within the application. Version ID will be generated automatically if this flag is unset. |
version delete
The version delete
subcommand deletes a specified version from your application. Note that the version cannot be deleted if there are any instances running it.
Flag | Description |
---|---|
-a , --app-id string | Required The application ID for the application to delete a version from. |
-v , --version-id string | Required The ID of the version to delete. |
--confirm boolean | Optional Set to skip prompt to delete. |
version get
The version get
subcommand gets the information related to an application version.
Flag | Description |
---|---|
-a , --app-id string | Required The application ID for the application to get a version from. |
-v , --version-id string | Required The ID of the version to get. |
version list
The version list
subcommand lists all of the versions for an application.
Flag | Description |
---|---|
-a , --app-id string | Required The id of the application to list versions for. |
version update
The version update
subcommand allows updating the mutable information on the specified version of your application. The mutable information is limited to the name and description of the version. If either the name or description tag are undefined, the corresponding value will not be updated.
Flag | Description |
---|---|
-a , --app-id string | Required The ID of the application to update the version of. |
-v , --version-id string | Required The ID of the version to update. |
-d , --description string | Optional The version description. Will remain unchanged if not specified. |
-n , --name string | Optional The version name. Will remain unchanged if not specified. |
instance
The instance
subsuite for the nextmv app
command set is used to directly and explicitly manage application instances. The default workflow for the nexmtmv app
command set handles limited functionality from this subsuite implicitly.
Available commands for instance
subsuite
Command | Description | Flags |
---|---|---|
instance create | Creates a new instance for your application | --app-id --instance-id --version-id --name --description |
instance delete | Deletes the specified application instance. | --app-id --instance-id --confirm |
instance get | Gets the specified application instance. | --app-id --instance-id |
instance list | Lists the instances for your application | --app-id |
instance update | Updates information about an application instance. | --app-id --instance-id --version-id --name --description |
instance create
The instance create
subcommand creates a new application instance with the underlying version specified by user input.
Flag | Description |
---|---|
-a , --app-id string | Required The ID of the application to create an instance for. |
v , --version-id string | Required The ID of the underlying version to be used by the instance. |
-d , --description string | Optional The instance description. |
-n , --name string | Optional The instance name. Will be set to app name + unique id if not specified. |
-i , --instance-id string | Optional The ID of the instance to create. Must be unique within the application. Instance ID will be generated automatically if this flag is unset. |
instance delete
The instance delete
subcommand deletes a specified instance from your application.
Flag | Description |
---|---|
-a , --app-id string | Required The application ID for the application to delete an instance from. |
-i , --instance-id string | Required The ID of the instance to delete. |
--confirm boolean | Optional Set to skip prompt to delete. |
instance get
The instance get
subcommand gets the information related to an application instance.
Flag | Description |
---|---|
-a , --app-id string | Required The application ID for the application to get an instance from. |
-i , --instance-id string | Required The ID of the instance to get. |
instance list
The instance list
subcommand lists all of the instances for an application.
Flag | Description |
---|---|
-a , --app-id string | Required The id of the application to list instances for. |
instance update
The instance update
subcommand allows updating the information on the specified instance of your application. The instance's name, description, and the ID of the underlying version it uses can be modified. If any of these values are not defined via flags, they will not be modified
Flag | Description |
---|---|
-a , --app-id string | Required The ID of the application to update the instance of. |
-i , --instance-id string | Required The ID of the instance to update. |
-v , --version-id string | Optional The ID of the underlying version the instance uses. Will remain unchanged if not specified. |
-d , --description string | Optional The instance description. Will remain unchanged if not specified. |
-n , --name string | Optional The instance name. Will remain unchanged if not specified. |