# gpustack-cli **Repository Path**: rxworkspace/gpustack-cli ## Basic Information - **Project Name**: gpustack-cli - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-12-04 - **Last Updated**: 2026-12-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gpustack-cli — a command-line client for GPUStack [GPUStack](https://github.com/gpustack/gpustack) is an open-source GPU cluster manager for AI model serving. It ships a web UI, but no user-facing CLI: the `gpustack` command that comes with the server image only starts and maintains the server and worker processes on a node, and cannot reach a running cluster. `gpustack-cli` fills that gap. It talks to the same REST API the UI uses, so clusters, workers, model deployments and API keys can be managed from a terminal or a script — over SSH, in CI, or anywhere the web UI is unreachable. ## Install ```bash cargo build --release install -m 0755 target/release/gpustack-cli ~/.local/bin/gpustack-cli ``` Or with Cargo's installer: ```bash cargo install --path . ``` Requires Rust 1.82 or newer. The binary has no runtime dependencies beyond a TLS root store. ## Quick start ```bash # 1. Log in. The session token is stored in the config file. gpustack-cli login --server http://your-gpustack-host # 2. Look around. gpustack-cli cluster list gpustack-cli worker list gpustack-cli model list # 3. Create a cluster and print the command that joins a GPU node to it. gpustack-cli cluster create prod --provider Docker gpustack-cli cluster worker-command 1 --advertise-address 192.168.1.2 # 4. Deploy a model. gpustack-cli model deploy qwen3 --repo Qwen/Qwen3-0.6B --replicas 1 # 5. Follow it. gpustack-cli model instances 1 gpustack-cli model logs 1 --tail 50 # 6. Talk to it. gpustack-cli apikey create ci --scope inference gpustack-cli chat qwen3 "写一首关于 GPU 的诗" ``` ## Configuration Credentials live in `~/.config/gpustack-cli/config.toml` (override the directory with `GPUSTACK_CLI_HOME`): ```toml server = "http://your-gpustack-host" api_key = "sk-..." session_token = "eyJ..." ``` Every setting has a higher-precedence override: | Setting | Flag | Environment variable | |---------|------|----------------------| | Server URL | `--server` | `GPUSTACK_SERVER` | | API key | `--token` | `GPUSTACK_API_KEY` | | Password (login only) | `--password` | `GPUSTACK_PASSWORD` | `--password -` reads the password from stdin, which keeps it out of the process list: ```bash cat password.txt | gpustack-cli login --password - ``` The config file is written with mode `0600`. ### Two kinds of credential The GPUStack server accepts three credential kinds and picks between them in this order: HTTP Basic, the session cookie, then the API key. - **Session token** — issued by `gpustack-cli login` and stored in the config file. It carries the identity of the logged-in user, so it can do anything that user can do. It expires; re-run `gpustack-cli login` when it does. - **API key** — issued by `gpustack-cli apikey create`, with a scope of `inference`, `management` or `*`. The inference gateway authenticates by key only, so `gpustack-cli chat` needs one. The file is mode `0600` because it holds both. ## Commands ### Session | Command | Description | |---------|-------------| | `gpustack-cli login` | Log in and store the session token. Prompts for the password unless `--password` is given. | | `gpustack-cli logout` | Invalidate the session on the server and forget it locally. | | `gpustack-cli whoami` | Show the identity the current credentials resolve to. | | `gpustack-cli password` | Change the password of the current user (`--current`, `--new`; omit to be prompted). | | `gpustack-cli auth-config` | Show the authentication methods the server offers. | ### Clusters | Command | Description | |---------|-------------| | `gpustack-cli cluster list` | List clusters with worker, GPU and readiness counts. | | `gpustack-cli cluster get ` | Show one cluster. | | `gpustack-cli cluster create ` | Create a cluster (`--provider`, `--description`, `--server-url`). | | `gpustack-cli cluster update --set PATH=VALUE` | Update a cluster. | | `gpustack-cli cluster delete --yes` | Delete a cluster. | | `gpustack-cli cluster set-default ` | Make a cluster the default of its organization. | | `gpustack-cli cluster token ` | Print the registration token and the image to use. | | `gpustack-cli cluster worker-command ` | Print the `docker run` command that joins a worker to the cluster. | | `gpustack-cli cluster manifests ` | Show the Kubernetes manifests of a cluster. | | `gpustack-cli cluster dashboard ` | Show the dashboard of a cluster. | | `gpustack-cli cluster topology ` | Show the topology of a cluster. | | `gpustack-cli cluster topology-preview ` | Preview the topology a declaration would produce. | | `gpustack-cli cluster locations ` | Set a topology field on a batch of workers. | | `gpustack-cli cluster create-worker-pool --set PATH=VALUE` | Create a worker pool inside a cluster. | | `gpustack-cli cluster access ` | List who has access to a cluster. | | `gpustack-cli cluster grant-access ` | Grant a principal access (`--principal-type`). | | `gpustack-cli cluster revoke-access ` | Revoke a principal's access. | | `gpustack-cli cluster proxy ` | Call the Kubernetes API server of a cluster (`--method`, `--body`). | `worker-command` assembles the command from the server's own registration token, so it stays correct across GPUStack versions: ```bash gpustack-cli cluster worker-command 1 --advertise-address 192.168.1.2 ``` ### Workers | Command | Description | |---------|-------------| | `gpustack-cli worker list` | List workers with state and address. | | `gpustack-cli worker get ` | Show one worker. | | `gpustack-cli worker gpus ` | Show the GPU inventory of a worker. | | `gpustack-cli worker create --cluster-id ` | Register a worker in a cluster (`--set PATH=VALUE` for extra fields). | | `gpustack-cli worker update --set PATH=VALUE` | Update a worker. | | `gpustack-cli worker delete --yes` | Delete a worker. | | `gpustack-cli worker dashboard ` | Show the worker's monitoring dashboard. | | `gpustack-cli worker privatekey ` | Print the private key a worker authenticates with. | | `gpustack-cli worker labels --worker-id --label key=value` | Add or overwrite labels on workers. | | `gpustack-cli worker label-options` | Show the label keys and values in use. | | Command | Description | |---------|-------------| | `gpustack-cli worker-pool list` | List worker pools. | | `gpustack-cli worker-pool get ` | Show one worker pool. | | `gpustack-cli worker-pool update --set PATH=VALUE` | Update a worker pool. | | `gpustack-cli worker-pool delete --yes` | Delete a worker pool. | A worker pool is created together with its cluster, so the server offers no standalone create. ### GPU devices and cloud GPU instances | Command | Description | |---------|-------------| | `gpustack-cli gpu list` | List the GPU devices installed in the cluster. | | `gpustack-cli gpu get ` | Show one GPU device. | | `gpustack-cli gpu-instance list` | List cloud GPU instances. | | `gpustack-cli gpu-instance get ` | Show one GPU instance. | | `gpustack-cli gpu-instance create --set PATH=VALUE` | Create a GPU instance. | | `gpustack-cli gpu-instance update --set PATH=VALUE` | Update a GPU instance. | | `gpustack-cli gpu-instance delete --yes` | Delete a GPU instance. | | `gpustack-cli gpu-instance start\|stop ` | Start or stop a GPU instance (the server uses PUT for these). | | `gpustack-cli gpu-instance-type list` | List the GPU instance types. | | `gpustack-cli gpu-instance-type aggregated` | List types with their aggregated availability. | | `gpustack-cli gpu-instance-type create --cluster-id --set PATH=VALUE` | Create a GPU instance type. | | `gpustack-cli gpu-instance-type update --cluster-id --set PATH=VALUE` | Update a GPU instance type. | | `gpustack-cli gpu-instance-type delete --cluster-id --yes` | Delete a GPU instance type. | | `gpustack-cli gpu-instance-type activate\|deactivate --cluster-id ` | Toggle a type's availability. | | `gpustack-cli gpu-instance-flavor list` | List the GPU instance type flavors. | | `gpustack-cli gpu-instance-flavor aggregated` | List flavors with their aggregated availability. | ### GPU service resources The cloud GPU service is managed through its own commands: the instances themselves, the types and flavors they are created from, and the resources that hang off them. | Command | Description | |---------|-------------| | `gpustack-cli gpu-instance-template list\|get\|create\|update\|delete --yes` | List and manage GPU instance templates. | | `gpustack-cli gpu-instance-volume list\|get\|create\|update\|delete --yes` | List and manage persistent volumes of GPU instances. | | `gpustack-cli gpu-instance-volume-type list\|get\|create\|update\|delete --yes` | List and manage the kinds of persistent volume. | | `gpustack-cli gpu-instance-ssh-key list\|get\|create\|update\|delete --yes` | List and manage the SSH public keys GPU instances are reached with. | All four share the generic CRUD commands (list, get, create, update, delete). ### Models | Command | Description | |---------|-------------| | `gpustack-cli model list` | List model deployments. | | `gpustack-cli model get ` | Show one deployment. | | `gpustack-cli model deploy ` | Deploy a model (see below). | | `gpustack-cli model update --set PATH=VALUE` | Update a deployment. | | `gpustack-cli model delete --yes` | Delete a deployment. | | `gpustack-cli model restart ` | Restart a deployment. | | `gpustack-cli model instances ` | List the instances of a deployment. | | `gpustack-cli model logs ` | Show the tail of a model instance's logs. | | `gpustack-cli model dashboard ` | Show the dashboard of a model. | | `gpustack-cli model metrics ` | Show the inference metrics of a model. | | `gpustack-cli model resource-metrics ` | Show the resource metrics of a model. | | `gpustack-cli model cache-metrics ` | Show the cache metrics of a model. | | `gpustack-cli model monitoring-capabilities ` | Show the monitoring capabilities of a model. | | `gpustack-cli model adapters` | List the adapters of a model. | | `gpustack-cli model export [--model-id ]...` | Export deployments as a deployment document. | | `gpustack-cli model import --body ` | Import deployments from a deployment document. | | `gpustack-cli model spanning-roles --body ` | Preview the roles a deployment would span. | | `gpustack-cli model revisions ` | List the revisions of a deployment. | | `gpustack-cli model revision ` | Show one revision of a deployment. | | `gpustack-cli model delete-revision --yes` | Delete one revision of a deployment. | | `gpustack-cli model rollback-preview --revision ` | Preview a rollback of a deployment. | | `gpustack-cli model rollback --revision ` | Roll a deployment back to a revision. | | Command | Description | |---------|-------------| | `gpustack-cli model-instance list` | List model instances. | | `gpustack-cli model-instance get ` | Show one model instance. | | `gpustack-cli model-instance create --model-id --set PATH=VALUE` | Create a model instance. | | `gpustack-cli model-instance update --set PATH=VALUE` | Update a model instance. | | `gpustack-cli model-instance delete --yes` | Delete a model instance. | | `gpustack-cli model-instance logs ` | Show the tail of a model instance's logs. | | `gpustack-cli model-instance logs-download [--output-file ]` | Download the full log of a model instance. | | `gpustack-cli model-instance log-options ` | Show the log options of a model instance. | | `gpustack-cli model-instance dashboard ` | Show the dashboard of a model instance. | | `gpustack-cli model-instance workload-report --body ` | Report the workload of a model instance. | | `gpustack-cli model-instance stop-confirmation ` | Confirm that a model instance may stop. | | `gpustack-cli model-instance port-reservations ` | Show the port reservations of a model instance. | | `gpustack-cli model-instance reserve-ports --body ` | Reserve ports on the members of a model instance. | | `gpustack-cli model-instance release-ports --token ` | Release a port claim on the members of a model instance. | Deployment options: ```bash # Hugging Face (default) gpustack-cli model deploy qwen3 --repo Qwen/Qwen3-0.6B \ --replicas 2 --backend vllm --backend-version v0.9.0 # A single file from a repository gpustack-cli model deploy qwen3 --repo Qwen/Qwen3-0.6B --filename model.safetensors # ModelScope gpustack-cli model deploy qwen3 --source model_scope --model-scope-id Qwen/Qwen3-0.6B # Model files already on the server host gpustack-cli model deploy local --source local_path --local-path /models/qwen3 # Pin the hardware, optionally slicing an accelerator gpustack-cli model deploy qwen3 --repo Qwen/Qwen3-0.6B \ --gpu-type NVIDIA_H100_80GB_HBM3 --gpus-per-replica 1 --slice-memory 50 # Pin every GPU of one worker, for a single-node multi-GPU deployment gpustack-cli model deploy qwen3 --repo Qwen/Qwen3-0.6B \ --gpu-id worker1:cuda:0 --gpu-id worker1:cuda:1 # Backend parameters and environment variables gpustack-cli model deploy qwen3 --repo Qwen/Qwen3-0.6B \ --param max_model_len=8192 --param gpu_memory_utilization=0.9 \ --env CUDA_VISIBLE_DEVICES=0 ``` `--param` and `--env` take `KEY=VALUE` and may be repeated. A `--param` key becomes a command-line flag for the inference engine: `max_model_len=8192` is sent as `--max-model-len=8192`, and a key with no value becomes a bare `--flag`. Underscores in the key become dashes. | Command | Description | |---------|-------------| | `gpustack-cli model-route list` | List model routes. | | `gpustack-cli model-route get ` | Show one model route. | | `gpustack-cli model-route create --set PATH=VALUE` | Create a model route. | | `gpustack-cli model-route update --set PATH=VALUE` | Update a model route. | | `gpustack-cli model-route delete --yes` | Delete a model route. | | `gpustack-cli model-route access ` | Show who may call a model route. | | `gpustack-cli model-route grant-access --body ` | Grant access to a model route. | | `gpustack-cli model-route add-targets --body ` | Add targets to a model route. | | Command | Description | |---------|-------------| | `gpustack-cli model-route-target list` | List model route targets. | | `gpustack-cli model-route-target create --set PATH=VALUE` | Create a model route target. | | `gpustack-cli model-route-target update --set PATH=VALUE` | Update a model route target. | | `gpustack-cli model-route-target delete --yes` | Delete a model route target. | | `gpustack-cli model-route-target set-fallback --body ` | Make a model route target the fallback of its group. | | Command | Description | |---------|-------------| | `gpustack-cli model-file list\|get\|create\|update\|delete --yes` | Register and manage model files. | | `gpustack-cli model-file reset ` | Reset a model file, so it is fetched again. | | Command | Description | |---------|-------------| | `gpustack-cli model-provider list\|get\|create\|update\|delete --yes` | Manage model providers. | | `gpustack-cli model-provider get-models ` | List the models a provider offers. | | `gpustack-cli model-provider get-models-of --body ` | List the models a provider declaration offers. | | `gpustack-cli model-provider test\|test-decision --body ` | Test the connection to a provider declaration. | | `gpustack-cli model-provider test-stored\|test-decision-stored --body ` | Test a stored provider. | | Command | Description | |---------|-------------| | `gpustack-cli model-set list` | List model sets. | | `gpustack-cli model-set specs ` | Show the specs of a model set. | | Command | Description | |---------|-------------| | `gpustack-cli model-evaluation create --body ` | Evaluate a model. | | Command | Description | |---------|-------------| | `gpustack-cli my-model list\|get ` | List the models the current user may call. | ### API keys | Command | Description | |---------|-------------| | `gpustack-cli apikey list` | List API keys (values are masked). | | `gpustack-cli apikey create ` | Create a key (`--scope`, `--expires-in`, `--allow-model`, `--description`). | | `gpustack-cli apikey update --set PATH=VALUE` | Update an API key. | | `gpustack-cli apikey delete --yes` | Delete an API key. | The plain key value is shown once, at creation time: ```bash gpustack-cli apikey create ci --scope inference # Created API key ci (inference). # The key value is shown once; store it now: # sk-xxxxxxxxxxxxxxxx # Saved to the config file; `gpustack-cli chat` will use it. ``` The key is written to the config file so that `gpustack-cli chat` can use it right away. Pass `--no-save` to keep it out of the file. Use `--json` to print the key in JSON instead of a table. Scopes are `inference` (talk to models), `management` ( administer the cluster) and `*` (both). ### Users | Command | Description | |---------|-------------| | `gpustack-cli user list` | List users. | | `gpustack-cli user get ` | Show one user. | | `gpustack-cli user me` | Show the current user. | | `gpustack-cli user update-me --set PATH=VALUE` | Update the current user. | | `gpustack-cli user create ` | Create a user (`--password`, `--full-name`, `--is-admin`). | | `gpustack-cli user update --set PATH=VALUE` | Update a user. | | `gpustack-cli user activate ` | Activate a user. | | `gpustack-cli user deactivate ` | Deactivate a user. | | `gpustack-cli user delete --yes` | Delete a user. | | `gpustack-cli user memberships ` | Show the memberships of a user. | | `gpustack-cli user directory` | List the users that can be picked. | | `gpustack-cli user my-organizations` | List the organizations the current user belongs to. | | `gpustack-cli user my-organization-clusters ` | List the clusters of an organization the current user belongs to. | ### User groups | Command | Description | |---------|-------------| | `gpustack-cli group list` | List user groups. | | `gpustack-cli group get ` | Show one user group. | | `gpustack-cli group create ` | Create a user group (`--description`). | | `gpustack-cli group update --set PATH=VALUE` | Update a user group. | | `gpustack-cli group delete --yes` | Delete a user group. | | `gpustack-cli group members ` | List the members of a user group. | | `gpustack-cli group add-member ` | Add a user to a user group. | | `gpustack-cli group remove-member ` | Remove a user from a user group. | ### Organizations | Command | Description | |---------|-------------| | `gpustack-cli org list` | List organizations. | | `gpustack-cli org get ` | Show one organization. | | `gpustack-cli org create ` | Create an organization (`--description`). | | `gpustack-cli org update --set PATH=VALUE` | Update an organization. | | `gpustack-cli org delete --yes` | Delete an organization. | | `gpustack-cli org directory` | List the organizations that can be picked. | | `gpustack-cli org members ` | List the members of an organization. | | `gpustack-cli org add-member --principal-id ` | Add members to an organization (`--role`). | | `gpustack-cli org set-member-role --role ` | Change the role of a member. | | `gpustack-cli org remove-member ` | Remove a member from an organization. | ### Cloud credentials | Command | Description | |---------|-------------| | `gpustack-cli cloud-credential list\|get\|create\|update\|delete --yes` | Manage cloud credentials (`--set PATH=VALUE`). | | `gpustack-cli cloud-credential provider-proxy ` | Call the cloud provider API through the credential. | ### Cache services | Command | Description | |---------|-------------| | `gpustack-cli cache-service list\|get\|create\|update\|delete --yes` | Manage cache services (`--set PATH=VALUE`). | | `gpustack-cli cache-service instances ` | List the instances of a cache service. | | `gpustack-cli cache-service logs [--tail ]` | Show the logs of a cache service. | | `gpustack-cli cache-service instance-logs [--tail ]` | Show the logs of a cache service instance. | | `gpustack-cli cache-service remove-instance ` | Remove an instance from a cache service. | | `gpustack-cli cache-service models ` | List the models that use a cache service. | | `gpustack-cli cache-service dashboard\|metrics ` | Show the dashboard or metrics of a cache service. | | Command | Description | |---------|-------------| | `gpustack-cli cache-service-instance list\|get\|update --yes` | List and update cache service instances. | An instance comes into being with the cache service that owns it, so the server offers no create or delete for instances. | Command | Description | |---------|-------------| | `gpustack-cli cache-provider list` | List cache providers. | ### Benchmarks | Command | Description | |---------|-------------| | `gpustack-cli benchmark list\|get ` | List and show benchmarks. | | `gpustack-cli benchmark create\|update --set PATH=VALUE` | Create or update a benchmark. | | `gpustack-cli benchmark delete --yes` | Delete a benchmark. | | `gpustack-cli benchmark state --state ` | Change the state of a benchmark. | | `gpustack-cli benchmark update-metrics\|update-results --body ` | Report metrics or results of a benchmark. | | `gpustack-cli benchmark monitoring\|metrics\|resource-metrics\|phase-observations\|monitoring-archive\|dashboard\|results ` | Show monitoring data of a benchmark. | | `gpustack-cli benchmark logs [--tail ]` | Show the logs of a benchmark. | | `gpustack-cli benchmark retry-monitoring-archive ` | Retry the archiving of a benchmark's monitoring data. | | `gpustack-cli benchmark export [--benchmark-id ]...` | Export benchmarks. | | `gpustack-cli benchmark default-profile` | Show the built-in benchmark profile configuration. | ### Inference backends | Command | Description | |---------|-------------| | `gpustack-cli backend list` | List the inference backends. | | `gpustack-cli backend all\|configs` | List every backend including built-ins, or the backend configurations. | | `gpustack-cli backend get \|get-by-name ` | Show one backend. | | `gpustack-cli backend create\|update --set PATH=VALUE` | Create or update a backend. | | `gpustack-cli backend delete --yes` | Delete a backend. | | `gpustack-cli backend from-yaml --set PATH=VALUE` | Create a backend from a configuration document. | | `gpustack-cli backend update-from-yaml --set PATH=VALUE` | Replace a backend with a configuration document. | ### Inference | Command | Description | |---------|-------------| | `gpustack-cli chat ` | Send a chat completion request. | | `gpustack-cli infer complete ` | Send a text completion request. | | `gpustack-cli infer embed ` | Send an embedding request. | | `gpustack-cli infer responses ` | Send a responses request. | | `gpustack-cli infer rerank ...` | Send a rerank request. | | `gpustack-cli infer images ` | Generate images. | | `gpustack-cli infer image-edit ` | Edit an image. | | `gpustack-cli infer image-variation ` | Make variations of an image. | | `gpustack-cli infer moderations ` | Moderate text. | | `gpustack-cli infer score ` | Score text. | | `gpustack-cli infer systemone ` | Send a decision request. | | `gpustack-cli infer audio ` | Transcribe an audio file. | | `gpustack-cli infer audio-translate ` | Translate an audio file. | | `gpustack-cli infer speech ` | Turn text into speech. | | `gpustack-cli infer video-sync ` | Generate a video synchronously. | | `gpustack-cli infer models` | List the models the current credentials may call. | ```bash gpustack-cli chat qwen3 "explain what a KV cache is" gpustack-cli chat qwen3 "explain what a KV cache is" --stream gpustack-cli chat qwen3 --stdin < prompt.txt gpustack-cli chat qwen3 "hello" --system "you are terse" --temperature 0.2 ``` `chat` talks to the OpenAI-compatible endpoint `/v1/chat/completions` and authenticates with an API key. The endpoints that answer with binary data — speech and video — write to a file when `--output-file` names one, and to stdout otherwise: ```bash gpustack-cli infer speech qwen3 "hello" --output-file hello.mp3 ``` ### System | Command | Description | |---------|-------------| | `gpustack-cli system config` | Show the server configuration. | | `gpustack-cli system set-config --set PATH=VALUE` | Change the server configuration. | | `gpustack-cli system dashboard\|usage\|usage-stats\|usage-meta\|usage-summary` | Show dashboard/usage numbers of the server. | | `gpustack-cli system resource-events\|resource-meta` | List resource events and metadata. | | `gpustack-cli system resource-breakdown --body ` | Break the resource usage down. | | `gpustack-cli system log-level\|set-log-level ` | Show or change the server log level. | | `gpustack-cli system memory` | Show the memory profile of the server. | | `gpustack-cli system update` | Show the update status of the server. | | `gpustack-cli system version\|health\|ready` | Show the server version, health or readiness. | | `gpustack-cli system metrics-config\|default-metrics-config` | Show the metrics configuration. | | `gpustack-cli system set-metrics-config --body ` | Change the metrics configuration. | | `gpustack-cli system artifact-capacity\|set-artifact-capacity --body ` | Show or change artifact storage capacity. | | `gpustack-cli system cacerts` | Show the CA certificates the server trusts. | | `gpustack-cli system proxy ` | Reach a site through the server's own proxy. | | `gpustack-cli system usage-breakdown\|usage-export\|usage-export-estimate --body ` | Break down/export usage and estimate cost. | | `gpustack-cli system gpu-instance-breakdown\|gpu-instance-export\|gpu-instance-export-estimate --body ` | Break down/export GPU instance usage and estimate cost. | | `gpustack-cli system storage-breakdown\|storage-export\|storage-export-estimate --body ` | Break down/export storage usage and estimate cost. | ### Model source registry | Command | Description | |---------|-------------| | `gpustack-cli source status` | Show the state of the source registry. | | `gpustack-cli source probe-now` | Trigger a probe of the source registry now. | | Command | Description | |---------|-------------| | `gpustack-cli ota-source get\|set\|delete ` | Show/replace/delete one OTA source document. | | `gpustack-cli ota-source builtin\|reload ` | Show the built-in document of a kind, or reload one. | | Command | Description | |---------|-------------| | `gpustack-cli pd-mode list` | List prefill/decode disaggregation modes. | | `gpustack-cli pd-mode resolve --cluster-id --backend --vendor ` | Resolve the disaggregation recipe a deployment gets. | | Command | Description | |---------|-------------| | `gpustack-cli trace list ` | List the request traces of a model. | | `gpustack-cli trace get ` | Show one request trace. | | `gpustack-cli trace capabilities ` | Show the tracing capabilities of a model. | | Command | Description | |---------|-------------| | `gpustack-cli monitor worker-detail\|worker-metrics\|worker-capabilities\|worker-dashboard ` | Show monitoring detail of a worker. | | `gpustack-cli monitor gpu-detail\|gpu-metrics\|gpu-capabilities\|gpu-dashboard ` | Show monitoring detail of a GPU device. | ### Call an arbitrary API `gpustack-cli api get\|post\|put\|patch\|delete [--query KEY=VALUE] [--set PATH=VALUE]` The `api` command is an escape hatch for endpoints the CLI does not wrap, such as SAML/OIDC/CAS auth flows, worker heartbeats, OTLP traces, Grafana/Prometheus dashboards, etc. ## Output format Every list command defaults to an aligned table. `--output json` returns the server's raw response instead, which is what you want when piping into `jq`: ```bash gpustack-cli model list --output json | jq '.items[] | select(.state != "Running")' ``` ## Exit codes `gpustack-cli` exits `0` on success and `1` on any error, with the reason on stderr. Destructive commands (`cluster delete`, `model delete`, `apikey delete`) refuse to run without `--yes`. ## A note on the API This client is written against the GPUStack v2 REST API. Endpoint paths and field names follow the server; a server upgrade that renames a field will surface here as a decode error rather than silently dropping data. Every endpoint path the client sends is named in `src/api.rs`, grouped by the area of the server it belongs to. A command never spells out a path of its own, so a path the server does not know shows up there rather than in a command file. The endpoints that have no dedicated command are the ones that only a worker, the API gateway or a browser can usefully call: | Endpoint | Why it has no command | |----------|----------------------| | `/auth/saml/*`, `/auth/oidc/*`, `/auth/cas/*` | Browser redirect flows — a CLI cannot follow them. | | `/v2/worker-heartbeat`, `/v2/worker-status` | The worker's own liveness reports. | | `/v2/traces/otlp`, `/v2/usage/gateway-metrics` | Reports from the collector and the gateway. | | `/v2/benchmark-proxy/*` | The load generator's own proxy, authenticated as a worker. | | `/v1-openai/*` | The frozen legacy aliases of `/v1`. | | `/grafana/*`, `/prometheus/*` | Dashboards the web UI embeds. | | `/token-auth`, `/v2/runner-override-entries` | Worker-side probes. |