From 82a47715a05dcb229a96efacac2944e9d4657774 Mon Sep 17 00:00:00 2001 From: vast-cli docs bot Date: Tue, 23 Jun 2026 22:52:08 +0000 Subject: [PATCH] preview: CLI/SDK docs for vast-cli PR #398 Source PR: https://github.com/vast-ai/vast-cli/pull/398 Title: Auto-generate CLI/SDK docs Auto-generated by .github/workflows/auto-generate-docs.yml --- cli/reference/accept-price-increase.mdx | 56 ++++ cli/reference/cancel-maint.mdx | 32 +- cli/reference/change-bid.mdx | 21 +- cli/reference/cleanup-machine.mdx | 34 +- cli/reference/clone-volume.mdx | 14 +- cli/reference/cloud-copy.mdx | 15 +- cli/reference/copy.mdx | 4 +- cli/reference/create-api-key.mdx | 6 - cli/reference/create-cluster.mdx | 44 --- cli/reference/create-endpoint.mdx | 12 +- cli/reference/create-env-var.mdx | 6 - cli/reference/create-instance.mdx | 16 +- cli/reference/create-instances.mdx | 136 ++++++++ cli/reference/create-overlay.mdx | 44 --- cli/reference/create-ssh-key.mdx | 10 +- cli/reference/create-subaccount.mdx | 10 +- cli/reference/create-team-role.mdx | 6 - cli/reference/create-team.mdx | 14 +- cli/reference/create-template.mdx | 22 +- cli/reference/create-volume.mdx | 14 +- cli/reference/create-workergroup.mdx | 14 +- cli/reference/defrag-machines.mdx | 31 +- cli/reference/delete-api-key.mdx | 6 - cli/reference/delete-deployment.mdx | 6 +- cli/reference/delete-endpoint.mdx | 6 - cli/reference/delete-env-var.mdx | 6 - cli/reference/delete-machine.mdx | 27 +- cli/reference/delete-scheduled-job.mdx | 6 - cli/reference/delete-ssh-key.mdx | 6 - cli/reference/delete-template.mdx | 14 +- cli/reference/delete-volume.mdx | 6 - cli/reference/delete-workergroup.mdx | 6 - cli/reference/destroy-instance.mdx | 15 +- cli/reference/destroy-instances.mdx | 10 +- cli/reference/destroy-team.mdx | 6 - cli/reference/detach-ssh.mdx | 8 +- cli/reference/dump-logs.mdx | 61 ++++ cli/reference/execute.mdx | 39 +-- cli/reference/get-endpt-logs.mdx | 6 - cli/reference/get-endpt-workers.mdx | 34 ++ cli/reference/get-wrkgrp-logs.mdx | 10 +- cli/reference/invite-member.mdx | 6 - cli/reference/join-overlay.mdx | 44 --- cli/reference/label-instance.mdx | 6 - cli/reference/launch-instance.mdx | 74 ++--- cli/reference/list-machine.mdx | 87 ++++- cli/reference/list-machines.mdx | 79 ++++- cli/reference/list-volume.mdx | 23 +- cli/reference/list-volumes.mdx | 23 +- cli/reference/logs.mdx | 6 - cli/reference/metrics-gpu-locations.mdx | 57 +++- cli/reference/metrics-gpu-trends.mdx | 73 +++- cli/reference/metrics-gpu.mdx | 53 ++- cli/reference/prepay-instance.mdx | 6 - cli/reference/reboot-instance.mdx | 21 +- cli/reference/recycle-instance.mdx | 6 - cli/reference/reject-price-increase.mdx | 47 +++ cli/reference/remove-defjob.mdx | 27 +- cli/reference/remove-machine-from-cluster.mdx | 49 --- cli/reference/remove-member.mdx | 6 - cli/reference/remove-team-role.mdx | 6 - cli/reference/reports.mdx | 6 - .../{show-overlays.mdx => reset-api-key.mdx} | 18 +- cli/reference/run-benchmarks.mdx | 43 ++- cli/reference/schedule-maint.mdx | 49 ++- cli/reference/scp-url.mdx | 6 - cli/reference/search-benchmarks.mdx | 55 ++-- cli/reference/search-instances.mdx | 167 ---------- cli/reference/search-invoices.mdx | 83 +++-- cli/reference/search-offers.mdx | 195 ++++++----- cli/reference/search-templates.mdx | 65 ++-- cli/reference/search-volumes.mdx | 86 +++-- cli/reference/self-test-machine.mdx | 61 +++- cli/reference/set-api-key.mdx | 6 - cli/reference/set-defjob.mdx | 53 ++- cli/reference/set-min-bid.mdx | 37 ++- cli/reference/set-user.mdx | 50 ++- .../{show-clusters.mdx => show-api-key.mdx} | 20 +- cli/reference/show-api-keys.mdx | 6 - cli/reference/show-audit-logs.mdx | 6 - cli/reference/show-connections.mdx | 6 - cli/reference/show-deployment-versions.mdx | 6 - cli/reference/show-deployment.mdx | 17 +- cli/reference/show-deployments.mdx | 12 +- cli/reference/show-deposit.mdx | 6 - cli/reference/show-earnings.mdx | 22 +- cli/reference/show-endpoints.mdx | 6 - cli/reference/show-env-vars.mdx | 10 +- cli/reference/show-instance.mdx | 34 +- cli/reference/show-instances-v1.mdx | 68 ++-- cli/reference/show-instances.mdx | 31 +- cli/reference/show-invoices-v1.mdx | 67 ++-- cli/reference/show-invoices.mdx | 50 +++ cli/reference/show-ipaddrs.mdx | 6 - cli/reference/show-machine.mdx | 33 +- cli/reference/show-machines.mdx | 27 +- cli/reference/show-maints.mdx | 31 +- cli/reference/show-members.mdx | 6 - .../show-pending-price-increases.mdx | 43 +++ cli/reference/show-scheduled-jobs.mdx | 6 - cli/reference/show-ssh-keys.mdx | 6 - cli/reference/show-subaccounts.mdx | 10 +- cli/reference/show-team-role.mdx | 6 - cli/reference/show-team-roles.mdx | 6 - cli/reference/show-user.mdx | 10 +- cli/reference/show-volumes.mdx | 10 +- cli/reference/show-workergroups.mdx | 6 - cli/reference/ssh-url.mdx | 6 - ...elete-overlay.mdx => start-deployment.mdx} | 19 +- cli/reference/start-instance.mdx | 2 +- cli/reference/start-instances.mdx | 6 - .../{join-cluster.mdx => stop-deployment.mdx} | 22 +- cli/reference/stop-instance.mdx | 6 - cli/reference/stop-instances.mdx | 2 +- cli/reference/take-snapshot.mdx | 59 ++++ cli/reference/tfa-activate.mdx | 78 +++++ cli/reference/tfa-auth-new.mdx | 78 +++++ cli/reference/tfa-delete.mdx | 86 +++++ cli/reference/tfa-login.mdx | 65 ++++ cli/reference/tfa-regen-codes.mdx | 75 +++++ cli/reference/tfa-resend-sms.mdx | 51 +++ ...{delete-cluster.mdx => tfa-send-email.mdx} | 20 +- cli/reference/tfa-send-sms.mdx | 44 +++ cli/reference/tfa-status.mdx | 31 ++ cli/reference/tfa-totp-setup.mdx | 55 ++++ cli/reference/tfa-update.mdx | 57 ++++ cli/reference/transfer-credit.mdx | 29 +- cli/reference/unlist-machine.mdx | 27 +- cli/reference/unlist-volume.mdx | 11 +- cli/reference/update-endpoint.mdx | 8 +- cli/reference/update-env-var.mdx | 6 - cli/reference/update-instance.mdx | 10 +- cli/reference/update-ssh-key.mdx | 6 - cli/reference/update-team-role.mdx | 8 +- cli/reference/update-template.mdx | 22 +- cli/reference/update-workergroup.mdx | 14 +- cli/reference/update-workers.mdx | 4 +- docs.json | 311 ++++++++++-------- .../reference/accept-price-increase.mdx | 34 ++ sdk/python/reference/attach-ssh.mdx | 13 +- sdk/python/reference/cancel-copy.mdx | 12 +- sdk/python/reference/cancel-maint.mdx | 30 +- sdk/python/reference/cancel-sync.mdx | 12 +- sdk/python/reference/change-bid.mdx | 13 +- sdk/python/reference/cleanup-machine.mdx | 30 +- sdk/python/reference/clone-volume.mdx | 16 +- sdk/python/reference/cloud-copy.mdx | 72 +++- sdk/python/reference/copy.mdx | 17 +- sdk/python/reference/create-api-key.mdx | 22 +- sdk/python/reference/create-cluster.mdx | 13 +- sdk/python/reference/create-endpoint.mdx | 60 ++-- sdk/python/reference/create-env-var.mdx | 13 +- sdk/python/reference/create-instance.mdx | 113 ++++--- sdk/python/reference/create-instances.mdx | 89 +++-- sdk/python/reference/create-overlay.mdx | 15 +- sdk/python/reference/create-scheduled-job.mdx | 64 ++++ sdk/python/reference/create-ssh-key.mdx | 12 +- sdk/python/reference/create-subaccount.mdx | 28 +- sdk/python/reference/create-team-role.mdx | 17 +- sdk/python/reference/create-team.mdx | 12 +- sdk/python/reference/create-template.mdx | 75 +++-- sdk/python/reference/create-volume.mdx | 14 +- sdk/python/reference/create-workergroup.mdx | 36 +- sdk/python/reference/defrag-machines.mdx | 30 +- sdk/python/reference/delete-api-key.mdx | 8 +- sdk/python/reference/delete-cluster.mdx | 8 +- sdk/python/reference/delete-deployment.mdx | 22 +- sdk/python/reference/delete-endpoint.mdx | 10 +- sdk/python/reference/delete-env-var.mdx | 10 +- sdk/python/reference/delete-machine.mdx | 30 +- sdk/python/reference/delete-overlay.mdx | 8 +- sdk/python/reference/delete-scheduled-job.mdx | 8 +- sdk/python/reference/delete-ssh-key.mdx | 10 +- sdk/python/reference/delete-template.mdx | 13 +- sdk/python/reference/delete-volume.mdx | 10 +- sdk/python/reference/delete-workergroup.mdx | 8 +- sdk/python/reference/destroy-instance.mdx | 10 +- sdk/python/reference/destroy-instances.mdx | 12 +- sdk/python/reference/destroy-team.mdx | 6 +- sdk/python/reference/detach-ssh.mdx | 13 +- sdk/python/reference/execute.mdx | 15 +- sdk/python/reference/fetch-contracts.mdx | 39 +++ .../reference/generate-pdf-invoices.mdx | 32 +- sdk/python/reference/get-endpoint-workers.mdx | 34 ++ sdk/python/reference/get-endpt-logs.mdx | 16 +- sdk/python/reference/get-wrkgrp-logs.mdx | 16 +- sdk/python/reference/invite-member.mdx | 15 +- sdk/python/reference/invite-team-member.mdx | 39 +++ sdk/python/reference/join-cluster.mdx | 13 +- sdk/python/reference/join-overlay.mdx | 13 +- sdk/python/reference/label-instance.mdx | 15 +- sdk/python/reference/launch-instance.mdx | 142 ++++---- sdk/python/reference/list-machine.mdx | 85 ++++- sdk/python/reference/list-machines.mdx | 85 ++++- sdk/python/reference/list-volume.mdx | 22 +- sdk/python/reference/list-volumes.mdx | 26 +- sdk/python/reference/logs.mdx | 25 +- sdk/python/reference/prepay-instance.mdx | 11 +- sdk/python/reference/reboot-instance.mdx | 8 +- sdk/python/reference/recycle-instance.mdx | 8 +- .../reference/reject-price-increase.mdx | 34 ++ sdk/python/reference/remove-defjob.mdx | 30 +- .../reference/remove-machine-from-cluster.mdx | 14 +- sdk/python/reference/remove-member.mdx | 10 +- sdk/python/reference/remove-team-member.mdx | 34 ++ sdk/python/reference/remove-team-role.mdx | 14 +- sdk/python/reference/reports.mdx | 8 +- sdk/python/reference/reset-api-key.mdx | 4 +- sdk/python/reference/schedule-maint.mdx | 45 ++- sdk/python/reference/scp-url.mdx | 10 +- sdk/python/reference/search-benchmarks.mdx | 10 +- sdk/python/reference/search-invoices.mdx | 10 +- sdk/python/reference/search-offers-new.mdx | 59 ++++ sdk/python/reference/search-offers.mdx | 49 ++- sdk/python/reference/search-templates.mdx | 10 +- sdk/python/reference/search-volumes.mdx | 30 +- sdk/python/reference/self-test-machine.mdx | 55 +++- sdk/python/reference/set-api-key.mdx | 14 +- sdk/python/reference/set-defjob.mdx | 55 +++- sdk/python/reference/set-min-bid.mdx | 35 +- sdk/python/reference/set-user.mdx | 14 +- sdk/python/reference/show-api-key.mdx | 8 +- sdk/python/reference/show-api-keys.mdx | 6 +- sdk/python/reference/show-audit-logs.mdx | 6 +- sdk/python/reference/show-clusters.mdx | 4 +- sdk/python/reference/show-connections.mdx | 4 +- .../reference/show-deployment-versions.mdx | 10 +- sdk/python/reference/show-deployment.mdx | 10 +- sdk/python/reference/show-deployments.mdx | 6 +- sdk/python/reference/show-deposit.mdx | 14 +- sdk/python/reference/show-earnings.mdx | 14 +- sdk/python/reference/show-endpoints.mdx | 6 +- sdk/python/reference/show-env-vars.mdx | 10 +- .../reference/show-instance-filters.mdx | 26 ++ sdk/python/reference/show-instance.mdx | 32 +- sdk/python/reference/show-instances-v1.mdx | 86 +---- sdk/python/reference/show-instances.mdx | 34 +- sdk/python/reference/show-invoices-v1.mdx | 50 +-- sdk/python/reference/show-invoices.mdx | 24 +- sdk/python/reference/show-ipaddrs.mdx | 4 +- sdk/python/reference/show-machine.mdx | 30 +- sdk/python/reference/show-machines.mdx | 22 +- sdk/python/reference/show-maints.mdx | 30 +- sdk/python/reference/show-members.mdx | 6 +- sdk/python/reference/show-overlays.mdx | 4 +- .../show-pending-price-increases.mdx | 26 ++ sdk/python/reference/show-scheduled-jobs.mdx | 6 +- sdk/python/reference/show-ssh-keys.mdx | 4 +- sdk/python/reference/show-subaccounts.mdx | 12 +- sdk/python/reference/show-team-members.mdx | 26 ++ sdk/python/reference/show-team-role.mdx | 12 +- sdk/python/reference/show-team-roles.mdx | 4 +- sdk/python/reference/show-user.mdx | 12 +- sdk/python/reference/show-volumes.mdx | 10 +- sdk/python/reference/show-workergroups.mdx | 6 +- sdk/python/reference/ssh-url.mdx | 8 +- sdk/python/reference/start-instance.mdx | 10 +- sdk/python/reference/start-instances.mdx | 10 +- sdk/python/reference/stop-instance.mdx | 10 +- sdk/python/reference/stop-instances.mdx | 10 +- sdk/python/reference/take-snapshot.mdx | 59 ++++ sdk/python/reference/tfa-activate.mdx | 49 +++ sdk/python/reference/tfa-delete.mdx | 59 ++++ sdk/python/reference/tfa-login.mdx | 54 +++ sdk/python/reference/tfa-regen-codes.mdx | 54 +++ sdk/python/reference/tfa-resend-sms.mdx | 39 +++ sdk/python/reference/tfa-send-sms.mdx | 34 ++ sdk/python/reference/tfa-status.mdx | 26 ++ sdk/python/reference/tfa-totp-setup.mdx | 26 ++ sdk/python/reference/tfa-update.mdx | 39 +++ sdk/python/reference/transfer-credit.mdx | 13 +- sdk/python/reference/unlist-machine.mdx | 30 +- sdk/python/reference/unlist-volume.mdx | 8 +- sdk/python/reference/update-endpoint.mdx | 47 ++- sdk/python/reference/update-env-var.mdx | 13 +- sdk/python/reference/update-instance.mdx | 22 +- sdk/python/reference/update-scheduled-job.mdx | 39 +++ sdk/python/reference/update-ssh-key.mdx | 13 +- sdk/python/reference/update-team-role.mdx | 16 +- sdk/python/reference/update-template.mdx | 101 ++++-- sdk/python/reference/update-workergroup.mdx | 34 +- sdk/python/reference/update-workers.mdx | 15 +- 282 files changed, 5331 insertions(+), 2631 deletions(-) create mode 100644 cli/reference/accept-price-increase.mdx delete mode 100644 cli/reference/create-cluster.mdx create mode 100644 cli/reference/create-instances.mdx delete mode 100644 cli/reference/create-overlay.mdx create mode 100644 cli/reference/dump-logs.mdx create mode 100644 cli/reference/get-endpt-workers.mdx delete mode 100644 cli/reference/join-overlay.mdx create mode 100644 cli/reference/reject-price-increase.mdx delete mode 100644 cli/reference/remove-machine-from-cluster.mdx rename cli/reference/{show-overlays.mdx => reset-api-key.mdx} (62%) delete mode 100644 cli/reference/search-instances.mdx rename cli/reference/{show-clusters.mdx => show-api-key.mdx} (62%) create mode 100644 cli/reference/show-invoices.mdx create mode 100644 cli/reference/show-pending-price-increases.mdx rename cli/reference/{delete-overlay.mdx => start-deployment.mdx} (55%) rename cli/reference/{join-cluster.mdx => stop-deployment.mdx} (53%) create mode 100644 cli/reference/take-snapshot.mdx create mode 100644 cli/reference/tfa-activate.mdx create mode 100644 cli/reference/tfa-auth-new.mdx create mode 100644 cli/reference/tfa-delete.mdx create mode 100644 cli/reference/tfa-login.mdx create mode 100644 cli/reference/tfa-regen-codes.mdx create mode 100644 cli/reference/tfa-resend-sms.mdx rename cli/reference/{delete-cluster.mdx => tfa-send-email.mdx} (59%) create mode 100644 cli/reference/tfa-send-sms.mdx create mode 100644 cli/reference/tfa-status.mdx create mode 100644 cli/reference/tfa-totp-setup.mdx create mode 100644 cli/reference/tfa-update.mdx create mode 100644 sdk/python/reference/accept-price-increase.mdx create mode 100644 sdk/python/reference/create-scheduled-job.mdx create mode 100644 sdk/python/reference/fetch-contracts.mdx create mode 100644 sdk/python/reference/get-endpoint-workers.mdx create mode 100644 sdk/python/reference/invite-team-member.mdx create mode 100644 sdk/python/reference/reject-price-increase.mdx create mode 100644 sdk/python/reference/remove-team-member.mdx create mode 100644 sdk/python/reference/search-offers-new.mdx create mode 100644 sdk/python/reference/show-instance-filters.mdx create mode 100644 sdk/python/reference/show-pending-price-increases.mdx create mode 100644 sdk/python/reference/show-team-members.mdx create mode 100644 sdk/python/reference/take-snapshot.mdx create mode 100644 sdk/python/reference/tfa-activate.mdx create mode 100644 sdk/python/reference/tfa-delete.mdx create mode 100644 sdk/python/reference/tfa-login.mdx create mode 100644 sdk/python/reference/tfa-regen-codes.mdx create mode 100644 sdk/python/reference/tfa-resend-sms.mdx create mode 100644 sdk/python/reference/tfa-send-sms.mdx create mode 100644 sdk/python/reference/tfa-status.mdx create mode 100644 sdk/python/reference/tfa-totp-setup.mdx create mode 100644 sdk/python/reference/tfa-update.mdx create mode 100644 sdk/python/reference/update-scheduled-job.mdx diff --git a/cli/reference/accept-price-increase.mdx b/cli/reference/accept-price-increase.mdx new file mode 100644 index 0000000..663ca78 --- /dev/null +++ b/cli/reference/accept-price-increase.mdx @@ -0,0 +1,56 @@ +--- +title: "vastai accept price-increase" +sidebarTitle: "accept price-increase" +--- + +Accept one or more pending host price increases + +## Usage + +```bash +vastai accept price-increase ID [ID ...] [--yes] +``` + +## Arguments + + + instance IDs to accept (one or more). + + +## Options + + + skip the interactive prompt; required when stdin is not a TTY + + +## Description + +Review pending price increases with `vastai show pending-price-increases` +before accepting. The CLI fans out one PUT per instance ID (no batch +endpoint exists on the backend), and the new rate applies only after +each contract's current end_date — your remaining time on the current +term is billed at the original price. + +## Examples + +```bash +vastai accept price-increase 123 --yes + vastai accept price-increase 1 2 3 --yes + +Exit codes: + 0 — every requested row was accepted + 1 — at least one row failed (non-stale) + 2 — at least one row was stale (re-run `show pending-price-increases`) +``` + +## Global Options + +The following options are available for all commands: + +| Option | Description | +| --- | --- | +| `--url URL` | Server REST API URL | +| `--retry N` | Retry limit | +| `--raw` | Output machine-readable JSON | +| `--explain` | Verbose explanation of API calls | +| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/cancel-maint.mdx b/cli/reference/cancel-maint.mdx index 91670b3..11e73f0 100644 --- a/cli/reference/cancel-maint.mdx +++ b/cli/reference/cancel-maint.mdx @@ -1,9 +1,35 @@ --- title: "vastai cancel maint" sidebarTitle: "cancel maint" -description: "Host command" --- -import CancelMaintCLI from '/snippets/host/cli/cancel-maint.mdx'; +[Host] Cancel maint window - +## Usage + +```bash +vastai cancel maint id +``` + +## Arguments + + + id of machine to cancel maintenance(s) for + + +## Description + +For deleting a machine's scheduled maintenance window(s), use this cancel maint command. +Example: vastai cancel maint 8207 + +## Global Options + +The following options are available for all commands: + +| Option | Description | +| --- | --- | +| `--url URL` | Server REST API URL | +| `--retry N` | Retry limit | +| `--raw` | Output machine-readable JSON | +| `--explain` | Verbose explanation of API calls | +| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/change-bid.mdx b/cli/reference/change-bid.mdx index e446a0b..279e744 100644 --- a/cli/reference/change-bid.mdx +++ b/cli/reference/change-bid.mdx @@ -24,23 +24,24 @@ vastai change bid id [--price PRICE] - 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` + try to schedule a command to run hourly, daily, or weekly. Valid values are HOURLY, DAILY, WEEKLY For ex. --schedule DAILY + Allowed values: HOURLY, DAILY, WEEKLY - + Start date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is now. (optional) - + End date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is 7 days from now. (optional) - - Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. `--day` 0 + + Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. --day 0 - - Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. `--hour` 16 + + Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. --hour 16 ## Description @@ -48,12 +49,6 @@ vastai change bid id [--price PRICE] Change the current bid price of instance id to PRICE. If PRICE is not specified, then a winning bid price is used as the default. -## Examples - -```bash -vastai change bid -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/cleanup-machine.mdx b/cli/reference/cleanup-machine.mdx index 7e7d13b..8397b40 100644 --- a/cli/reference/cleanup-machine.mdx +++ b/cli/reference/cleanup-machine.mdx @@ -1,9 +1,37 @@ --- title: "vastai cleanup machine" sidebarTitle: "cleanup machine" -description: "Host command" --- -import CleanupMachineCLI from '/snippets/host/cli/cleanup-machine.mdx'; +[Host] Remove all expired storage instances from the machine, freeing up space - +## Usage + +```bash +vastai cleanup machine ID [options] +``` + +## Arguments + + + id of machine to cleanup + + +## Description + +Instances expire on their end date. Expired instances still pay storage fees, but can not start. +Since hosts are still paid storage fees for expired instances, we do not auto delete them. +Instead you can use this CLI/API function to delete all expired storage instances for a machine. +This is useful if you are running low on storage, want to do maintenance, or are subsidizing storage, etc. + +## Global Options + +The following options are available for all commands: + +| Option | Description | +| --- | --- | +| `--url URL` | Server REST API URL | +| `--retry N` | Retry limit | +| `--raw` | Output machine-readable JSON | +| `--explain` | Verbose explanation of API calls | +| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/clone-volume.mdx b/cli/reference/clone-volume.mdx index 448cba6..0e6064b 100644 --- a/cli/reference/clone-volume.mdx +++ b/cli/reference/clone-volume.mdx @@ -23,12 +23,12 @@ vastai clone volume [options] ## Options - - 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`) + + 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. - - Do not compress volume data before copying. (alias: `--disable_compression`) + + Do not compress volume data before copying. ## Description @@ -36,12 +36,6 @@ vastai clone volume [options] Create a new volume with the given offer, by copying the existing volume. Size defaults to the size of the existing volume, but can be increased if there is available space. -## Examples - -```bash -vastai clone volume -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/cloud-copy.mdx b/cli/reference/cloud-copy.mdx index 19f2da8..f6700ed 100644 --- a/cli/reference/cloud-copy.mdx +++ b/cli/reference/cloud-copy.mdx @@ -8,7 +8,7 @@ Copy files/folders to and from cloud providers ## Usage ```bash -vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID -connection CONNECTION_ID --transfer TRANSFER_TYPE +vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID --connection CONNECTION_ID --transfer TRANSFER_TYPE ``` ## Options @@ -54,10 +54,11 @@ vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID -connection CONNECT - 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` + try to schedule a command to run hourly, daily, or weekly. Valid values are HOURLY, DAILY, WEEKLY For ex. --schedule DAILY + Allowed values: HOURLY, DAILY, WEEKLY - + Start date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is now. (optional) @@ -65,12 +66,12 @@ vastai cloud copy --src SRC --dst DST --instance INSTANCE_ID -connection CONNECT End date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is contract's end. (optional) - - Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. `--day` 0 + + Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. --day 0 - - Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. `--hour` 16 + + Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. --hour 16 ## Description diff --git a/cli/reference/copy.mdx b/cli/reference/copy.mdx index 0b831e8..d82eb02 100644 --- a/cli/reference/copy.mdx +++ b/cli/reference/copy.mdx @@ -23,8 +23,8 @@ vastai copy SRC DST ## Options - - Location of ssh private key (alias: `--identity`) + + Location of ssh private key ## Description diff --git a/cli/reference/create-api-key.mdx b/cli/reference/create-api-key.mdx index 6a2d9f2..3fee55c 100644 --- a/cli/reference/create-api-key.mdx +++ b/cli/reference/create-api-key.mdx @@ -30,12 +30,6 @@ vastai create api-key --name NAME --permission_file PERMISSIONS In order to create api keys you must understand how permissions must be sent via json format. You can find more information about permissions here: https://vast.ai/docs/cli/roles-and-permissions -## Examples - -```bash -vastai create api-key -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/create-cluster.mdx b/cli/reference/create-cluster.mdx deleted file mode 100644 index fdde9d9..0000000 --- a/cli/reference/create-cluster.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "vastai create cluster" -sidebarTitle: "create cluster" ---- - -Create Vast cluster - -## Usage - -```bash -vastai create cluster SUBNET MANAGER_ID -``` - -## Arguments - - - local subnet for cluster, ex: '0.0.0.0/24' - - - - Machine ID of manager node in cluster. Must exist already. - - -## Description - -Create Vast Cluster by defining a local subnet and manager id. - -## Examples - -```bash -vastai create cluster -``` - -## Global Options - -The following options are available for all commands: - -| Option | Description | -| --- | --- | -| `--url URL` | Server REST API URL | -| `--retry N` | Retry limit | -| `--raw` | Output machine-readable JSON | -| `--explain` | Verbose explanation of API calls | -| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/create-endpoint.mdx b/cli/reference/create-endpoint.mdx index 79bd945..ae1e29d 100644 --- a/cli/reference/create-endpoint.mdx +++ b/cli/reference/create-endpoint.mdx @@ -13,11 +13,11 @@ vastai create endpoint [OPTIONS] ## Options - + minimum floor load in perf units/s (token/s for LLms) - + minimum floor load in perf units/s (token/s for LLms), but allow handling with cold workers @@ -57,13 +57,7 @@ vastai create endpoint [OPTIONS] Create a new endpoint group to manage many autoscaling groups -Example: vastai create endpoint `--target_util` 0.9 `--cold_mult` 2.0 `--endpoint_name` "LLama" - -## Examples - -```bash -vastai create endpoint -``` +Example: vastai create endpoint --target_util 0.9 --cold_mult 2.0 --endpoint_name "LLama" ## Global Options diff --git a/cli/reference/create-env-var.mdx b/cli/reference/create-env-var.mdx index 847b549..be13ffd 100644 --- a/cli/reference/create-env-var.mdx +++ b/cli/reference/create-env-var.mdx @@ -21,12 +21,6 @@ vastai create env-var Environment variable value -## Examples - -```bash -vastai create env-var -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/create-instance.mdx b/cli/reference/create-instance.mdx index faf04d2..16d698b 100644 --- a/cli/reference/create-instance.mdx +++ b/cli/reference/create-instance.mdx @@ -36,7 +36,7 @@ vastai create instance ID [OPTIONS] [--args ...] - docker login arguments for private repo authentication, surround with '' + docker login arguments for private repo authentication, surround with '' @@ -84,7 +84,7 @@ vastai create instance ID [OPTIONS] [--args ...] - env variables and port mapping options, surround with '' + env variables and port mapping options, surround with '' @@ -112,7 +112,7 @@ vastai create instance ID [OPTIONS] [--args ...] - Size of the volume to create in GB. Only usable with `--create-volume` (default 15GB) + Size of the volume to create in GB. Only usable with --create-volume (default 15GB) @@ -120,19 +120,19 @@ vastai create instance ID [OPTIONS] [--args ...] - (optional) A name to give the new volume. Only usable with `--create-volume` + (optional) A name to give the new volume. Only usable with --create-volume ## Description Performs the same action as pressing the "RENT" button on the website at https://console.vast.ai/create/ Creates an instance from an offer ID (which is returned from "search offers"). Each offer ID can only be used to create one instance. -Besides the offer ID, you must pass in an '`--image`' argument as a minimum. +Besides the offer ID, you must pass in an '--image' argument as a minimum. If you use args/entrypoint launch mode, we create a container from your image as is, without attempting to inject ssh and or jupyter. -If you use the args launch mode, you can override the entrypoint with `--entrypoint`, and pass arguments to the entrypoint with `--args`. -If you use `--args`, that must be the last argument, as any following tokens are consumed into the args string. -For ssh/jupyter launch types, use `--onstart-cmd` to pass in startup script, instead of `--entrypoint` and `--args`. +If you use the args launch mode, you can override the entrypoint with --entrypoint, and pass arguments to the entrypoint with --args. +If you use --args, that must be the last argument, as any following tokens are consumed into the args string. +For ssh/jupyter launch types, use --onstart-cmd to pass in startup script, instead of --entrypoint and --args. ## Examples diff --git a/cli/reference/create-instances.mdx b/cli/reference/create-instances.mdx new file mode 100644 index 0000000..979269a --- /dev/null +++ b/cli/reference/create-instances.mdx @@ -0,0 +1,136 @@ +--- +title: "vastai create instances" +sidebarTitle: "create instances" +--- + +Create instances from a list of offers + +## Usage + +```bash +vastai create instances [OPTIONS] ID0 ID1 ID2... [--args ...] +``` + +## Arguments + + + ids of instance types to launch (returned from search offers) + + +## Options + + + Create instance from template info + + + + User to use with docker create. This breaks some images, so only use this if you are certain you need it. + + + + size of local disk partition in GB + + + + docker container image to launch + + + + docker login arguments for private repo authentication, surround with '' + + + + label to set on the instance + + + + filename to use as onstart script + + + + contents of onstart script as single argument + + + + override entrypoint for args launch instance + + + + Launch as an ssh instance type + + + + Launch as a jupyter instance instead of an ssh instance + + + + Use (faster) direct connections for jupyter & ssh + + + + For runtype 'jupyter', directory in instance to use to launch jupyter. Defaults to image's working directory + + + + For runtype 'jupyter', Launch instance with jupyter lab + + + + Workaround for images with locale problems: install and generate locales before instance launch, and set locale to C.UTF-8 + + + + Workaround for images with locale problems: set python's locale to C.UTF-8 + + + + env variables and port mapping options, surround with '' + + + + list of arguments passed to container ENTRYPOINT. Onstart is recommended for this purpose. (must be last argument) + + + + Skip sanity checks when creating from an existing instance + + + + Return error if scheduling fails (rather than creating a stopped instance) + + + + (OPTIONAL) create an INTERRUPTIBLE instance with per machine bid price in $/hour + + + + Create a new local volume using an ID returned from the "search volumes" command and link it to the new instance + + + + ID of an existing rented volume to link to the instance during creation. (returned from "show volumes" cmd) + + + + Size of the volume to create in GB. Only usable with --create-volume (default 15GB) + + + + The path to the volume from within the new instance container. e.g. /root/volume + + + + (optional) A name to give the new volume. Only usable with --create-volume + + +## Global Options + +The following options are available for all commands: + +| Option | Description | +| --- | --- | +| `--url URL` | Server REST API URL | +| `--retry N` | Retry limit | +| `--raw` | Output machine-readable JSON | +| `--explain` | Verbose explanation of API calls | +| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/create-overlay.mdx b/cli/reference/create-overlay.mdx deleted file mode 100644 index ea201b0..0000000 --- a/cli/reference/create-overlay.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "vastai create overlay" -sidebarTitle: "create overlay" ---- - -Creates overlay network on top of a physical cluster - -## Usage - -```bash -vastai create overlay CLUSTER_ID OVERLAY_NAME -``` - -## Arguments - - - ID of cluster to create overlay on top of - - - - overlay network name - - -## Description - -Creates an overlay network to allow local networking between instances on a physical cluster - -## Examples - -```bash -vastai create overlay -``` - -## Global Options - -The following options are available for all commands: - -| Option | Description | -| --- | --- | -| `--url URL` | Server REST API URL | -| `--retry N` | Retry limit | -| `--raw` | Output machine-readable JSON | -| `--explain` | Verbose explanation of API calls | -| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/create-ssh-key.mdx b/cli/reference/create-ssh-key.mdx index e147a08..d5699c8 100644 --- a/cli/reference/create-ssh-key.mdx +++ b/cli/reference/create-ssh-key.mdx @@ -19,8 +19,8 @@ vastai create ssh-key [ssh_public_key] [-y] ## Options - - automatically answer yes to prompts (alias: `--yes`) + + automatically answer yes to prompts ## Description @@ -40,12 +40,6 @@ The public key will be added to your Vast account. All ssh public keys are stored in your Vast account and can be used to connect to instances they've been added to. -## Examples - -```bash -vastai create ssh-key -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/create-subaccount.mdx b/cli/reference/create-subaccount.mdx index 9f45232..1953654 100644 --- a/cli/reference/create-subaccount.mdx +++ b/cli/reference/create-subaccount.mdx @@ -33,15 +33,9 @@ vastai create subaccount --email EMAIL --username USERNAME --password PASSWORD - Creates a new account that is considered a child of your current account as defined via the API key. -vastai create subaccount `--email` bob@gmail.com `--username` bob `--password` password `--type` host +vastai create subaccount --email bob@gmail.com --username bob --password password --type host -vastai create subaccount `--email` vast@gmail.com `--username` vast `--password` password `--type` host - -## Examples - -```bash -vastai create subaccount -``` +vastai create subaccount --email vast@gmail.com --username vast --password password --type host ## Global Options diff --git a/cli/reference/create-team-role.mdx b/cli/reference/create-team-role.mdx index 19eb4c4..6e3c72c 100644 --- a/cli/reference/create-team-role.mdx +++ b/cli/reference/create-team-role.mdx @@ -26,12 +26,6 @@ vastai create team-role --name NAME --permissions PERMISSIONS Creating a new team role involves understanding how permissions must be sent via json format. You can find more information about permissions here: https://vast.ai/docs/cli/roles-and-permissions -## Examples - -```bash -vastai create team-role -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/create-team.mdx b/cli/reference/create-team.mdx index 8a24058..0ca9f6d 100644 --- a/cli/reference/create-team.mdx +++ b/cli/reference/create-team.mdx @@ -8,7 +8,7 @@ Create a new team ## Usage ```bash -vastai create team [OPTIONS] +vastai create-team --team-name TEAM_NAME [--transfer-credit AMOUNT] ``` ## Options @@ -17,7 +17,7 @@ vastai create team [OPTIONS] name of the team - + amount of personal credit to transfer to the new team @@ -36,8 +36,8 @@ When you create a team: Optional: You can transfer a portion of your existing personal credits to the team by using - the `--transfer_credit` flag. Example: - vastai create-team `--team_name` myteam `--transfer_credit` 25 + the `--transfer-credit` flag. Example: + vastai create-team --team-name myteam --transfer-credit 25 Notes: - You cannot create a team from within another team account. @@ -45,12 +45,6 @@ Notes: For more details, see: https://vast.ai/docs/teams-quickstart -## Examples - -```bash -vastai create team -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/create-template.mdx b/cli/reference/create-template.mdx index bde973b..30bf250 100644 --- a/cli/reference/create-template.mdx +++ b/cli/reference/create-template.mdx @@ -22,7 +22,7 @@ vastai create template - docker image tag (can also be appended to end of image_path) + docker image tag @@ -54,7 +54,7 @@ vastai create template - For runtype 'jupyter', directory in instance to use to launch jupyter. Defaults to image's working directory + For runtype 'jupyter', directory in instance to use to launch jupyter @@ -69,8 +69,8 @@ vastai create template search offers filters - - Disable default search param query args (alias: `--no-default`) + + Disable default search param query args @@ -93,20 +93,6 @@ vastai create template make template available to public -## Description - -Create a template that can be used to create instances with - -## Examples - -```bash -vastai create template --name "tgi-llama2-7B-quantized" --image "ghcr.io/huggingface/text-generation-inference:1.0.3" - --env "-p 3000:3000 -e MODEL_ARGS='--model-id TheBloke/Llama-2-7B-chat-GPTQ --quantize gptq'" - --onstart-cmd 'wget -O - https://raw.githubusercontent.com/vast-ai/vast-pyworker/main/scripts/launch_tgi.sh | bash' - --search_params "gpu_ram>=23 num_gpus=1 gpu_name=RTX_3090 inet_down>128 direct_port_count>3 disk_space>=192 driver_version>=535086005 rented=False" - --disk_space 8.0 --ssh --direct -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/create-volume.mdx b/cli/reference/create-volume.mdx index 3bee47d..cb0b860 100644 --- a/cli/reference/create-volume.mdx +++ b/cli/reference/create-volume.mdx @@ -19,12 +19,12 @@ vastai create volume ID [options] ## Options - - size in GB of volume. Default 15 GB. (alias: `--size`) + + size in GB of volume. Default %(default)s GB. - - Optional name of volume. (alias: `--name`) + + Optional name of volume. ## Description @@ -32,12 +32,6 @@ vastai create volume ID [options] Creates a volume from an offer ID (which is returned from "search volumes"). Each offer ID can be used to create multiple volumes, provided the size of all volumes does not exceed the size of the offer. -## Examples - -```bash -vastai create volume -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/create-workergroup.mdx b/cli/reference/create-workergroup.mdx index 7a90a91..f9f1fc1 100644 --- a/cli/reference/create-workergroup.mdx +++ b/cli/reference/create-workergroup.mdx @@ -21,12 +21,12 @@ vastai create workergroup [OPTIONS] template id (optional) - - Disable default search param query args (alias: `--no-default`) + + Disable default search param query args - launch args string for create instance ex: "`--onstart` onstart_wget.sh `--env` '-e ONSTART_PATH=https://s3.amazonaws.com/vast.ai/onstart_OOBA.sh' `--image` atinoda/text-generation-webui:default-nightly `--disk` 64" + launch args string for create instance ex: "--onstart onstart_wget.sh --env '-e ONSTART_PATH=https://s3.amazonaws.com/vast.ai/onstart_OOBA.sh' --image atinoda/text-generation-webui:default-nightly --disk 64" @@ -69,13 +69,7 @@ vastai create workergroup [OPTIONS] Create a new autoscaling group to manage a pool of worker instances. -Example: vastai create workergroup `--template_hash` HASH `--endpoint_name` "LLama" `--test_workers` 5 - -## Examples - -```bash -vastai create workergroup -``` +Example: vastai create workergroup --template_hash HASH --endpoint_name "LLama" --test_workers 5 ## Global Options diff --git a/cli/reference/defrag-machines.mdx b/cli/reference/defrag-machines.mdx index 1816465..99a6f4d 100644 --- a/cli/reference/defrag-machines.mdx +++ b/cli/reference/defrag-machines.mdx @@ -1,9 +1,34 @@ --- title: "vastai defrag machines" sidebarTitle: "defrag machines" -description: "Host command" --- -import DefragMachinesCLI from '/snippets/host/cli/defrag-machines.mdx'; +[Host] Defragment machines - +## Usage + +```bash +vastai defragment machines IDs +``` + +## Arguments + + + ids of machines + + +## Description + +Defragment some of your machines. This will rearrange GPU assignments to try and make more multi-gpu offers available. + +## Global Options + +The following options are available for all commands: + +| Option | Description | +| --- | --- | +| `--url URL` | Server REST API URL | +| `--retry N` | Retry limit | +| `--raw` | Output machine-readable JSON | +| `--explain` | Verbose explanation of API calls | +| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/delete-api-key.mdx b/cli/reference/delete-api-key.mdx index 3d45bfd..7cb72a4 100644 --- a/cli/reference/delete-api-key.mdx +++ b/cli/reference/delete-api-key.mdx @@ -17,12 +17,6 @@ vastai delete api-key ID id of apikey to remove -## Examples - -```bash -vastai delete api-key -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/delete-deployment.mdx b/cli/reference/delete-deployment.mdx index f78142b..6650243 100644 --- a/cli/reference/delete-deployment.mdx +++ b/cli/reference/delete-deployment.mdx @@ -20,7 +20,7 @@ vastai delete deployment [ID | --name NAME [--tag TAG]] ## Options - name of deployment to delete (deletes all tags unless `--tag` is specified) + name of deployment to delete (deletes all tags unless --tag is specified) @@ -31,8 +31,8 @@ vastai delete deployment [ID | --name NAME [--tag TAG]] ```bash vastai delete deployment 1234 -vastai delete deployment --name my-deployment -vastai delete deployment --name my-deployment --tag prod + vastai delete deployment --name my-deployment + vastai delete deployment --name my-deployment --tag prod ``` ## Global Options diff --git a/cli/reference/delete-endpoint.mdx b/cli/reference/delete-endpoint.mdx index 5bc3307..0b61dcc 100644 --- a/cli/reference/delete-endpoint.mdx +++ b/cli/reference/delete-endpoint.mdx @@ -21,12 +21,6 @@ vastai delete endpoint ID Example: vastai delete endpoint 4242 -## Examples - -```bash -vastai delete endpoint -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/delete-env-var.mdx b/cli/reference/delete-env-var.mdx index 9b828ce..ba0b45c 100644 --- a/cli/reference/delete-env-var.mdx +++ b/cli/reference/delete-env-var.mdx @@ -17,12 +17,6 @@ vastai delete env-var Environment variable name to delete -## Examples - -```bash -vastai delete env-var -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/delete-machine.mdx b/cli/reference/delete-machine.mdx index 74b0654..b9f0c59 100644 --- a/cli/reference/delete-machine.mdx +++ b/cli/reference/delete-machine.mdx @@ -1,9 +1,30 @@ --- title: "vastai delete machine" sidebarTitle: "delete machine" -description: "Host command" --- -import DeleteMachineCLI from '/snippets/host/cli/delete-machine.mdx'; +[Host] Delete machine if the machine is not being used by clients. host jobs on their own machines are disregarded and machine is force deleted. - +## Usage + +```bash +vastai delete machine +``` + +## Arguments + + + id of machine to delete + + +## Global Options + +The following options are available for all commands: + +| Option | Description | +| --- | --- | +| `--url URL` | Server REST API URL | +| `--retry N` | Retry limit | +| `--raw` | Output machine-readable JSON | +| `--explain` | Verbose explanation of API calls | +| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/delete-scheduled-job.mdx b/cli/reference/delete-scheduled-job.mdx index 0870cff..b02764a 100644 --- a/cli/reference/delete-scheduled-job.mdx +++ b/cli/reference/delete-scheduled-job.mdx @@ -17,12 +17,6 @@ vastai delete scheduled-job ID id of scheduled job to remove -## Examples - -```bash -vastai delete scheduled-job -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/delete-ssh-key.mdx b/cli/reference/delete-ssh-key.mdx index bcbd584..b24e814 100644 --- a/cli/reference/delete-ssh-key.mdx +++ b/cli/reference/delete-ssh-key.mdx @@ -17,12 +17,6 @@ vastai delete ssh-key ID id ssh key to delete -## Examples - -```bash -vastai delete ssh-key -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/delete-template.mdx b/cli/reference/delete-template.mdx index 55af1ad..974fb90 100644 --- a/cli/reference/delete-template.mdx +++ b/cli/reference/delete-template.mdx @@ -8,7 +8,7 @@ Delete a Template ## Usage ```bash -vastai delete template --template-id +vastai delete template [--template-id | --hash-id ] ``` ## Options @@ -17,15 +17,9 @@ vastai delete template --template-id Template ID of Template to Delete -## Description - -Deleting a template only removes the user's relationship to the template; it is not destroyed. - -## Examples - -```bash -vastai delete template --template-id 12345 -``` + + Hash ID of Template to Delete + ## Global Options diff --git a/cli/reference/delete-volume.mdx b/cli/reference/delete-volume.mdx index 572cd5f..101874b 100644 --- a/cli/reference/delete-volume.mdx +++ b/cli/reference/delete-volume.mdx @@ -21,12 +21,6 @@ vastai delete volume ID Deletes volume with the given ID. All instances using the volume must be destroyed before the volume can be deleted. -## Examples - -```bash -vastai delete volume -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/delete-workergroup.mdx b/cli/reference/delete-workergroup.mdx index 2abf44d..6992785 100644 --- a/cli/reference/delete-workergroup.mdx +++ b/cli/reference/delete-workergroup.mdx @@ -22,12 +22,6 @@ vastai delete workergroup ID Note that deleting a workergroup doesn't automatically destroy all the instances that are associated with your workergroup. Example: vastai delete workergroup 4242 -## Examples - -```bash -vastai delete workergroup -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/destroy-instance.mdx b/cli/reference/destroy-instance.mdx index 1bf8eaa..f6ae51b 100644 --- a/cli/reference/destroy-instance.mdx +++ b/cli/reference/destroy-instance.mdx @@ -8,7 +8,7 @@ Destroy an instance (irreversible, deletes data) ## Usage ```bash -vastai destroy instance id [-h] [--api-key API_KEY] [--raw] +vastai destroy instance id [-h] [-y] [--api-key API_KEY] [--raw] ``` ## Arguments @@ -17,16 +17,17 @@ vastai destroy instance id [-h] [--api-key API_KEY] [--raw] id of instance to delete +## Options + + + Skip confirmation prompt + + ## Description Perfoms the same action as pressing the "DESTROY" button on the website at https://console.vast.ai/instances/ Example: vastai destroy instance 4242 - -## Examples - -```bash -vastai destroy instance -``` +Use -y or --yes to skip the confirmation prompt. ## Global Options diff --git a/cli/reference/destroy-instances.mdx b/cli/reference/destroy-instances.mdx index b42b7a6..a473afb 100644 --- a/cli/reference/destroy-instances.mdx +++ b/cli/reference/destroy-instances.mdx @@ -8,7 +8,7 @@ Destroy a list of instances (irreversible, deletes data) ## Usage ```bash -vastai destroy instances [--raw] +vastai destroy instances [--raw] [-y] [ ...] ``` ## Arguments @@ -17,11 +17,11 @@ vastai destroy instances [--raw] ids of instance to destroy -## Examples +## Options -```bash -vastai destroy instances -``` + + Skip confirmation prompt + ## Global Options diff --git a/cli/reference/destroy-team.mdx b/cli/reference/destroy-team.mdx index e55c780..8bd868f 100644 --- a/cli/reference/destroy-team.mdx +++ b/cli/reference/destroy-team.mdx @@ -11,12 +11,6 @@ Destroy your team vastai destroy team ``` -## Examples - -```bash -vastai destroy team -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/detach-ssh.mdx b/cli/reference/detach-ssh.mdx index e2e16c6..9e7d079 100644 --- a/cli/reference/detach-ssh.mdx +++ b/cli/reference/detach-ssh.mdx @@ -18,19 +18,13 @@ vastai detach instance_id ssh_key_id - id of the key to detach to the instance + id of the key to detach from the instance ## Description Example: vastai detach 99999 12345 -## Examples - -```bash -vastai detach ssh -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/dump-logs.mdx b/cli/reference/dump-logs.mdx new file mode 100644 index 0000000..1616b99 --- /dev/null +++ b/cli/reference/dump-logs.mdx @@ -0,0 +1,61 @@ +--- +title: "vastai dump-logs" +sidebarTitle: "dump-logs" +--- + +[Host] Bundle self-test diagnostics for support + +## Usage + +```bash +vastai dump-logs [--instance-id INSTANCE_ID] [--output-dir DIR] [--include-local-host-artifacts] +``` + +## Arguments + + + Machine ID + + +## Options + + + Instance ID to pull Vast instance logs from + + + + Directory for the diagnostic bundle (default: /tmp) + + + + Include local OS/kaalia artifacts; only use when running on the actual Vast host + + +## Description + +Creates a redacted diagnostic tarball containing CLI-visible self-test +evidence. If --instance-id is provided, the command also pulls container +and daemon logs from the Vast instance logs API. + +Local OS/kaalia artifacts are only collected with +--include-local-host-artifacts. Use that option only when running this +command on the actual host machine; from a laptop, it would collect the +laptop's logs instead. + +## Examples + +```bash +vastai dump-logs 12345 --instance-id 67890 +``` + +## Global Options + +The following options are available for all commands: + +| Option | Description | +| --- | --- | +| `--url URL` | Server REST API URL | +| `--retry N` | Retry limit | +| `--raw` | Output machine-readable JSON | +| `--explain` | Verbose explanation of API calls | +| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/execute.mdx b/cli/reference/execute.mdx index 50485c6..ed96c7e 100644 --- a/cli/reference/execute.mdx +++ b/cli/reference/execute.mdx @@ -24,43 +24,40 @@ vastai execute id COMMAND ## Options - 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` + try to schedule a command to run hourly, daily, or weekly. Valid values are HOURLY, DAILY, WEEKLY For ex. --schedule DAILY + Allowed values: HOURLY, DAILY, WEEKLY - + Start date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is now. (optional) - + End date/time in format 'YYYY-MM-DD HH:MM:SS PM' (UTC). Default is 7 days from now. (optional) - - Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. `--day` 0 + + Day of week you want scheduled job to run on (0-6, where 0=Sunday) or "*". Default will be 0. For ex. --day 0 - - Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. `--hour` 16 + + Hour of day you want scheduled job to run on (0-23) or "*" (UTC). Default will be 0. For ex. --hour 16 -## Description - -Available commands: - -| Command | Description | -|---------|-------------| -| `ls` | List directory contents | -| `rm` | Remove files or directories | -| `du` | Summarize device usage for a set of files | - -Returns the output of the command executed on the instance. May take a few seconds to retrieve results. - ## Examples ```bash vastai execute 99999 'ls -l -o -r' -vastai execute 99999 'rm -r home/delete_this.txt' -vastai execute 99999 'du -d2 -h' + vastai execute 99999 'rm -r home/delete_this.txt' + vastai execute 99999 'du -d2 -h' + +available commands: + ls List directory contents + rm Remote files or directories + du Summarize device usage for a set of files + +Return value: +Returns the output of the command which was executed on the instance, if successful. May take a few seconds to retrieve the results. ``` ## Global Options diff --git a/cli/reference/get-endpt-logs.mdx b/cli/reference/get-endpt-logs.mdx index 351a372..4a19751 100644 --- a/cli/reference/get-endpt-logs.mdx +++ b/cli/reference/get-endpt-logs.mdx @@ -31,12 +31,6 @@ vastai get endpt-logs ID [--api-key API_KEY] Example: vastai get endpt-logs 382 -## Examples - -```bash -vastai get endpt-logs -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/get-endpt-workers.mdx b/cli/reference/get-endpt-workers.mdx new file mode 100644 index 0000000..0aa321b --- /dev/null +++ b/cli/reference/get-endpt-workers.mdx @@ -0,0 +1,34 @@ +--- +title: "vastai get endpt-workers" +sidebarTitle: "get endpt-workers" +--- + +List workers on an endpoint group with status and measured_perf + +## Usage + +```bash +vastai get endpt-workers ID [--api-key API_KEY] +``` + +## Arguments + + + id of endpoint group whose workers to list + + +## Description + +Example: vastai get endpt-workers 21979 + +## Global Options + +The following options are available for all commands: + +| Option | Description | +| --- | --- | +| `--url URL` | Server REST API URL | +| `--retry N` | Retry limit | +| `--raw` | Output machine-readable JSON | +| `--explain` | Verbose explanation of API calls | +| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/get-wrkgrp-logs.mdx b/cli/reference/get-wrkgrp-logs.mdx index 642850e..e19f05f 100644 --- a/cli/reference/get-wrkgrp-logs.mdx +++ b/cli/reference/get-wrkgrp-logs.mdx @@ -3,7 +3,7 @@ title: "vastai get wrkgrp-logs" sidebarTitle: "get wrkgrp-logs" --- -Fetch logs for a specific serverless worker group group +Fetch logs for a specific serverless worker group ## Usage @@ -14,7 +14,7 @@ vastai get wrkgrp-logs ID [--api-key API_KEY] ## Arguments - id of endpoint group to fetch logs from + id of workergroup to fetch logs from ## Options @@ -31,12 +31,6 @@ vastai get wrkgrp-logs ID [--api-key API_KEY] Example: vastai get endpt-logs 382 -## Examples - -```bash -vastai get wrkgrp-logs -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/invite-member.mdx b/cli/reference/invite-member.mdx index c0f43b6..1054659 100644 --- a/cli/reference/invite-member.mdx +++ b/cli/reference/invite-member.mdx @@ -21,12 +21,6 @@ vastai invite member --email EMAIL --role ROLE role of user to be invited -## Examples - -```bash -vastai invite member -``` - ## Global Options The following options are available for all commands: diff --git a/cli/reference/join-overlay.mdx b/cli/reference/join-overlay.mdx deleted file mode 100644 index ee40235..0000000 --- a/cli/reference/join-overlay.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "vastai join overlay" -sidebarTitle: "join overlay" ---- - -Adds instance to an overlay network - -## Usage - -```bash -vastai join overlay OVERLAY_NAME INSTANCE_ID -``` - -## Arguments - - - Overlay network name to join instance to. - - - - Instance ID to add to overlay. - - -## Description - -Adds an instance to a compatible overlay network. - -## Examples - -```bash -vastai join overlay -``` - -## Global Options - -The following options are available for all commands: - -| Option | Description | -| --- | --- | -| `--url URL` | Server REST API URL | -| `--retry N` | Retry limit | -| `--raw` | Output machine-readable JSON | -| `--explain` | Verbose explanation of API calls | -| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) | diff --git a/cli/reference/label-instance.mdx b/cli/reference/label-instance.mdx index 77d14db..dd2e096 100644 --- a/cli/reference/label-instance.mdx +++ b/cli/reference/label-instance.mdx @@ -21,12 +21,6 @@ vastai label instance -## Examples - -```bash -vastai label instance