nextmv 1.0.0__py3-none-any.whl → 1.0.0.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. nextmv/__about__.py +1 -1
  2. nextmv/__entrypoint__.py +2 -1
  3. nextmv/__init__.py +4 -0
  4. nextmv/cli/CONTRIBUTING.md +40 -112
  5. nextmv/cli/cloud/__init__.py +0 -4
  6. nextmv/cli/cloud/acceptance/create.py +22 -20
  7. nextmv/cli/cloud/acceptance/delete.py +12 -8
  8. nextmv/cli/cloud/acceptance/get.py +10 -9
  9. nextmv/cli/cloud/acceptance/list.py +3 -3
  10. nextmv/cli/cloud/acceptance/update.py +6 -6
  11. nextmv/cli/cloud/account/__init__.py +3 -3
  12. nextmv/cli/cloud/account/create.py +11 -11
  13. nextmv/cli/cloud/account/delete.py +8 -7
  14. nextmv/cli/cloud/account/get.py +3 -3
  15. nextmv/cli/cloud/account/update.py +5 -5
  16. nextmv/cli/cloud/app/create.py +26 -25
  17. nextmv/cli/cloud/app/delete.py +7 -6
  18. nextmv/cli/cloud/app/exists.py +2 -2
  19. nextmv/cli/cloud/app/get.py +2 -2
  20. nextmv/cli/cloud/app/list.py +3 -3
  21. nextmv/cli/cloud/app/push.py +54 -349
  22. nextmv/cli/cloud/app/update.py +12 -12
  23. nextmv/cli/cloud/batch/create.py +28 -26
  24. nextmv/cli/cloud/batch/delete.py +10 -6
  25. nextmv/cli/cloud/batch/get.py +9 -9
  26. nextmv/cli/cloud/batch/list.py +3 -3
  27. nextmv/cli/cloud/batch/metadata.py +4 -4
  28. nextmv/cli/cloud/batch/update.py +6 -6
  29. nextmv/cli/cloud/data/__init__.py +1 -1
  30. nextmv/cli/cloud/data/upload.py +15 -15
  31. nextmv/cli/cloud/ensemble/__init__.py +0 -2
  32. nextmv/cli/cloud/ensemble/create.py +22 -21
  33. nextmv/cli/cloud/ensemble/delete.py +10 -6
  34. nextmv/cli/cloud/ensemble/get.py +4 -4
  35. nextmv/cli/cloud/ensemble/update.py +9 -9
  36. nextmv/cli/cloud/input_set/__init__.py +0 -2
  37. nextmv/cli/cloud/input_set/create.py +22 -22
  38. nextmv/cli/cloud/input_set/get.py +3 -3
  39. nextmv/cli/cloud/input_set/list.py +3 -3
  40. nextmv/cli/cloud/input_set/update.py +24 -24
  41. nextmv/cli/cloud/instance/create.py +15 -14
  42. nextmv/cli/cloud/instance/delete.py +7 -6
  43. nextmv/cli/cloud/instance/exists.py +2 -2
  44. nextmv/cli/cloud/instance/get.py +2 -2
  45. nextmv/cli/cloud/instance/list.py +3 -3
  46. nextmv/cli/cloud/instance/update.py +14 -14
  47. nextmv/cli/cloud/managed_input/create.py +16 -14
  48. nextmv/cli/cloud/managed_input/delete.py +8 -7
  49. nextmv/cli/cloud/managed_input/get.py +3 -3
  50. nextmv/cli/cloud/managed_input/list.py +3 -3
  51. nextmv/cli/cloud/managed_input/update.py +9 -9
  52. nextmv/cli/cloud/run/cancel.py +2 -2
  53. nextmv/cli/cloud/run/create.py +40 -34
  54. nextmv/cli/cloud/run/get.py +8 -8
  55. nextmv/cli/cloud/run/input.py +4 -4
  56. nextmv/cli/cloud/run/list.py +6 -6
  57. nextmv/cli/cloud/run/logs.py +10 -9
  58. nextmv/cli/cloud/run/metadata.py +4 -4
  59. nextmv/cli/cloud/run/track.py +33 -32
  60. nextmv/cli/cloud/scenario/create.py +21 -21
  61. nextmv/cli/cloud/scenario/delete.py +10 -6
  62. nextmv/cli/cloud/scenario/get.py +9 -9
  63. nextmv/cli/cloud/scenario/list.py +3 -3
  64. nextmv/cli/cloud/scenario/metadata.py +4 -4
  65. nextmv/cli/cloud/scenario/update.py +6 -6
  66. nextmv/cli/cloud/secrets/create.py +17 -17
  67. nextmv/cli/cloud/secrets/delete.py +10 -6
  68. nextmv/cli/cloud/secrets/get.py +4 -4
  69. nextmv/cli/cloud/secrets/list.py +3 -3
  70. nextmv/cli/cloud/secrets/update.py +20 -17
  71. nextmv/cli/cloud/upload/create.py +2 -2
  72. nextmv/cli/cloud/version/create.py +10 -9
  73. nextmv/cli/cloud/version/delete.py +7 -6
  74. nextmv/cli/cloud/version/exists.py +2 -2
  75. nextmv/cli/cloud/version/get.py +2 -2
  76. nextmv/cli/cloud/version/list.py +3 -3
  77. nextmv/cli/cloud/version/update.py +8 -8
  78. nextmv/cli/community/__init__.py +1 -1
  79. nextmv/cli/community/clone.py +204 -20
  80. nextmv/cli/community/list.py +125 -60
  81. nextmv/cli/configuration/config.py +10 -43
  82. nextmv/cli/configuration/create.py +7 -7
  83. nextmv/cli/configuration/delete.py +8 -8
  84. nextmv/cli/configuration/list.py +3 -3
  85. nextmv/cli/main.py +36 -26
  86. nextmv/cli/message.py +54 -71
  87. nextmv/cli/options.py +0 -28
  88. nextmv/cli/version.py +1 -1
  89. nextmv/cloud/__init__.py +38 -14
  90. nextmv/cloud/acceptance_test.py +65 -1
  91. nextmv/cloud/account.py +6 -1
  92. nextmv/cloud/application/__init__.py +75 -18
  93. nextmv/cloud/application/_acceptance.py +8 -13
  94. nextmv/cloud/application/_batch_scenario.py +19 -4
  95. nextmv/cloud/application/_input_set.py +6 -42
  96. nextmv/cloud/application/_instance.py +3 -3
  97. nextmv/cloud/application/_managed_input.py +2 -2
  98. nextmv/cloud/application/_version.py +3 -4
  99. nextmv/cloud/batch_experiment.py +1 -3
  100. nextmv/cloud/integration.py +4 -7
  101. nextmv/deprecated.py +3 -5
  102. nextmv/input.py +52 -0
  103. nextmv/local/runner.py +1 -1
  104. nextmv/model.py +11 -50
  105. nextmv/options.py +256 -11
  106. nextmv/output.py +62 -0
  107. nextmv/run.py +10 -1
  108. nextmv/status.py +51 -1
  109. {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/METADATA +4 -5
  110. nextmv-1.0.0.dev0.dist-info/RECORD +158 -0
  111. nextmv/cli/cloud/ensemble/list.py +0 -63
  112. nextmv/cli/cloud/input_set/delete.py +0 -64
  113. nextmv/cli/cloud/shadow/__init__.py +0 -33
  114. nextmv/cli/cloud/shadow/create.py +0 -184
  115. nextmv/cli/cloud/shadow/delete.py +0 -64
  116. nextmv/cli/cloud/shadow/get.py +0 -61
  117. nextmv/cli/cloud/shadow/list.py +0 -63
  118. nextmv/cli/cloud/shadow/metadata.py +0 -66
  119. nextmv/cli/cloud/shadow/start.py +0 -43
  120. nextmv/cli/cloud/shadow/stop.py +0 -53
  121. nextmv/cli/cloud/shadow/update.py +0 -96
  122. nextmv/cli/cloud/switchback/__init__.py +0 -33
  123. nextmv/cli/cloud/switchback/create.py +0 -151
  124. nextmv/cli/cloud/switchback/delete.py +0 -64
  125. nextmv/cli/cloud/switchback/get.py +0 -62
  126. nextmv/cli/cloud/switchback/list.py +0 -63
  127. nextmv/cli/cloud/switchback/metadata.py +0 -68
  128. nextmv/cli/cloud/switchback/start.py +0 -43
  129. nextmv/cli/cloud/switchback/stop.py +0 -53
  130. nextmv/cli/cloud/switchback/update.py +0 -96
  131. nextmv/cli/confirm.py +0 -34
  132. nextmv/cloud/application/_shadow.py +0 -320
  133. nextmv/cloud/application/_switchback.py +0 -332
  134. nextmv/cloud/community.py +0 -446
  135. nextmv/cloud/shadow.py +0 -254
  136. nextmv/cloud/switchback.py +0 -228
  137. nextmv-1.0.0.dist-info/RECORD +0 -185
  138. nextmv-1.0.0.dist-info/entry_points.txt +0 -2
  139. {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/WHEEL +0 -0
  140. {nextmv-1.0.0.dist-info → nextmv-1.0.0.dev0.dist-info}/licenses/LICENSE +0 -0
@@ -38,13 +38,13 @@ def update(
38
38
  metavar="DESCRIPTION",
39
39
  ),
40
40
  ] = None,
41
- managed_inputs: Annotated[
41
+ inputs: Annotated[
42
42
  str | None,
43
43
  typer.Option(
44
- "--managed-inputs",
45
- help="Managed inputs for the input set. Data should be valid [magenta]json[/magenta]. Object "
46
- "format: [dim][{'id': 'id', 'name': 'name', 'description': 'description'}][/dim].",
47
- metavar="MANAGED_INPUTS",
44
+ "--inputs",
45
+ help="Inputs for the input set. Data should be valid [magenta]json[/magenta]. Object "
46
+ "format: [magenta][{'id': 'id', 'name': 'name', 'description': 'description'}][/magenta].",
47
+ metavar="INPUTS",
48
48
  ),
49
49
  ] = None,
50
50
  output: Annotated[
@@ -62,50 +62,50 @@ def update(
62
62
  Updates a Nextmv Cloud input set.
63
63
 
64
64
  This command updates the metadata of an existing input set. You can update
65
- the name, description, or managed inputs of the input set.
65
+ the name, description, or inputs of the input set.
66
66
 
67
67
  [bold][underline]Examples[/underline][/bold]
68
68
 
69
69
  - Update an input set's name.
70
- $ [dim]nextmv cloud input-set update --app-id hare-app \\
71
- --input-set-id hare-input-set --name "New Name"[/dim]
70
+ $ [green]nextmv cloud input-set update --app-id hare-app \\
71
+ --input-set-id hare-input-set --name "New Name"[/green]
72
72
 
73
73
  - Update an input set's description.
74
- $ [dim]nextmv cloud input-set update --app-id hare-app \\
75
- --input-set-id hare-input-set --description "Updated description"[/dim]
74
+ $ [green]nextmv cloud input-set update --app-id hare-app \\
75
+ --input-set-id hare-input-set --description "Updated description"[/green]
76
76
 
77
- - Update an input set's managed inputs.
78
- $ [dim]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
79
- --managed-inputs '[{"id": "hare-input-1", "name": "hare input", "description": "hare description"}]'[/dim]
77
+ - Update an input set's inputs.
78
+ $ [green]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
79
+ --inputs '[{"id": "hare-input-1", "name": "hare input", "description": "hare description"}]'[/green]
80
80
 
81
81
  - Update both name and description.
82
- $ [dim]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
83
- --name "New Name" --description "Updated description"[/dim]
82
+ $ [green]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
83
+ --name "New Name" --description "Updated description"[/green]
84
84
 
85
85
  - Update and save to a file.
86
- $ [dim]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
87
- --name "New Name" --output updated_input_set.json[/dim]
86
+ $ [green]nextmv cloud input-set update --app-id hare-app --input-set-id hare-input-set \\
87
+ --name "New Name" --output updated_input_set.json[/green]
88
88
  """
89
89
 
90
- if name is None and description is None and managed_inputs is None:
91
- error("Provide at least one option: --name, --description, or --managed-inputs.")
90
+ if name is None and description is None and inputs is None:
91
+ error("Provide at least one option: [code]--name[/code], [code]--description[/code], or [code]--inputs[/code].")
92
92
 
93
93
  cloud_app = build_app(app_id=app_id, profile=profile)
94
94
  in_progress(msg="Updating input set...")
95
95
 
96
- managed_input_list = []
97
- if managed_inputs is not None:
98
- for d in json.loads(managed_inputs):
96
+ managed_inputs = []
97
+ if inputs is not None:
98
+ for d in json.loads(inputs):
99
99
  i = ManagedInput.from_dict(d)
100
100
  if i is None:
101
101
  error(f"[magenta]{d}[/magenta] is not a valid [yellow]ManagedInput[/yellow]")
102
- managed_input_list.append(i)
102
+ managed_inputs.append(i)
103
103
 
104
104
  updated_input_set = cloud_app.update_input_set(
105
105
  id=input_set_id,
106
106
  name=name,
107
107
  description=description,
108
- inputs=managed_input_list,
108
+ inputs=managed_inputs,
109
109
  )
110
110
  success(
111
111
  f"Input set [magenta]{input_set_id}[/magenta] updated successfully in application [magenta]{app_id}[/magenta]."
@@ -131,35 +131,36 @@ def create(
131
131
  """
132
132
  Create a new Nextmv Cloud application instance.
133
133
 
134
- Use the --exist-ok flag to avoid errors when creating an instance with an
135
- ID that already exists. This is useful for scripts that need to ensure an
136
- instance exists without worrying about whether it was created previously.
134
+ Use the [code]--exist-ok[/code] flag to avoid errors when creating an
135
+ instance with an ID that already exists. This is useful for scripts that
136
+ need to ensure an instance exists without worrying about whether it was
137
+ created previously.
137
138
 
138
139
  [bold][underline]Examples[/underline][/bold]
139
140
 
140
141
  - Create an instance for application [magenta]hare-app[/magenta] version [magenta]v1[/magenta].
141
- $ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 --instance-id prod[/dim]
142
+ $ [green]nextmv cloud instance create --app-id hare-app --version-id v1 --instance-id prod[/green]
142
143
 
143
144
  - Create an instance with a specific name.
144
- $ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
145
- --instance-id prod --name "Production Instance"[/dim]
145
+ $ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
146
+ --instance-id prod --name "Production Instance"[/green]
146
147
 
147
148
  - Create an instance with a name and description.
148
- $ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
149
+ $ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
149
150
  --instance-id prod --name "Production Instance" \\
150
- --description "Instance for production routing jobs"[/dim]
151
+ --description "Instance for production routing jobs"[/green]
151
152
 
152
153
  - Create an instance, or get it if it already exists.
153
- $ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
154
- --instance-id prod --exist-ok[/dim]
154
+ $ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
155
+ --instance-id prod --exist-ok[/green]
155
156
 
156
157
  - Create an instance with configuration options.
157
- $ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
158
- --instance-id prod --execution-class 6c9500mb870s --priority 1[/dim]
158
+ $ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
159
+ --instance-id prod --execution-class 6c9500mb870s --priority 1[/green]
159
160
 
160
161
  - Create an instance with runtime options.
161
- $ [dim]nextmv cloud instance create --app-id hare-app --version-id v1 \\
162
- --instance-id prod --options max_duration=30 --options timeout=60[/dim]
162
+ $ [green]nextmv cloud instance create --app-id hare-app --version-id v1 \\
163
+ --instance-id prod --options max_duration=30 --options timeout=60[/green]
163
164
  """
164
165
 
165
166
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -5,9 +5,9 @@ This module defines the cloud instance delete command for the Nextmv CLI.
5
5
  from typing import Annotated
6
6
 
7
7
  import typer
8
+ from rich.prompt import Confirm
8
9
 
9
10
  from nextmv.cli.configuration.config import build_app
10
- from nextmv.cli.confirm import get_confirmation
11
11
  from nextmv.cli.message import info, success
12
12
  from nextmv.cli.options import AppIDOption, InstanceIDOption, ProfileOption
13
13
 
@@ -32,26 +32,27 @@ def delete(
32
32
  """
33
33
  Deletes a Nextmv Cloud application instance.
34
34
 
35
- This action is permanent and cannot be undone. Use the --yes
35
+ This action is permanent and cannot be undone. Use the [code]--yes[/code]
36
36
  flag to skip the confirmation prompt.
37
37
 
38
38
  [bold][underline]Examples[/underline][/bold]
39
39
 
40
40
  - Delete the instance with the ID [magenta]prod[/magenta] from application [magenta]hare-app[/magenta].
41
- $ [dim]nextmv cloud instance delete --app-id hare-app --instance-id prod[/dim]
41
+ $ [green]nextmv cloud instance delete --app-id hare-app --instance-id prod[/green]
42
42
 
43
43
  - Delete the instance without confirmation prompt.
44
- $ [dim]nextmv cloud instance delete --app-id hare-app --instance-id prod --yes[/dim]
44
+ $ [green]nextmv cloud instance delete --app-id hare-app --instance-id prod --yes[/green]
45
45
  """
46
46
 
47
47
  if not yes:
48
- confirm = get_confirmation(
48
+ confirm = Confirm.ask(
49
49
  f"Are you sure you want to delete instance [magenta]{instance_id}[/magenta] "
50
50
  f"from application [magenta]{app_id}[/magenta]? This action cannot be undone.",
51
+ default=False,
51
52
  )
52
53
 
53
54
  if not confirm:
54
- info(f"Instance [magenta]{instance_id}[/magenta] will not be deleted.")
55
+ info(msg=f"Instance [magenta]{instance_id}[/magenta] will not be deleted.", emoji=":bulb:")
55
56
  return
56
57
 
57
58
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -27,10 +27,10 @@ def exists(
27
27
  [bold][underline]Examples[/underline][/bold]
28
28
 
29
29
  - Check if the instance with the ID [magenta]prod[/magenta] exists in application [magenta]hare-app[/magenta].
30
- $ [dim]nextmv cloud instance exists --app-id hare-app --instance-id prod[/dim]
30
+ $ [green]nextmv cloud instance exists --app-id hare-app --instance-id prod[/green]
31
31
 
32
32
  - Check if the instance exists using the profile named [magenta]hare[/magenta].
33
- $ [dim]nextmv cloud instance exists --app-id hare-app --instance-id prod --profile hare[/dim]
33
+ $ [green]nextmv cloud instance exists --app-id hare-app --instance-id prod --profile hare[/green]
34
34
  """
35
35
 
36
36
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -39,11 +39,11 @@ def get(
39
39
  [bold][underline]Examples[/underline][/bold]
40
40
 
41
41
  - Get the instance with the ID [magenta]prod[/magenta] from application [magenta]hare-app[/magenta].
42
- $ [dim]nextmv cloud instance get --app-id hare-app --instance-id prod[/dim]
42
+ $ [green]nextmv cloud instance get --app-id hare-app --instance-id prod[/green]
43
43
 
44
44
  - Get the instance with the ID [magenta]prod[/magenta] and save the information to a
45
45
  [magenta]instance.json[/magenta] file.
46
- $ [dim]nextmv cloud instance get --app-id hare-app --instance-id prod --output instance.json[/dim]
46
+ $ [green]nextmv cloud instance get --app-id hare-app --instance-id prod --output instance.json[/green]
47
47
  """
48
48
 
49
49
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -35,13 +35,13 @@ def list(
35
35
  [bold][underline]Examples[/underline][/bold]
36
36
 
37
37
  - List all instances of application [magenta]hare-app[/magenta].
38
- $ [dim]nextmv cloud instance list --app-id hare-app[/dim]
38
+ $ [green]nextmv cloud instance list --app-id hare-app[/green]
39
39
 
40
40
  - List all instances using the profile named [magenta]hare[/magenta].
41
- $ [dim]nextmv cloud instance list --app-id hare-app --profile hare[/dim]
41
+ $ [green]nextmv cloud instance list --app-id hare-app --profile hare[/green]
42
42
 
43
43
  - List all instances and save the information to a [magenta]instances.json[/magenta] file.
44
- $ [dim]nextmv cloud instance list --app-id hare-app --output instances.json[/dim]
44
+ $ [green]nextmv cloud instance list --app-id hare-app --output instances.json[/green]
45
45
  """
46
46
 
47
47
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -132,30 +132,30 @@ def update(
132
132
  [bold][underline]Examples[/underline][/bold]
133
133
 
134
134
  - Update an instance's name.
135
- $ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod --name "Production Instance"[/dim]
135
+ $ [green]nextmv cloud instance update --app-id hare-app --instance-id prod --name "Production Instance"[/green]
136
136
 
137
137
  - Update an instance's description.
138
- $ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
139
- --description "Instance for production routing jobs"[/dim]
138
+ $ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
139
+ --description "Instance for production routing jobs"[/green]
140
140
 
141
141
  - Update an instance to use a different version.
142
- $ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod --version-id v2[/dim]
142
+ $ [green]nextmv cloud instance update --app-id hare-app --instance-id prod --version-id v2[/green]
143
143
 
144
144
  - Update an instance's name and description at once.
145
- $ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
146
- --name "Production Instance" --description "Instance for production routing jobs"[/dim]
145
+ $ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
146
+ --name "Production Instance" --description "Instance for production routing jobs"[/green]
147
147
 
148
148
  - Update an instance and save the updated information to a [magenta]updated_instance.json[/magenta] file.
149
- $ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
150
- --name "Production Instance" --output updated_instance.json[/dim]
149
+ $ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
150
+ --name "Production Instance" --output updated_instance.json[/green]
151
151
 
152
152
  - Update an instance's execution class and priority.
153
- $ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
154
- --execution-class 6c9500mb870s --priority 1[/dim]
153
+ $ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
154
+ --execution-class 6c9500mb870s --priority 1[/green]
155
155
 
156
156
  - Update an instance's runtime options.
157
- $ [dim]nextmv cloud instance update --app-id hare-app --instance-id prod \\
158
- --options max_duration=30 --options timeout=60[/dim]
157
+ $ [green]nextmv cloud instance update --app-id hare-app --instance-id prod \\
158
+ --options max_duration=30 --options timeout=60[/green]
159
159
  """
160
160
 
161
161
  # Check if any configuration options are provided
@@ -173,8 +173,8 @@ def update(
173
173
 
174
174
  if name is None and description is None and version_id is None and not has_config_options:
175
175
  error(
176
- "Provide at least one option to update: --name, --description, "
177
- "--version-id, or any [magenta]Instance configuration[/magenta] option."
176
+ "Provide at least one option to update: [code]--name[/code], [code]--description[/code], "
177
+ "[code]--version-id[/code], or any [magenta]Instance configuration[/magenta] option."
178
178
  )
179
179
 
180
180
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -62,7 +62,8 @@ def create(
62
62
  typer.Option(
63
63
  "--run-id",
64
64
  "-r",
65
- help="ID of the run to use for the managed input. Either --upload-id or --run-id must be specified.",
65
+ help="ID of the run to use for the managed input. "
66
+ "Either [code]--upload-id[/code] or [code]--run-id[/code] must be specified.",
66
67
  envvar="NEXTMV_RUN_ID",
67
68
  metavar="RUN_ID",
68
69
  ),
@@ -72,7 +73,8 @@ def create(
72
73
  typer.Option(
73
74
  "--upload-id",
74
75
  "-u",
75
- help="ID of the upload to use for the managed input. Either --upload-id or --run-id must be specified.",
76
+ help="ID of the upload to use for the managed input. "
77
+ "Either [code]--upload-id[/code] or [code]--run-id[/code] must be specified.",
76
78
  metavar="UPLOAD_ID",
77
79
  ),
78
80
  ] = None,
@@ -82,8 +84,8 @@ def create(
82
84
  Create a new Nextmv Cloud application managed input.
83
85
 
84
86
  A managed input can be created from either an upload or a run. Use the
85
- --upload-id flag to create from an upload, or the --run-id flag to create
86
- from a run output.
87
+ [code]--upload-id[/code] flag to create from an upload, or the
88
+ [code]--run-id[/code] flag to create from a run output.
87
89
 
88
90
  You can get an upload ID by using the [code]nextmv cloud upload
89
91
  create[/code] command. The [magenta].upload_id[/magenta] field in the
@@ -98,26 +100,26 @@ def create(
98
100
  [bold][underline]Examples[/underline][/bold]
99
101
 
100
102
  - Create a managed input from an upload.
101
- $ [dim]nextmv cloud managed-input create --app-id hare-app --name "Test Input 1" \
102
- --upload-id upl_123456789[/dim]
103
+ $ [green]nextmv cloud managed-input create --app-id hare-app --name "Test Input 1" \
104
+ --upload-id upl_123456789[/green]
103
105
 
104
106
  - Create a managed input from a run.
105
- $ [dim]nextmv cloud managed-input create --app-id hare-app --name "Baseline Run" \
106
- --run-id run_123456789[/dim]
107
+ $ [green]nextmv cloud managed-input create --app-id hare-app --name "Baseline Run" \
108
+ --run-id run_123456789[/green]
107
109
 
108
110
  - Create a managed input with a specific ID and description.
109
- $ [dim]nextmv cloud managed-input create --app-id hare-app --name "Test Input" \\
110
- --managed-input-id inp_custom --description "Test case for validation" --upload-id upl_123456789[/dim]
111
+ $ [green]nextmv cloud managed-input create --app-id hare-app --name "Test Input" \\
112
+ --managed-input-id inp_custom --description "Test case for validation" --upload-id upl_123456789[/green]
111
113
 
112
114
  - Create a managed input with custom format.
113
- $ [dim]nextmv cloud managed-input create --app-id hare-app --name "CSV Input" \\
114
- --upload-id upl_123456789 --content-format csv[/dim]
115
+ $ [green]nextmv cloud managed-input create --app-id hare-app --name "CSV Input" \\
116
+ --upload-id upl_123456789 --content-format csv[/green]
115
117
  """
116
118
 
117
119
  if upload_id is None and run_id is None:
118
120
  error(
119
- "Either --upload-id or --run-id must be specified. "
120
- "Use nextmv cloud upload create to create an upload first, "
121
+ "Either [code]--upload-id[/code] or [code]--run-id[/code] must be specified. "
122
+ "Use [code]nextmv cloud upload create[/code] to create an upload first, "
121
123
  "or specify an existing run ID."
122
124
  )
123
125
 
@@ -5,9 +5,9 @@ This module defines the cloud managed-input delete command for the Nextmv CLI.
5
5
  from typing import Annotated
6
6
 
7
7
  import typer
8
+ from rich.prompt import Confirm
8
9
 
9
10
  from nextmv.cli.configuration.config import build_app
10
- from nextmv.cli.confirm import get_confirmation
11
11
  from nextmv.cli.message import info, success
12
12
  from nextmv.cli.options import AppIDOption, ManagedInputIDOption, ProfileOption
13
13
 
@@ -32,28 +32,29 @@ def delete(
32
32
  """
33
33
  Deletes a Nextmv Cloud application managed input.
34
34
 
35
- This action is permanent and cannot be undone. Use the --yes
35
+ This action is permanent and cannot be undone. Use the [code]--yes[/code]
36
36
  flag to skip the confirmation prompt.
37
37
 
38
38
  [bold][underline]Examples[/underline][/bold]
39
39
 
40
40
  - Delete the managed input with the ID [magenta]inp_123456789[/magenta] from application
41
41
  [magenta]hare-app[/magenta].
42
- $ [dim]nextmv cloud managed-input delete --app-id hare-app \
43
- --managed-input-id inp_123456789[/dim]
42
+ $ [green]nextmv cloud managed-input delete --app-id hare-app \
43
+ --managed-input-id inp_123456789[/green]
44
44
 
45
45
  - Delete the managed input without confirmation prompt.
46
- $ [dim]nextmv cloud managed-input delete --app-id hare-app --managed-input-id inp_123456789 --yes[/dim]
46
+ $ [green]nextmv cloud managed-input delete --app-id hare-app --managed-input-id inp_123456789 --yes[/green]
47
47
  """
48
48
 
49
49
  if not yes:
50
- confirm = get_confirmation(
50
+ confirm = Confirm.ask(
51
51
  f"Are you sure you want to delete managed input [magenta]{managed_input_id}[/magenta] "
52
52
  f"from application [magenta]{app_id}[/magenta]? This action cannot be undone.",
53
+ default=False,
53
54
  )
54
55
 
55
56
  if not confirm:
56
- info(f"Managed input [magenta]{managed_input_id}[/magenta] will not be deleted.")
57
+ info(msg=f"Managed input [magenta]{managed_input_id}[/magenta] will not be deleted.", emoji=":bulb:")
57
58
  return
58
59
 
59
60
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -39,12 +39,12 @@ def get(
39
39
  [bold][underline]Examples[/underline][/bold]
40
40
 
41
41
  - Get the managed input with the ID [magenta]inp_123456789[/magenta] from application [magenta]hare-app[/magenta].
42
- $ [dim]nextmv cloud managed-input get --app-id hare-app --managed-input-id inp_123456789[/dim]
42
+ $ [green]nextmv cloud managed-input get --app-id hare-app --managed-input-id inp_123456789[/green]
43
43
 
44
44
  - Get the managed input with the ID [magenta]inp_123456789[/magenta] and save the information to a
45
45
  [magenta]managed_input.json[/magenta] file.
46
- $ [dim]nextmv cloud managed-input get --app-id hare-app --managed-input-id inp_123456789 \
47
- --output managed_input.json[/dim]
46
+ $ [green]nextmv cloud managed-input get --app-id hare-app --managed-input-id inp_123456789 \
47
+ --output managed_input.json[/green]
48
48
  """
49
49
 
50
50
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -35,13 +35,13 @@ def list(
35
35
  [bold][underline]Examples[/underline][/bold]
36
36
 
37
37
  - List all managed inputs of application [magenta]hare-app[/magenta].
38
- $ [dim]nextmv cloud managed-input list --app-id hare-app[/dim]
38
+ $ [green]nextmv cloud managed-input list --app-id hare-app[/green]
39
39
 
40
40
  - List all managed inputs using the profile named [magenta]hare[/magenta].
41
- $ [dim]nextmv cloud managed-input list --app-id hare-app --profile hare[/dim]
41
+ $ [green]nextmv cloud managed-input list --app-id hare-app --profile hare[/green]
42
42
 
43
43
  - List all managed inputs and save the information to a [magenta]managed_inputs.json[/magenta] file.
44
- $ [dim]nextmv cloud managed-input list --app-id hare-app --output managed_inputs.json[/dim]
44
+ $ [green]nextmv cloud managed-input list --app-id hare-app --output managed_inputs.json[/green]
45
45
  """
46
46
 
47
47
  cloud_app = build_app(app_id=app_id, profile=profile)
@@ -54,24 +54,24 @@ def update(
54
54
  [bold][underline]Examples[/underline][/bold]
55
55
 
56
56
  - Update a managed input's name.
57
- $ [dim]nextmv cloud managed-input update --app-id hare-app \
58
- --managed-input-id inp_123456789 --name "Updated Test Input"[/dim]
57
+ $ [green]nextmv cloud managed-input update --app-id hare-app \
58
+ --managed-input-id inp_123456789 --name "Updated Test Input"[/green]
59
59
 
60
60
  - Update a managed input's description.
61
- $ [dim]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
62
- --description "Updated test case for validation"[/dim]
61
+ $ [green]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
62
+ --description "Updated test case for validation"[/green]
63
63
 
64
64
  - Update a managed input's name and description at once.
65
- $ [dim]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
66
- --name "Updated Test Input" --description "Updated test case for validation"[/dim]
65
+ $ [green]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
66
+ --name "Updated Test Input" --description "Updated test case for validation"[/green]
67
67
 
68
68
  - Update a managed input and save the updated information to a [magenta]updated_managed_input.json[/magenta] file.
69
- $ [dim]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
70
- --name "Updated Test Input" --output updated_managed_input.json[/dim]
69
+ $ [green]nextmv cloud managed-input update --app-id hare-app --managed-input-id inp_123456789 \\
70
+ --name "Updated Test Input" --output updated_managed_input.json[/green]
71
71
  """
72
72
 
73
73
  if name is None and description is None:
74
- error("Provide at least one option to update: --name or --description.")
74
+ error("Provide at least one option to update: [code]--name[/code] or [code]--description[/code].")
75
75
 
76
76
  cloud_app = build_app(app_id=app_id, profile=profile)
77
77
 
@@ -24,11 +24,11 @@ def cancel(
24
24
  [bold][underline]Examples[/underline][/bold]
25
25
 
26
26
  - Cancel the run with ID [magenta]burrow-123[/magenta] belonging to an app with ID [magenta]hare-app[/magenta].
27
- $ [dim]nextmv cloud run cancel --app-id hare-app --run-id burrow-123[/dim]
27
+ $ [green]nextmv cloud run cancel --app-id hare-app --run-id burrow-123[/green]
28
28
 
29
29
  - Cancel the run with ID [magenta]burrow-123[/magenta] belonging to an app with ID [magenta]hare-app[/magenta].
30
30
  Use the profile named [magenta]hare[/magenta].
31
- $ [dim]nextmv cloud run cancel --app-id hare-app --run-id burrow-123 --profile hare[/dim]
31
+ $ [green]nextmv cloud run cancel --app-id hare-app --run-id burrow-123 --profile hare[/green]
32
32
  """
33
33
 
34
34
  cloud_app = build_app(app_id=app_id, profile=profile)