> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Globals commands

This topic covers globals commands for the [Postman CLI](/docs/postman-cli/postman-cli-overview/).

[Global variables](/docs/use/send-requests/variables/variables/#defining-global-variables) let you access and reuse a set of variables across an entire workspace, regardless of the active environment. You can use globals commands to validate your local global variables file before you [push it to a Postman workspace](/docs/postman-cli/postman-cli-workspace/#postman-workspace-push).

## `postman globals lint`

This command checks that a local global variables file is valid YAML and has the expected structure, field types, and required fields.

### Usage

```bash
postman globals lint <path> [options]
```

**`<path>`**

Path to a global variables file or directory to lint.

---

### Options

**`-o, --output <format>`** — default: cli

Specifies the format of the lint results printed to the terminal. Accepted values are `cli` (human-readable output), `table` (a human-readable table), `json`, and `csv`. Results print to the terminal rather than saving to a file. To save the results, redirect the output to a file, for example `--output json > results.json`.

---

**`-f, --fail-severity <level>`** — default: error

The command always lints everything and reports all issues. This option only sets the exit code, returning a failure code if any diagnostics are at this severity level or higher.

With `error`, the command returns a failure code only if errors are present. With `warning`, it returns a failure code whether warnings or errors are present. The failure code matters most in CI/CD, where it can stop the pipeline before invalid entities reach the cloud, or fail a pull request check.

---

### Examples

```bash
postman globals lint ./postman/globals

postman globals lint ./postman/globals/workspace.globals.yaml --fail-severity warning

postman globals lint ./postman/globals/workspace.globals.yaml --output json
```