Skip to content

Commit f2d998f

Browse files
author
vast-cli docs bot
committed
preview: CLI/SDK docs for vast-cli PR #398
Source PR: vast-ai/vast-cli#398 Title: Auto-generate CLI/SDK docs Auto-generated by .github/workflows/auto-generate-docs.yml
1 parent cd55b06 commit f2d998f

281 files changed

Lines changed: 5235 additions & 2630 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: "vastai accept price-increase"
3+
sidebarTitle: "accept price-increase"
4+
---
5+
6+
Accept one or more pending host price increases
7+
8+
## Usage
9+
10+
```bash
11+
vastai accept price-increase ID [ID ...] [--yes]
12+
```
13+
14+
## Arguments
15+
16+
<ParamField path="ids" type="integer" required>
17+
instance IDs to accept (one or more).
18+
</ParamField>
19+
20+
## Options
21+
22+
<ParamField path="--yes" type="boolean">
23+
skip the interactive prompt; required when stdin is not a TTY
24+
</ParamField>
25+
26+
## Description
27+
28+
Review pending price increases with `vastai show pending-price-increases`
29+
before accepting. The CLI fans out one PUT per instance ID (no batch
30+
endpoint exists on the backend), and the new rate applies only after
31+
each contract's current end_date — your remaining time on the current
32+
term is billed at the original price.
33+
34+
## Examples
35+
36+
```bash
37+
vastai accept price-increase 123 --yes
38+
vastai accept price-increase 1 2 3 --yes
39+
40+
Exit codes:
41+
0 — every requested row was accepted
42+
1 — at least one row failed (non-stale)
43+
2 — at least one row was stale (re-run `show pending-price-increases`)
44+
```
45+
46+
## Global Options
47+
48+
The following options are available for all commands:
49+
50+
| Option | Description |
51+
| --- | --- |
52+
| `--url URL` | Server REST API URL |
53+
| `--retry N` | Retry limit |
54+
| `--raw` | Output machine-readable JSON |
55+
| `--explain` | Verbose explanation of API calls |
56+
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |

cli/reference/cancel-maint.mdx

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
---
22
title: "vastai cancel maint"
33
sidebarTitle: "cancel maint"
4-
description: "Host command"
54
---
65

7-
import CancelMaintCLI from '/snippets/host/cli/cancel-maint.mdx';
6+
[Host] Cancel maint window
87

9-
<CancelMaintCLI />
8+
## Usage
9+
10+
```bash
11+
vastai cancel maint id
12+
```
13+
14+
## Arguments
15+
16+
<ParamField path="id" type="integer" required>
17+
id of machine to cancel maintenance(s) for
18+
</ParamField>
19+
20+
## Description
21+
22+
For deleting a machine's scheduled maintenance window(s), use this cancel maint command.
23+
Example: vastai cancel maint 8207
24+
25+
## Global Options
26+
27+
The following options are available for all commands:
28+
29+
| Option | Description |
30+
| --- | --- |
31+
| `--url URL` | Server REST API URL |
32+
| `--retry N` | Retry limit |
33+
| `--raw` | Output machine-readable JSON |
34+
| `--explain` | Verbose explanation of API calls |
35+
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |

cli/reference/change-bid.mdx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,31 @@ vastai change bid id [--price PRICE]
2424
</ParamField>
2525

2626
<ParamField path="--schedule" type="string">
27-
try to schedule a command to run hourly, daily, or monthly. Valid values are HOURLY, DAILY, WEEKLY For ex. `--schedule` DAILY Choices: `HOURLY`, `DAILY`, `WEEKLY`
27+
try to schedule a command to run hourly, daily, or weekly. Valid values are HOURLY, DAILY, WEEKLY For ex. --schedule DAILY
28+
Allowed values: HOURLY, DAILY, WEEKLY
2829
</ParamField>
2930

30-
<ParamField path="--start_date" type="string">
31+
<ParamField path="--start_date" type="string" default="2026-06-01">
3132
Start date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is now. (optional)
3233
</ParamField>
3334

34-
<ParamField path="--end_date" type="string">
35+
<ParamField path="--end_date" type="string" default="2026-06-08">
3536
End date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is 7 days from now. (optional)
3637
</ParamField>
3738

38-
<ParamField path="--day" type="integer" default="0">
39-
Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. `--day` 0
39+
<ParamField path="--day" type="parse_day_cron_style">
40+
Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. --day 0
4041
</ParamField>
4142

42-
<ParamField path="--hour" type="integer" default="0">
43-
Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. `--hour` 16
43+
<ParamField path="--hour" type="parse_hour_cron_style">
44+
Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. --hour 16
4445
</ParamField>
4546

4647
## Description
4748

4849
Change the current bid price of instance id to PRICE.
4950
If PRICE is not specified, then a winning bid price is used as the default.
5051

51-
## Examples
52-
53-
```bash
54-
vastai change bid <ID>
55-
```
56-
5752
## Global Options
5853

5954
The following options are available for all commands:

cli/reference/cleanup-machine.mdx

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,37 @@
11
---
22
title: "vastai cleanup machine"
33
sidebarTitle: "cleanup machine"
4-
description: "Host command"
54
---
65

7-
import CleanupMachineCLI from '/snippets/host/cli/cleanup-machine.mdx';
6+
[Host] Remove all expired storage instances from the machine, freeing up space
87

