# Configuration

> Configuration reference for UiPath CLI, covering environment variables, command-line flags, and precedence rules.

UiPath CLI is configured through **command-line flags**, **environment variables**, and a local **configuration file**. Flags are for a single invocation; environment variables suit CI runners and containers; the configuration file holds defaults that persist across invocations on one machine (output format, log level, and the version/update-channel policy).

## Configuration sources

In order of precedence, from most specific to most general:

1. **Command-line flag** — `--tenant`, `--authority`, `--client-id`, `--output`, `--log-level`, etc. Flags take precedence over every other source.
2. **Environment variable** — variables read by the CLI at runtime (see [Environment variables](#environment-variables)). The CLI reads each variable only at the points documented; there is no implicit "every flag has an env-var counterpart" rule.
3. **Configuration file** — `.uipath/config.json`, discovered by walking up from the current directory to `$HOME`, falling back to `~/.uipath/config.json`. Managed via `uip config get|set|clear`; holds `output`, `logLevel`, `interactive`, `updateChannel`, and `version`. See [uip config](./uip-config.md) for the full key reference.
4. **Hard-coded defaults** — `https://cloud.uipath.com` for the authority, `json` for output format, `warn` for log level, page size of `50` on list verbs.

## Environment variables

Environment variables are the primary mechanism for configuring the CLI in CI runners, containers, and per-shell developer setups. Set them in the runner's environment (or in a `.env` file consumed by your runner), and the CLI reads them at the points documented below.

| Variable | Read by | Purpose |
|---|---|---|
| `UIPATH_URL` | `uip login`, every authenticated command | Override the identity authority base URL. Default is `https://cloud.uipath.com`. |
| `UIPATH_CLI_ENABLE_ENV_AUTH` | Every authenticated command | Set to literal `true` to switch the CLI from the file-based credentials flow to **environment-variable auth**. With this gate on, the CLI reads the access token + tenant + organization from the variables below and bypasses the `~/.uipath/` credentials folder entirely. Refer to [Authentication — Flow 4](./authentication.md#flow-4-environment-variable-auth-access-token-already-in-hand). |
| `UIPATH_CLI_AUTH_TOKEN` | env-var auth flow only | Access token: a JWT, or a Personal Access Token. For a JWT, the server URL is derived from the token's `iss` claim. For a Personal Access Token, which is not a JWT, set `UIPATH_URL` to the UiPath base URL. |
| `UIPATH_CLI_ORGANIZATION_NAME` | env-var auth flow only | Organization slug. |
| `UIPATH_CLI_ORGANIZATION_ID` | env-var auth flow only | Organization UUID. |
| `UIPATH_CLI_TENANT_NAME` | env-var auth flow only | Tenant slug. |
| `UIPATH_CLI_TENANT_ID` | env-var auth flow only | Tenant UUID. |
| `UIPATH_TELEMETRY_DISABLED` | Telemetry init | Set to `1` or `true` to opt out of anonymous usage telemetry. |
| `UIPATH_AI_CONNECTION_STRING` | Telemetry init | Override the Application Insights connection string. |
| `HTTP_PROXY` / `http_proxy` | Network layer | HTTP proxy for outbound requests (host and tools). |
| `UIPATH_PROXY_INTEGRATED_AUTH` | Network layer | Set to literal `true` to authenticate the proxy `CONNECT` tunnel with Windows Integrated Authentication — Kerberos/Negotiate or NTLM single sign-on. Without the opt-in the CLI supports no-auth and Basic proxies only. |
| `UIPATH_PROXY_USER` / `UIPATH_PROXY_PASSWORD` / `UIPATH_PROXY_DOMAIN` | Network layer | Authenticate the proxy as a specific account rather than the logged-in user. Credentials may also be supplied as `user:pass@` in the proxy URL. Supplying them excludes ambient SSO, so a wrong password fails rather than silently falling back. |
| `HTTPS_PROXY` / `https_proxy` | Network layer | HTTPS proxy. |
| `NO_PROXY` / `no_proxy` | Network layer | Proxy bypass list. |
| `UIP_LOG_LEVEL` | Logging | Log level when `--log-level` is not passed and the configuration file sets no `logLevel`. Accepts `debug`, `info`, `warn`, or `error`. Refer to [Global options — --log-level](./global-options.md#--log-level). |
| `UIP_DEFAULT_OUTPUT` | Output formatting | Overrides the built-in `json` default when `--output` is not passed. Accepts `table`, `json`, `yaml`, `plain`, or `markdown`; an explicit `--output` on the command line always wins. |
| `UIP_TIMINGS` | Timing instrumentation | Set to `1` or `true` to print a per-invocation timing line to stderr (`total`, `startup`, `command`, `http`/`httpCalls`, `flush`). Refer to [Global options — Command timings](./global-options.md#command-timings). |
| `UIP_TIMINGS_FILE` | Timing instrumentation | Path of a file to append the timing line to instead of stderr. Read only when `UIP_TIMINGS` is on. |
| `UIPATH_CLI_TOOLS_DIRS` | Tool discovery and install | For a host application that embeds the CLI: a list of `node_modules/@uipath` directories, separated by `;` on Windows and `:` on macOS/Linux. When set, only these directories are searched for tools, the first entry is where `uip tools install` writes, and the CLI does not update itself. |
| `NO_COLOR` | Terminal output | Any value forces color off in `--output table`, overriding TTY auto-detection. |
| `FORCE_COLOR` | Terminal output | Forces color on, even when stdout is not a TTY (e.g. piped output you still want colored). Checked before TTY detection, alongside `NO_COLOR`. |

For non-secret values that vary between deployments (tenant, organization, folder name), pass them as variables in your CI runner and reference them in `uip` commands:

```yaml
env:
  UIPATH_TENANT: Production
  UIPATH_FOLDER: Shared
script:
  - uip login --client-id env.UIPATH_CLIENT_ID --client-secret env.UIPATH_CLIENT_SECRET --tenant "$UIPATH_TENANT"
  - uip or folders list --all --path "$UIPATH_FOLDER"
```

:::warning
**No implicit reading of UIPATH_CLIENT_ID / UIPATH_CLIENT_SECRET**

Setting `UIPATH_CLIENT_ID` and `UIPATH_CLIENT_SECRET` in the environment alone does **not** authenticate the CLI. Pass them explicitly using the `env.VAR_NAME` prefix on `--client-id` / `--client-secret`, or use the env-var auth flow above for token-based authentication. Refer to [Authentication](./authentication.md).
:::

## Where each setting can live

| Setting | Flag | Env var | Default |
|---|---|---|---|
| Authority / base URL | `--authority <url>` | `UIPATH_URL` | `https://cloud.uipath.com` |
| External App client ID | `--client-id <id>` | — *(set via flag with env.VAR_NAME prefix)* | none |
| External App client secret | `--client-secret <secret>` | — *(set via flag with env.VAR_NAME prefix)* | none |
| Tenant | `--tenant <name>` (or session) | — | from session |
| Folder | `--folder-path` / `--folder-key` per command | — | none |
| Output format | `--output <format>` | — | `json` |
| Output filter | `--output-filter <jmespath>` | — | none |
| Log level | `--log-level <level>` | `UIP_LOG_LEVEL` | `warn` |
| Log file | `--log-file <path>` | — | none |
| npm registry for tools | — | — | `.npmrc` `@uipath:registry` (if set), else npm default |
| Telemetry | — | `UIPATH_TELEMETRY_DISABLED=1` | enabled |

Settings without an env-var column can only be set per command via flags.

## Example setups

### Minimal CI runner (everything via env)

```yaml
env:
  UIPATH_URL: https://cloud.uipath.com
  UIPATH_CLIENT_ID: ${{ secrets.UIPATH_CLIENT_ID }}
  UIPATH_CLIENT_SECRET: ${{ secrets.UIPATH_CLIENT_SECRET }}
  UIPATH_TENANT: Production
  UIPATH_TELEMETRY_DISABLED: "1"

steps:
  - run: npm install -g @uipath/cli
  - run: uip tools install @uipath/orchestrator-tool
  - run: uip tools install @uipath/solution-tool
  - run: |
      uip login \
        --client-id env.UIPATH_CLIENT_ID \
        --client-secret env.UIPATH_CLIENT_SECRET \
        --tenant "$UIPATH_TENANT"
  - run: uip or folders list
```

### Container with a pre-issued token (env-var auth flow)

```bash
export UIPATH_CLI_ENABLE_ENV_AUTH=true
export UIPATH_CLI_AUTH_TOKEN="$BUILD_TOKEN"
export UIPATH_CLI_ORGANIZATION_NAME=contoso
export UIPATH_CLI_ORGANIZATION_ID="$ORG_UUID"
export UIPATH_CLI_TENANT_NAME=Default
export UIPATH_CLI_TENANT_ID="$TENANT_UUID"

uip or folders list
```

No `uip login` step, no file written. Every command authenticates from the env vars.

## See also

- [Authentication](./authentication.md) — the auth flows and which env vars each one reads.
- [Installing UiPath CLI](./installing-uipath-cli.md) — proxy variables, telemetry opt-out, and CI install patterns.
- [Sessions and credentials](./concepts-sessions.md) — the `.uipath/` credentials folder written by `uip login`.
- [Global options](./global-options.md) — flags that override environment variables per invocation.
- [uip config](./uip-config.md) — the `.uipath/config.json` file, its full key reference, and the `get`/`set`/`clear` commands that manage it.
