# uip config

> Syntax and options for `uip config`, which reads and sets CLI preferences in config.json and freezes the CLI, tool, and skills versions a project runs on.

`uip config` reads and writes the CLI configuration file. The file holds defaults such as the output format and log level, the update channel, and, when the config is frozen, the exact CLI, tool, and skills versions every command runs on.

## Synopsis

```
uip config get [key] [-c <path>]
uip config set <key> <value> [-c <path>] [--force]
uip config clear <key> [-c <path>] [--force]
uip config freeze [--all] [--force]
uip config unfreeze
uip config export --output-file <path> [--overwrite]
uip config import --input <path>
```

All `uip config` verbs honor the [global options](./global-options.md) (`--output`, `--output-filter`, `--log-level`, `--log-file`). Exit codes follow the [standard contract](./exit-codes.md). `uip config` commands do not run the daily CLI sync.

## The config file

The CLI reads one config file:

- The nearest `.uipath/config.json` in the current folder or a folder above it.
- Else `~/.uipath/config.json`, the home config.

The CLI does not merge the two files. A project file replaces the home file completely, so a repo config without a `versions` block is not frozen, even when the home config is frozen. When the file the CLI reads has no `versions` block but a config further up has one, one stderr line names the frozen config that is not used.

`freeze`, `unfreeze`, `export`, and `import` act on this file. `get`, `set`, and `clear` also take `-c, --config-file <path>`, which names another file. An empty file, or a file with only white space, is an empty config. A file that starts with a UTF-8 byte order mark (BOM) loads.

## Config keys

| Key | Valid values | Description |
|---|---|---|
| `output` | `table`, `json`, `yaml`, `plain`, `markdown` | Default output format for CLI commands. |
| `logLevel` | `error`, `warn`, `info`, `debug` | Default log level. |
| `interactive` | `never`, `auto`, `always` | When the CLI can show interactive prompts. Defaults to `auto`. |
| `updateChannel` | `stable`, `preview` (`dev` is accepted but not advertised) | Release channel that updates resolve from. Unset means the channel of the running CLI build, else `stable`. |

These four keys live under `core` in the file. `uip config set`, `get`, and `clear` reject any other key with `Code: "ConfigUnknownKey"` and exit `3`.

### The versions block

A frozen config has a top-level `versions` block. Only `uip config freeze`, `uip config import`, `uip update --force`, `uip tools install --force`, and `uip tools uninstall --force` write it.

| Key | Value | Description |
|---|---|---|
| `versions.cli` | An exact version, such as `1.207.3` or `1.207.3-preview.12` | The CLI pin. A `versions` block must have it. |
| `versions.skills` | An exact version | The `@uipath/skills` pin. Optional: without it, `uip update` leaves the skills as they are. |
| `versions.tools` | `{ "@uipath/<name>-tool": "<version>" }` | Tool pins, keyed by package name. A tool that this map does not list does not run. |

Every skills and tool pin must be on the `major.minor` line of `versions.cli`. A file that breaks this rule does not load, and a command that would write such pins fails and writes nothing. A CLI pin that is a preview or dev build needs `core.updateChannel` set to that channel.

```json
{
    "versions": {
        "cli": "1.207.1",
        "skills": "1.207.0",
        "tools": { "@uipath/orchestrator-tool": "1.207.3" }
    },
    "core": { "updateChannel": "stable" }
}
```

