Skip to content

Commit 5aeaf16

Browse files
Rewrite runpodctl arguments and flags using ResponseField component (#456)
Co-authored-by: promptless[bot] <179508745+promptless[bot]@users.noreply.github.com> Co-authored-by: Mo King <muhsinking@gmail.com>
1 parent 53454fc commit 5aeaf16

12 files changed

+130
-230
lines changed

runpodctl/reference/runpodctl-config.mdx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@ runpodctl config [flags]
1414
Configure the CLI with your API key:
1515

1616
```sh
17-
runpodctl config --apiKey rpaPOIUYYULKDSALVIUT3Q2ZRKZ98IUYTSK2OQQ2CWQxkd01
17+
runpodctl config \
18+
--apiKey "rpaPOIUYYULKDSALVIUT3Q2ZRKZ98IUYTSK2OQQ2CWQxkd01"
1819
```
1920

2021
## Flags
2122

22-
The following flags are available for the `config` command:
23-
24-
---
25-
26-
`--apiKey <value>``string`
27-
23+
<ResponseField name="--apiKey" type="string">
2824
Your Runpod API key, which authenticates the CLI to access your account. You can generate an API key from the [Runpod console](https://www.runpod.io/console/user/settings).
25+
</ResponseField>
2926

30-
---
31-
32-
`--apiUrl <value>``string` • default = `https://api.runpod.io/graphql`
33-
27+
<ResponseField name="--apiUrl" type="string" default="https://api.runpod.io/graphql">
3428
The Runpod API endpoint URL. The default value should work for most users.
29+
</ResponseField>

runpodctl/reference/runpodctl-create-pod.mdx

Lines changed: 42 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -14,114 +14,85 @@ runpodctl create pod [flags]
1414
Create a Pod with 2 RTX 4090 GPUs in the Secure Cloud with a custom container image:
1515

1616
```sh
17-
runpodctl create pod --name "my-training-pod" --gpuType "RTX 4090" --gpuCount 2 --secureCloud --imageName "runpod/pytorch:2.0.1-py3.10-cuda11.8.0-devel" --containerDiskSize 50 --volumeSize 100
17+
runpodctl create pod \
18+
--name "my-training-pod" \
19+
--gpuType "RTX 4090" \
20+
--gpuCount 2 \
21+
--secureCloud \
22+
--imageName "runpod/pytorch:2.0.1-py3.10-cuda11.8.0-devel" \
23+
--containerDiskSize 50 \
24+
--volumeSize 100
1825
```
1926

2027
## Flags
2128

22-
The following flags are available for the `create pod` command:
23-
24-
---
25-
26-
`--name <value>``string`
27-
29+
<ResponseField name="--name" type="string">
2830
A custom name for your Pod to make it easy to identify and reference.
31+
</ResponseField>
2932

30-
---
31-
32-
`--gpuType <value>``string`
33-
33+
<ResponseField name="--gpuType" type="string">
3434
The [GPU type](/references/gpu-types) to use for the Pod (e.g., `RTX 4090`, `A100 80GB`, `H100 SXM`).
35+
</ResponseField>
3536

36-
---
37-
38-
`--gpuCount <number>``integer` • default = `1`
39-
37+
<ResponseField name="--gpuCount" type="integer" default={1}>
4038
The number of GPUs to allocate to the Pod.
39+
</ResponseField>
4140

42-
---
43-
44-
`--secureCloud`
45-
41+
<ResponseField name="--secureCloud">
4642
Create the Pod in the Secure Cloud tier, which offers enterprise-grade infrastructure with enhanced reliability.
43+
</ResponseField>
4744

48-
---
49-
50-
`--communityCloud`
51-
45+
<ResponseField name="--communityCloud">
5246
Create the Pod in the Community Cloud tier, which typically offers lower pricing with spot instance availability.
47+
</ResponseField>
5348

54-
---
55-
56-
`--imageName <value>``string`
57-
49+
<ResponseField name="--imageName" type="string">
5850
The Docker container image to use for the Pod (e.g., `runpod/pytorch:latest`).
51+
</ResponseField>
5952

60-
---
61-
62-
`--templateId <value>``string`
63-
53+
<ResponseField name="--templateId" type="string">
6454
The ID of a template to use for Pod configuration, which pre-defines the image and environment settings.
55+
</ResponseField>
6556

66-
---
67-
68-
`--containerDiskSize <number>``integer` • default = `20`
69-
57+
<ResponseField name="--containerDiskSize" type="integer" default={20}>
7058
The size of the container disk in gigabytes, used for temporary storage within the container.
59+
</ResponseField>
7160

72-
---
73-
74-
`--volumeSize <number>``integer` • default = `1`
75-
61+
<ResponseField name="--volumeSize" type="integer" default={1}>
7662
The size of the persistent volume in gigabytes, which retains data across Pod restarts.
63+
</ResponseField>
7764

78-
---
79-
80-
`--volumePath <value>``string` • default = `/workspace`
81-
65+
<ResponseField name="--volumePath" type="string" default="/workspace">
8266
The mount path for the persistent volume inside the container.
67+
</ResponseField>
8368

84-
---
85-
86-
`--networkVolumeId <value>``string`
87-
69+
<ResponseField name="--networkVolumeId" type="string">
8870
The ID of an existing [network volume](/storage/network-volumes) to attach to the Pod for shared storage across multiple Pods.
71+
</ResponseField>
8972

90-
---
91-
92-
`--cost <number>``float`
93-
73+
<ResponseField name="--cost" type="float">
9474
The maximum price ceiling in dollars per hour. If not specified, the Pod will be created at the lowest available price.
75+
</ResponseField>
9576

96-
---
97-
98-
`--mem <number>``integer` • default = `20`
99-
77+
<ResponseField name="--mem" type="integer" default={20}>
10078
The minimum system memory required in gigabytes.
79+
</ResponseField>
10180

102-
---
103-
104-
`--vcpu <number>``integer` • default = `1`
105-
81+
<ResponseField name="--vcpu" type="integer" default={1}>
10682
The minimum number of vCPUs required for the Pod.
83+
</ResponseField>
10784

108-
---
109-
110-
`--env <value>``string`
111-
85+
<ResponseField name="--env" type="string">
11286
Environment variables to set in the container. Specify multiple times for multiple variables (e.g., `--env KEY1=VALUE1 -env KEY2=VALUE2`).
87+
</ResponseField>
11388

114-
---
115-
116-
`--args <value>``string`
117-
89+
<ResponseField name="--args" type="string">
11890
Additional arguments to pass to the container when it starts.
91+
</ResponseField>
11992

120-
---
121-
122-
`--ports <value>``string`
123-
93+
<ResponseField name="--ports" type="string">
12494
Ports to expose from the container. Maximum of 1 HTTP port and 1 TCP port allowed (e.g., `--ports 8888/http --ports 22/tcp`).
95+
</ResponseField>
12596

12697
## Related commands
12798

runpodctl/reference/runpodctl-create-pods.mdx

Lines changed: 44 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -11,123 +11,91 @@ runpodctl create pods [flags]
1111

1212
## Example
1313

14-
Create 3 identical Pods for distributed training in the Secure Cloud:
14+
Create 3 identical Pods with the name "training-worker" in the Secure Cloud:
1515

1616
```sh
17-
runpodctl create pods --name "training-worker" --podCount 3 --gpuType "A100 80GB" --gpuCount 1 --secureCloud --imageName "runpod/pytorch:2.0.1-py3.10-cuda11.8.0-devel"
17+
runpodctl create pods
18+
--name "training-worker" \
19+
--podCount 3 \
20+
--gpuType "A100 80GB" \
21+
--gpuCount 1 \
22+
--secureCloud \
23+
--imageName "runpod/pytorch:2.0.1-py3.10-cuda11.8.0-devel"
1824
```
1925

2026
## Flags
2127

22-
The following flags are available for the `create pods` command:
23-
24-
---
25-
26-
`--name <value>``string`
27-
28+
<ResponseField name="--name" type="string">
2829
A custom name for the Pods. All Pods in the group will share this base name.
30+
</ResponseField>
2931

30-
---
31-
32-
`--podCount <number>``integer` • default = `1`
33-
32+
<ResponseField name="--podCount" type="integer" default={1}>
3433
The number of Pods to create.
34+
</ResponseField>
3535

36-
---
37-
38-
`--gpuType <value>``string`
39-
36+
<ResponseField name="--gpuType" type="string">
4037
The GPU type to use for the Pods (e.g., `RTX 4090`, `A100 80GB`, `H100 SXM`).
38+
</ResponseField>
4139

42-
---
43-
44-
`--gpuCount <number>``integer` • default = `1`
45-
40+
<ResponseField name="--gpuCount" type="integer" default={1}>
4641
The number of GPUs to allocate to each Pod.
42+
</ResponseField>
4743

48-
---
49-
50-
`--secureCloud`
51-
44+
<ResponseField name="--secureCloud">
5245
Create the Pods in the Secure Cloud tier, which offers enterprise-grade infrastructure with enhanced reliability.
46+
</ResponseField>
5347

54-
---
55-
56-
`--communityCloud`
57-
48+
<ResponseField name="--communityCloud">
5849
Create the Pods in the Community Cloud tier, which typically offers lower pricing with spot instance availability.
50+
</ResponseField>
5951

60-
---
61-
62-
`--imageName <value>``string`
63-
52+
<ResponseField name="--imageName" type="string">
6453
The Docker container image to use for the Pods (e.g., `runpod/pytorch:latest`).
54+
</ResponseField>
6555

66-
---
67-
68-
`--templateId <value>``string`
69-
56+
<ResponseField name="--templateId" type="string">
7057
The ID of a template to use for Pod configuration, which pre-defines the image and environment settings.
58+
</ResponseField>
7159

72-
---
73-
74-
`--containerDiskSize <number>``integer` • default = `20`
75-
60+
<ResponseField name="--containerDiskSize" type="integer" default={20}>
7661
The size of the container disk in gigabytes for each Pod.
62+
</ResponseField>
7763

78-
---
79-
80-
`--volumeSize <number>``integer` • default = `1`
81-
64+
<ResponseField name="--volumeSize" type="integer" default={1}>
8265
The size of the persistent volume in gigabytes for each Pod.
66+
</ResponseField>
8367

84-
---
85-
86-
`--volumePath <value>``string` • default = `/workspace`
87-
68+
<ResponseField name="--volumePath" type="string" default="/workspace">
8869
The mount path for the persistent volume inside each container.
70+
</ResponseField>
8971

90-
---
91-
92-
`--networkVolumeId <value>``string`
93-
72+
<ResponseField name="--networkVolumeId" type="string">
9473
The ID of an existing network volume to attach to all Pods for shared storage.
74+
</ResponseField>
9575

96-
---
97-
98-
`--cost <number>``float`
99-
76+
<ResponseField name="--cost" type="float">
10077
The maximum price ceiling in dollars per hour. If not specified, Pods will be created at the lowest available price.
78+
</ResponseField>
10179

102-
---
103-
104-
`--mem <number>``integer` • default = `20`
105-
80+
<ResponseField name="--mem" type="integer" default={20}>
10681
The minimum system memory required in gigabytes for each Pod.
82+
</ResponseField>
10783

108-
---
109-
110-
`--vcpu <number>``integer` • default = `1`
111-
84+
<ResponseField name="--vcpu" type="integer" default={1}>
11285
The minimum number of vCPUs required for each Pod.
86+
</ResponseField>
11387

114-
---
115-
116-
`--env <value>``string`
117-
88+
<ResponseField name="--env" type="string">
11889
Environment variables to set in the containers. Specify multiple times for multiple variables.
90+
</ResponseField>
11991

120-
---
121-
122-
`--args <value>``string`
123-
92+
<ResponseField name="--args" type="string">
12493
Additional arguments to pass to the containers when they start.
94+
</ResponseField>
12595

126-
---
127-
128-
`--ports <value>``string`
129-
96+
<ResponseField name="--ports" type="string">
13097
Ports to expose from the containers. Maximum of 1 HTTP port and 1 TCP port allowed per Pod.
98+
</ResponseField>
13199

132100
## Related commands
133101

0 commit comments

Comments
 (0)