From 31e4fdc2509fd78e8f9dfee7aec486d631ec5822 Mon Sep 17 00:00:00 2001 From: Gobind Puniani Date: Wed, 9 Sep 2026 15:30:04 -0700 Subject: [PATCH] docs(cli/sdk): regenerate CLI and SDK reference baseline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bootstrap baseline for re-landing the vast-cli auto-docs pipeline. Docs main has been unmanaged since the pipeline was reverted (#453), so it had drifted 25 CLI commands / 24 SDK methods / 55 parameter mismatches behind vast-cli master. Merging this first means the re-landed verify-docs check is green on its first run instead of firing the same red alarm that caused the revert. Generated with vast-cli master's scripts (NOT PR #473's stale copies): python scripts/generate_cli_sdk_docs.py \ --output-dir --cli-subdir cli/reference \ --sdk-subdir sdk/python/reference --manifest manifest.json python scripts/patch_docs_nav.py --docs-json docs.json --manifest manifest.json 135 CLI pages, 137 SDK pages, 48 added to nav, 2 nav entries removed (search-instances, show-instances-v1 — both removed from the CLI). Nav patcher exited 0; its exit-2 unmatched-name guard did not fire. Includes the effect of vast-cli #497: create_instance's SDK reference now documents 29 parameters, all 29 of which the api layer accepts. Previously 11 of 27 documented params raised TypeError when called as documented. Co-Authored-By: Claude Opus 5 (1M context) --- cli/reference/accept-price-increase.mdx | 56 ++++ cli/reference/attach-ssh.mdx | 6 +- cli/reference/cancel-copy.mdx | 2 +- cli/reference/cancel-maint.mdx | 32 +- cli/reference/cancel-sync.mdx | 2 +- cli/reference/change-bid.mdx | 21 +- cli/reference/cleanup-machine.mdx | 34 +- cli/reference/clone-volume.mdx | 14 +- cli/reference/cloud-copy.mdx | 22 +- cli/reference/copy.mdx | 25 +- cli/reference/create-api-key.mdx | 6 - 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-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/label-instance.mdx | 6 - cli/reference/launch-instance.mdx | 70 ++-- 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-member.mdx | 6 - cli/reference/remove-team-role.mdx | 6 - cli/reference/reports.mdx | 6 - cli/reference/reset-api-key.mdx | 24 ++ cli/reference/run-benchmarks.mdx | 61 +++- cli/reference/schedule-maint.mdx | 49 ++- cli/reference/scp-url.mdx | 6 - cli/reference/search-benchmarks.mdx | 84 +++-- 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 ++- cli/reference/show-api-key.mdx | 30 ++ 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-backup-files.mdx | 47 +++ cli/reference/show-instance-backups.mdx | 54 ++++ cli/reference/show-instance.mdx | 34 +- cli/reference/show-instances-v1.mdx | 106 ------ cli/reference/show-instances.mdx | 72 +++-- 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 - cli/reference/start-deployment.mdx | 41 +++ cli/reference/start-instance.mdx | 2 +- cli/reference/start-instances.mdx | 6 - cli/reference/stop-deployment.mdx | 42 +++ cli/reference/stop-instance.mdx | 6 - cli/reference/stop-instances.mdx | 2 +- 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 +++ cli/reference/tfa-send-email.mdx | 36 +++ 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 | 306 ++++++++++-------- .../reference/accept-price-increase.mdx | 34 ++ sdk/python/reference/cancel-maint.mdx | 30 +- sdk/python/reference/cleanup-machine.mdx | 30 +- sdk/python/reference/create-scheduled-job.mdx | 64 ++++ sdk/python/reference/defrag-machines.mdx | 30 +- sdk/python/reference/delete-machine.mdx | 30 +- sdk/python/reference/fetch-contracts.mdx | 39 +++ sdk/python/reference/get-endpoint-workers.mdx | 34 ++ .../reference/instance-backup-files.mdx | 34 ++ sdk/python/reference/invite-team-member.mdx | 39 +++ sdk/python/reference/list-machine.mdx | 85 ++++- sdk/python/reference/list-machines.mdx | 85 ++++- .../reference/reject-price-increase.mdx | 34 ++ sdk/python/reference/remove-defjob.mdx | 30 +- sdk/python/reference/remove-team-member.mdx | 34 ++ sdk/python/reference/schedule-maint.mdx | 45 ++- sdk/python/reference/search-benchmarks-v1.mdx | 34 ++ sdk/python/reference/search-offers-new.mdx | 59 ++++ sdk/python/reference/self-test-machine.mdx | 55 +++- sdk/python/reference/set-defjob.mdx | 55 +++- sdk/python/reference/set-min-bid.mdx | 35 +- .../reference/show-instance-backups.mdx | 34 ++ .../reference/show-instance-filters.mdx | 26 ++ sdk/python/reference/show-machine.mdx | 30 +- sdk/python/reference/show-machines.mdx | 22 +- sdk/python/reference/show-maints.mdx | 30 +- .../show-pending-price-increases.mdx | 26 ++ sdk/python/reference/show-team-members.mdx | 26 ++ 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/unlist-machine.mdx | 30 +- sdk/python/reference/update-scheduled-job.mdx | 39 +++ 177 files changed, 4464 insertions(+), 1493 deletions(-) create mode 100644 cli/reference/accept-price-increase.mdx create mode 100644 cli/reference/create-instances.mdx create mode 100644 cli/reference/dump-logs.mdx create mode 100644 cli/reference/get-endpt-workers.mdx create mode 100644 cli/reference/reject-price-increase.mdx create mode 100644 cli/reference/reset-api-key.mdx delete mode 100644 cli/reference/search-instances.mdx create mode 100644 cli/reference/show-api-key.mdx create mode 100644 cli/reference/show-instance-backup-files.mdx create mode 100644 cli/reference/show-instance-backups.mdx delete mode 100644 cli/reference/show-instances-v1.mdx create mode 100644 cli/reference/show-invoices.mdx create mode 100644 cli/reference/show-pending-price-increases.mdx create mode 100644 cli/reference/start-deployment.mdx create mode 100644 cli/reference/stop-deployment.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 create mode 100644 cli/reference/tfa-send-email.mdx 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/instance-backup-files.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-benchmarks-v1.mdx create mode 100644 sdk/python/reference/search-offers-new.mdx create mode 100644 sdk/python/reference/show-instance-backups.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/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 00000000..663ca78f --- /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/attach-ssh.mdx b/cli/reference/attach-ssh.mdx index 8e0aeaa1..e76fc71b 100644 --- a/cli/reference/attach-ssh.mdx +++ b/cli/reference/attach-ssh.mdx @@ -28,9 +28,9 @@ Attach an ssh key to an instance. This will allow you to connect to the instance ## Examples ```bash -vast attach ssh 12371 AAAAB3NzaC1yc2EAAA... - vast attach ssh 12371 $(cat ~/.ssh/id_rsa.pub) - vast attach ssh 12371 ~/.ssh/id_rsa.pub +vastai attach ssh 12371 AAAAB3NzaC1yc2EAAA... + vastai attach ssh 12371 $(cat ~/.ssh/id_rsa.pub) + vastai attach ssh 12371 ~/.ssh/id_rsa.pub All examples attaches the ssh key to instance 12371 ``` diff --git a/cli/reference/cancel-copy.mdx b/cli/reference/cancel-copy.mdx index dcfaed06..a14e7e79 100644 --- a/cli/reference/cancel-copy.mdx +++ b/cli/reference/cancel-copy.mdx @@ -24,7 +24,7 @@ Use this command to cancel any/all current remote copy operations copying to a s ## Examples ```bash -vast cancel copy 12371 +vastai cancel copy 12371 The first example cancels all copy operations currently copying data into instance 12371 ``` diff --git a/cli/reference/cancel-maint.mdx b/cli/reference/cancel-maint.mdx index 91670b30..11e73f07 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/cancel-sync.mdx b/cli/reference/cancel-sync.mdx index 9282352b..0f565f2d 100644 --- a/cli/reference/cancel-sync.mdx +++ b/cli/reference/cancel-sync.mdx @@ -24,7 +24,7 @@ Use this command to cancel any/all current remote cloud sync operations copying ## Examples ```bash -vast cancel sync 12371 +vastai cancel sync 12371 The first example cancels all copy operations currently copying data into instance 12371 ``` diff --git a/cli/reference/change-bid.mdx b/cli/reference/change-bid.mdx index e446a0b0..acde1ffb 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 7e7d13b5..8397b401 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 448cba6a..0e6064b9 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 19f2da8d..fca85196 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 @@ -87,10 +88,15 @@ vastai show connections ID NAME Cloud Type 1001 test_dir drive 1003 data_dir drive + 1004 hf_data hf vastai cloud copy --src /folder --dst /workspace --instance 6003036 --connection 1001 --transfer "Instance To Cloud" + vastai cloud copy --src my-bucket/data --dst /workspace --instance 6003036 --connection 1004 --transfer "Cloud To Instance" -The example copies all contents of /folder into /workspace on instance 6003036 from gdrive connection 'test_dir'. +The first cloud copy example copies all contents of /folder on instance 6003036 into /workspace in gdrive connection 'test_dir'. +The second cloud copy example copies my-bucket/data from Hugging Face connection 'hf_data' into /workspace on the instance. + +Note: Hugging Face cloud destinations must already exist as bucket paths; directories are not created automatically. ``` ## Global Options diff --git a/cli/reference/copy.mdx b/cli/reference/copy.mdx index 283c8e39..9a6f8eec 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 @@ -39,27 +39,32 @@ Supported location formats: - cloud_service:path (cloud service format) - cloud_service.cloud_service_id:path (cloud service with ID) - local:path (explicit local path) -- V.volume_id:path (volume copy, see restrictions) +- V.volume_id:path (volume copy) You should not copy to /root or / as a destination directory, as this can mess up the permissions on your instance ssh folder, breaking future copy operations (as they use ssh authentication) You can see more information about constraints here: https://vast.ai/docs/gpu-instances/data-movement#constraints -Volume copy supports copying to other volumes, instances, and cloud services (via your Cloud Connections). Copying between a volume and a local path is not supported. +Volume copy is currently only supported for copying to other volumes, instances, or cloud services, not local. ## Examples ```bash -vast copy 6003036:/workspace/ 6003038:/workspace/ - vast copy C.11824:/data/test local:data/test - vast copy local:data/test C.11824:/data/test - vast copy drive:/folder/file.txt C.6003036:/workspace/ - vast copy s3.101:/data/ C.6003036:/workspace/ - vast copy V.1234:/file C.5678:/workspace/ +vastai copy 6003036:/workspace/ 6003038:/workspace/ + vastai copy C.11824:/data/test local:data/test + vastai copy local:data/test C.11824:/data/test + vastai copy drive:/folder/file.txt C.6003036:/workspace/ + vastai copy s3.101:/data/ C.6003036:/workspace/ + vastai copy hf.101:/my-bucket/data/ C.6003036:/workspace/ + vastai copy V.1234:/file C.5678:/workspace/ + vastai copy V.1234:/file s3.101:/workspace/ The first example copy syncs all files from the absolute directory '/workspace' on instance 6003036 to the directory '/workspace' on instance 6003038. The second example copy syncs files from container 11824 to the local machine using structured syntax. The third example copy syncs files from local to container 11824 using structured syntax. The fourth example copy syncs files from Google Drive to an instance. The fifth example copy syncs files from S3 bucket with id 101 to an instance. +The sixth example copy syncs files from a Hugging Face bucket using connection id 101 to an instance. +The seventh example copy syncs files from volume 1234 to instance 5678. +The eighth example copy syncs files from volume 1234 to S3 bucket with id 101. ``` ## Global Options diff --git a/cli/reference/create-api-key.mdx b/cli/reference/create-api-key.mdx index 6a2d9f2f..3fee55c2 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-endpoint.mdx b/cli/reference/create-endpoint.mdx index 79bd945f..ae1e29d3 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 847b5491..be13ffd5 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 faf04d2b..16d698b8 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 00000000..979269a4 --- /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-ssh-key.mdx b/cli/reference/create-ssh-key.mdx index e147a089..d5699c8d 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 9f452320..1953654e 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 19eb4c46..6e3c72cf 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 8a240586..0ca9f6d0 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 bde973ba..30bf250d 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 3bee47d5..cb0b8607 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 2acc54e4..5699edc1 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" @@ -49,13 +49,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" - -## Examples - -```bash -vastai create workergroup -``` +Example: vastai create workergroup --template_hash HASH --endpoint_name "LLama" ## Global Options diff --git a/cli/reference/defrag-machines.mdx b/cli/reference/defrag-machines.mdx index 18164651..99a6f4de 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 3d45bfda..7cb72a4c 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 f78142b9..6650243a 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 5bc3307e..0b61dcc5 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 9b828cea..ba0b45cb 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 74b06549..b9f0c59f 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 0870cff9..b02764ac 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 bcbd5843..b24e8146 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 55af1adf..974fb905 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 572cd5fe..101874b9 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 2abf44d3..69927857 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 1bf8eaa5..f6ae51b2 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 b42b7a62..a473afb2 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 e55c780d..8bd868f1 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 e2e16c66..9e7d079e 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 00000000..1616b99f --- /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 50485c65..de3a5901 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 351a372a..4a197511 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 00000000..0aa321b9 --- /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 642850e7..e19f05f9 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 c0f43b63..10546592 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/label-instance.mdx b/cli/reference/label-instance.mdx index 77d14db5..dd2e0960 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