What a freeze does at run time is described in [Freezing versions](./versioning.md#freezing-versions).

### Removed keys

| Key | What happens now |
|---|---|
| `version` (`core.version`) | Replaced by the `versions` block. `uip config set version`, `get version`, and `clear version` exit `3` with `Code: "ConfigMovedKey"`. See [Old core.version files](#old-coreversion-files). |
| `autoVersionSync`, `versionSource` | Ignored when read. `uip config set` rejects them with `Code: "ConfigUnknownKey"`. |
| `clientSecret`, `clientId` | Not config keys. The CLI deletes `auth.clientId` and `auth.clientSecret` from a config file when it loads it. Credentials come from [`uip login`](./uip-login.md). |

## uip config get

Get one configuration value, or the full configuration when no key is given.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `[key]` | no | One of the config keys above. Without it, the command shows the whole file, the `versions` block included. |

### Options

- `-c, --config-file <path>`: path to a specific config file, overriding discovery.

### Examples

```bash
uip config get output
```

```bash
# Show everything, including a freeze
uip config get
```

### Data shape (--output json)

Single key:

```json
{
  "Code": "ConfigGet",
  "Data": { "Key": "output", "Value": "table" }
}
```

A key with no value set returns `Value: "-"`.

No key, the full file:

```json
{
  "Code": "ConfigList",
  "Data": {
    "Config": {
      "Versions": { "cli": "1.207.1", "skills": "1.207.0", "tools": { "@uipath/orchestrator-tool": "1.207.3" } },
      "Core": { "UpdateChannel": "stable" }
    }
  }
}
```

`ConfigGet` and `ConfigList` are distinct `Code` values, so a JMESPath consumer sees one stable shape per `Code`.

## uip config set

Set a configuration value.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<key>` | yes | `output`, `logLevel`, `interactive`, or `updateChannel`. |
| `<value>` | yes | The new value, checked against the valid values of the key. |

### Options

- `-c, --config-file <path>`: path to a specific config file, overriding discovery. The file is created if it doesn't exist.
- `--force`: change the value even when the config is frozen. The freeze stays.

### Examples

```bash
uip config set output table
```

```bash
uip config set updateChannel preview
```

### Data shape (--output json)

```json
{
  "Code": "ConfigSet",
  "Data": { "Key": "output", "Value": "table", "Status": "Updated" }
}
```

An invalid value for a key (for example `uip config set output csv`) fails with `ValidationError` and lists the valid values. On a frozen config, see [The lock on a frozen config](#the-lock-on-a-frozen-config).

## uip config clear

Remove a configuration value. Clearing a key that was never set is not an error.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<key>` | yes | `output`, `logLevel`, `interactive`, or `updateChannel`. |

### Options

- `-c, --config-file <path>`: path to a specific config file, overriding discovery.
- `--force`: remove the value even when the config is frozen. The freeze stays.

### Examples

```bash
uip config clear output
```

```bash
# Clearing a key that was never set changes nothing
uip config clear updateChannel
```

### Data shape (--output json)

```json
{
  "Code": "ConfigClear",
  "Data": { "Key": "output", "Status": "Cleared" }
}
```

`Status` is `"Not set"` instead of `"Cleared"` when the key had no value to remove.

## uip config freeze

Freeze the current config: write the versions installed now into the `versions` block, so every command runs on them. Freeze takes no argument and installs nothing. It also writes `core.updateChannel`.

### Options

| Option | Description |
|---|---|
| `--all` | Also pin each tool that is not installed, at the newest version on the CLI line and channel. Covers tools another command loads, such as rpa-tool for `uip solution pack`. |
| `--force` | Freeze even when the snapshot changes or drops pins the block already has, or pins no tool. |

### What freeze writes

- `versions.cli`: the running CLI.
- `versions.skills`: the installed skills. Freeze reads the project skills store (`.uipath/.skills` next to the config folder), else the home store. With no skills installed, freeze keeps an existing skills pin that is on the CLI line, and otherwise leaves the pin out, with a warning.
- `versions.tools`: the installed tools. A tool off the CLI line is left out, with a warning that names `uip tools install <tool> --force`.
- `core.updateChannel`: the channel the running CLI installs tools from. A preview build writes `preview` and a dev build writes `dev`. A warning says when this value is added or replaced.

Freeze pins a prerelease version as it is, tag included. The Studio-bundled CLI refuses to freeze, because the bundle ignores `versions.cli` and `versions.tools`.

### Freezing over an existing block

Over an existing `versions` block, freeze adds new pins without a warning and keeps each tool the block pins:

- A pinned tool that is not installed keeps its pin when the pin is on the CLI line. With `--all`, the pin moves to the newest version on the line.
- A tool installed or pinned off the CLI line moves to the newest version on the line, with a warning that names `uip update`. So after a move to a new minor, freeze keeps the pinned tools.
- A tool with no build on the line, or a key that is not a known tool, is left out with a warning and named in `Skipped`.

When the snapshot changes or drops a pin, freeze fails and writes nothing. The message names up to three pins, and `Data.Changes` lists all of them. With `--force`, freeze writes the snapshot and gives one warning per changed or dropped pin.

### Examples

```bash
# Pin the running CLI and the installed tools and skills
uip config freeze
```

```bash
# Also pin every tool that is not installed
uip config freeze --all
```

### Data shape (--output json)

```json
{
  "Code": "ConfigFrozen",
  "Data": {
    "Path": "/repo/.uipath/config.json",
    "Versions": {
      "cli": "1.207.1",
      "skills": "1.207.0",
      "tools": { "@uipath/orchestrator-tool": "1.207.3" }
    },
    "Skipped": ["@uipath/rpa-tool"]
  }
}
```

`Versions` is the block as written. `Skipped` names each tool, and `@uipath/skills`, that freeze left out.

### Failures

Each failure writes nothing and exits `1`.

| Code | ErrorCode | When |
|---|---|---|
| `ConfigFreezeNoTool` | `configuration_error` | No tool would be pinned and neither `--all` nor `--force` is passed. With `--force`, freeze writes an empty `tools` map, and no tool runs until it is pinned. |
| `ConfigFreezeInvalidConfig` | `configuration_error` | The file has a value the config loader rejects, such as a bad `auth` value. Also refused with `--force`. |
| `ConfigFreezeAllNothingFound` | `not_found` | `--all` with no tool installed, and the registry has none of the `@uipath` tools. |
| `ConfigFreezeToolLookup` | The one of the lookup failure | A registry lookup for a pinned tool failed for a reason other than "not found". |

## uip config unfreeze

Remove the `versions` block and `core.updateChannel` from the current config. Every other setting stays. Takes no options.

When `core.updateChannel` is removed, a stderr warning names `uip config set updateChannel <channel>`, which sets it again. Unfreezing the home config warns that it unfreezes every repo without its own config file. A freeze cannot be removed for the CLI alone, because every tool and skills pin needs the CLI pin.

### Data shape (--output json)

```json
{
  "Code": "ConfigUnfrozen",
  "Data": {
    "Path": "/repo/.uipath/config.json",
    "Status": "Unfrozen",
    "Removed": {
      "Versions": { "cli": "1.207.1", "skills": "1.207.0", "tools": { "@uipath/orchestrator-tool": "1.207.3" } },
      "UpdateChannel": "stable"
    }
  }
}
```

`Removed.UpdateChannel` is present only when the file had one. With no freeze, or no config file, `Data` is `{ Path, Status: "NotFrozen" }` and nothing is written.

## uip config export

Copy the current config file to another path. Export copies the whole file and takes no snapshot of installed versions.

### Options

| Option | Required | Description |
|---|---|---|
| `--output-file <path>` | yes | Path of the copy to write. |
| `--overwrite` | no | Replace the output file if it exists. Without it, an existing file is refused. |

### Data shape (--output json)

```json
{
  "Code": "ConfigExported",
  "Data": { "Path": "/repo/ci/config.json", "From": "/repo/.uipath/config.json" }
}
```

### Failures

| Code | Exit | When |
|---|---|---|
| `ConfigExportExists` | `3` | The output file exists and `--overwrite` is not passed. |
| `ConfigExportBadOutputFile` | `3` | The output path is empty, ends with a separator, or names a folder. |
| `ConfigExportNoConfig` | `1` | There is no config file to copy. |
| `ConfigExportWrite` | `1` | The copy cannot be written. |

## uip config import

Check a config file and write it in place of the current config. Import installs nothing. In a repo with no config file yet, an empty `.uipath/config.json` at the repo root makes the import go to the repo instead of the home config.

### Options

| Option | Required | Description |
|---|---|---|
| `--input <path>` | yes | Path of the config file to import. |

Import checks that the file is UTF-8 JSON with valid keys and pins. It drops an old `core.version`, `auth.clientId`, `auth.clientSecret`, `tools.registryUrl`, and `tools.localToolPaths`, with a warning for each. Each key that the current config loses gives a warning.

### Data shape (--output json)

```json
{
  "Code": "ConfigImported",
  "Data": { "Path": "/repo/.uipath/config.json", "From": "/repo/ci/config.json" }
}
```

### Failures

| Code | Exit | When |
|---|---|---|
| `ConfigImportInvalid` | `1` | The file is not UTF-8, is not valid JSON, fails the config checks, or has a bad pin. Nothing is imported. |
| `ConfigImportNotFound` | `1` | The input file is missing or is a folder. |
| `ConfigImportRead` | `1` | The input file cannot be read. |
| `ConfigImportBadInput` | `3` | `--input` is empty. |

## The lock on a frozen config

A frozen config is locked: `uip config set` and `uip config clear` refuse to change it without `--force`. The refusal exits `1` with `Code: "ConfigFrozenEdit"` and `ErrorCode: "configuration_error"`:

```json
{
  "Result": "Failure",
  "Code": "ConfigFrozenEdit",
  "Message": "The config .uipath/config.json is frozen, so output was not changed.",
  "Instructions": "Run the command again with --force to change output and keep the freeze. To unfreeze this config, run 'uip config unfreeze'.",
  "ErrorCode": "configuration_error",
  "Retry": "RetryWillNotFix"
}
```

The lock is on the commands, not on the file: Git or an editor can still change it, and the run-time check catches a bad edit. `uip config set updateChannel` also refuses a channel that a preview or dev CLI pin is not built for.

## Old core.version files

Before CLI 1.207.0, the CLI pin was `core.version`. A config file that has `core.version` does not load, regardless of its value:

- Normal commands and `uip update` are refused with exit `1`, `ErrorCode: "configuration_error"`, and `Retry: "RetryWillNotFix"`. So a pipeline that pinned its version never runs unpinned.
- `uip tools list`, `uip help`, `--help`, `--version`, and the `uip config` commands still run, with a warning.
- The CLI never rewrites the file on its own. `uip config freeze --all` replaces `core.version` with a `versions` block. `uip config freeze`, `unfreeze`, and `import` remove the key when they write, and `freeze` and `import` warn that older CLIs lose this pin.

The `version` key is gone from `uip config set`, `get`, and `clear`. They exit `3` with `Code: "ConfigMovedKey"`, and the message names `uip config freeze`, `uip config get`, or `uip config unfreeze`.

## Related

- [Freezing versions](./versioning.md#freezing-versions): what a frozen config does at run time, and a CI recipe.
- [uip update](./uip-update.md): puts the CLI, tools, and skills on their pins; `--force` moves a frozen machine to the newest versions.
- [uip tools](./uip-tools.md): `--force` on `install` and `uninstall` changes a tool pin.

## See also

- [Global options](./global-options.md)
- [Exit codes](./exit-codes.md)
