> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai update env-var

Update an existing user environment variable

## Usage

```bash theme={null}
vastai update env-var <name> <value>
```

## Arguments

<ParamField path="name" type="string" required>
  Environment variable name to update
</ParamField>

<ParamField path="value" type="string" required>
  New environment variable value
</ParamField>

## Examples

```bash theme={null}
vastai update env-var <NAME> <VALUE>
```

## 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`) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.