**Source URL:** https://limited.veevavault.dev/commercial/vault-dx/cli/reference

# Command Reference

Complete reference for the `vault` command-line tool. All commands accept the [global options](/commercial/vault-dx/cli/reference/global-options/).

## Platform commands

These commands are available in every Vault. All accept the [global options](/commercial/vault-dx/cli/reference/global-options/).

| Command | Description |
| --- | --- |
| [`vault login`](/commercial/vault-dx/cli/reference/login/) | Authenticate and manage stored environments and credentials |
| [`vault logout`](/vault-dx/cli/reference/login/#vault-logout) | Log out of a stored environment |
| [`vault config`](/commercial/vault-dx/cli/reference/config/) | Pull, push, and package Vault configuration |
| [`vault mdl`](/commercial/vault-dx/cli/reference/mdl/) | Execute an MDL statement |
| [`vault query`](/commercial/vault-dx/cli/reference/query/) | Execute a VQL query |
| `vault api <path>` | Call any Vault API endpoint and print the response |
| `vault version` | Print the installed CLI version and platform |
| [`vault upgrade`](/commercial/vault-dx/cli/reference/update/) | Upgrade the CLI to the latest version |
| [`vault uninstall`](/commercial/vault-dx/cli/reference/uninstall/) | Remove the CLI and all stored credentials |

## Exit codes

The CLI uses specific exit codes so scripts and CI pipelines can branch on failure type.

| Code | Meaning |
| --- | --- |
| `0` | Success |
| `1` | General or unhandled error |
| `2` | Invalid usage: bad arguments or flags |
| `3` | Auth failure: not logged in, expired token, or invalid credentials |
| `4` | Target vault error: no vault specified or vault unreachable |
| `5` | API or validation error returned by Vault, for example a failed component deploy, invalid MDL, or VQL syntax error |
| `6` | Async job failure: `config pull` or `config push` reached a failed or errors-encountered terminal state |