9-
<CleanupMachineCLI />
8+
## Usage
9+
10+
```bash
11+
vastai cleanup machine ID [options]
12+
```
13+
14+
## Arguments
15+
16+
<ParamField path="id" type="integer" required>
17+
id of machine to cleanup
18+
</ParamField>
19+
20+
## Description
21+
22+
Instances expire on their end date. Expired instances still pay storage fees, but can not start.
23+
Since hosts are still paid storage fees for expired instances, we do not auto delete them.
24+
Instead you can use this CLI/API function to delete all expired storage instances for a machine.
25+
This is useful if you are running low on storage, want to do maintenance, or are subsidizing storage, etc.
26+
27+
## Global Options
28+
29+
The following options are available for all commands:
30+
31+
| Option | Description |
32+
| --- | --- |
33+
| `--url URL` | Server REST API URL |
34+
| `--retry N` | Retry limit |
35+
| `--raw` | Output machine-readable JSON |
36+
| `--explain` | Verbose explanation of API calls |
37+
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |

cli/reference/clone-volume.mdx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,19 @@ vastai clone volume <source_id> <dest_id> [options]
2323

2424
## Options
2525

26-
<ParamField path="-s" type="number">
27-
Size of new volume contract, in GB. Must be greater than or equal to the source volume, and less than or equal to the destination offer. (alias: `--size`)
26+
<ParamField path="--size" type="number">
27+
Size of new volume contract, in GB. Must be greater than or equal to the source volume, and less than or equal to the destination offer.
2828
</ParamField>
2929

30-
<ParamField path="-d" type="boolean">
31-
Do not compress volume data before copying. (alias: `--disable_compression`)
30+
<ParamField path="--disable_compression" type="boolean">
31+
Do not compress volume data before copying.
3232
</ParamField>
3333

3434
## Description
3535

3636
Create a new volume with the given offer, by copying the existing volume.
3737
Size defaults to the size of the existing volume, but can be increased if there is available space.
3838

39-
## Examples
40-
41-
```bash
42-
vastai clone volume <SOURCE> <DEST>
43-
```
44-
4539
## Global Options
4640

4741
The following options are available for all commands:

cli/reference/cloud-copy.mdx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Copy files/folders to and from cloud providers
88
## Usage
99

1010
```bash
11-
vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID -connection CONNECTION_ID --transfer TRANSFER_TYPE
11+
vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID --connection CONNECTION_ID --transfer TRANSFER_TYPE
1212
```
1313

1414
## Options
@@ -54,23 +54,24 @@ vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID -connection CONNECT
5454
</ParamField>
5555

5656
<ParamField path="--schedule" type="string">
57-
try to schedule a command to run hourly, daily, or monthly. Valid values are HOURLY, DAILY, WEEKLY For ex. `--schedule` DAILY Choices: `HOURLY`, `DAILY`, `WEEKLY`
57+
try to schedule a command to run hourly, daily, or weekly. Valid values are HOURLY, DAILY, WEEKLY For ex. --schedule DAILY
58+
Allowed values: HOURLY, DAILY, WEEKLY
5859
</ParamField>
5960

60-
<ParamField path="--start_date" type="string">
61+
<ParamField path="--start_date" type="string" default="2026-06-01">
6162
Start date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is now. (optional)
6263
</ParamField>
6364

6465
<ParamField path="--end_date" type="string">
6566
End date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is contract's end. (optional)
6667
</ParamField>
6768

68-
<ParamField path="--day" type="integer" default="0">
69-
Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. `--day` 0
69+
<ParamField path="--day" type="parse_day_cron_style">
70+
Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. --day 0
7071
</ParamField>
7172

72-
<ParamField path="--hour" type="integer" default="0">
73-
Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. `--hour` 16
73+
<ParamField path="--hour" type="parse_hour_cron_style">
74+
Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. --hour 16
7475
</ParamField>
7576

7677
## Description

cli/reference/copy.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ vastai copy SRC DST
2323

2424
## Options
2525

26-
<ParamField path="-i" type="string">
27-
Location of ssh private key (alias: `--identity`)
26+
<ParamField path="--identity" type="string">
27+
Location of ssh private key
2828
</ParamField>
2929

3030
## Description

cli/reference/create-api-key.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ vastai create api-key --name NAME --permission_file PERMISSIONS
3030
In order to create api keys you must understand how permissions must be sent via json format.
3131
You can find more information about permissions here: https://vast.ai/docs/cli/roles-and-permissions
3232

33-
## Examples
34-
35-
```bash
36-
vastai create api-key
37-
```
38-
3933
## Global Options
4034

4135
The following options are available for all commands:

cli/reference/create-cluster.mdx

Lines changed: 0 additions & 44 deletions
This file was deleted.

cli/reference/create-endpoint.mdx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ vastai create endpoint [OPTIONS]
1313

1414
## Options
1515

16-
<ParamField path="--min_load" type="number" default="0.0">
16+
<ParamField path="--min_load" type="number">
1717
minimum floor load in perf units/s (token/s for LLms)
1818
</ParamField>
1919

20-
<ParamField path="--min_cold_load" type="number" default="0.0">
20+
<ParamField path="--min_cold_load" type="number">
2121
minimum floor load in perf units/s (token/s for LLms), but allow handling with cold workers
2222
</ParamField>
2323

@@ -57,13 +57,7 @@ vastai create endpoint [OPTIONS]
5757

5858
Create a new endpoint group to manage many autoscaling groups
5959

60-
Example: vastai create endpoint `--target_util` 0.9 `--cold_mult` 2.0 `--endpoint_name` "LLama"
61-
62-
## Examples
63-
64-
```bash
65-
vastai create endpoint
66-
```
60+
Example: vastai create endpoint --target_util 0.9 --cold_mult 2.0 --endpoint_name "LLama"
6761

6862
## Global Options
6963

0 commit comments

Comments
 (0)