# Configuration

> UiPath CLI is configured through **environment variables** and per-command **flags**. There is no general-purpose configuration file: set environment variables in the runner's environment and pass flags on the commands.

UiPath CLI is configured through **environment variables** and per-command **flags**. There is no general-purpose configuration file: set environment variables in the runner's environment and pass flags on the commands.

## 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. **Hard-coded defaults** — `https://cloud.uipath.com` for the authority, `json` for output format, `info` 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. See [Authentication — Flow 3](./authentication.md#flow-3-environment-variable-auth-access-token-already-in-hand). |
| `UIPATH_CLI_AUTH_TOKEN` | env-var auth flow only | JWT access token. The server URL is derived from the token's `iss` claim. |
| `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). |
| `HTTPS_PROXY` / `https_proxy` | Network layer | HTTPS proxy. |
| `NO_PROXY` / `no_proxy` | Network layer | Proxy bypass list. |

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. Pre-1.0 versions read these implicitly; that behavior was removed. 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. See [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>` | — | `info` |
| 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 @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 three 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.
