# uip update

> Syntax and options for `uip update`, which updates installed tools and skills and checks for or applies a newer CLI version.

`uip update` updates every installed tool and skill, and checks for (and by default applies) a newer CLI release. It's the one-command equivalent of running `uip tools update` and a skills update together, plus the CLI's own self-update check.

## Synopsis

```
uip update [--dry-run] [--tools-only | --skills-only] [--no-tools] [--no-skills] [--no-cli-check] [--no-self] [--channel <stable|preview>] [--name <tool-name>] [--agent <agent>] [--local | --no-local]
```

`uip update` honors the [global options](./global-options.md) (`--output`, `--output-filter`, `--log-level`, `--log-file`). Exit codes follow the [standard contract](./exit-codes.md), with one addition below.

## Options

| Flag | Description |
|---|---|
| `--dry-run` | Preview what would change without applying it. |
| `--tools-only` | Update tools; skip the skills section. Mutually exclusive with `--skills-only` and with `--no-tools`. |
| `--skills-only` | Update skills; skip the tools section. Mutually exclusive with `--tools-only` and with `--no-skills`. |
| `--no-tools` | Do not update tools. |
| `--no-skills` | Do not update skills. |
| `--no-cli-check` | Do not probe for a newer CLI version at all. |
| `--no-self` | Probe for a newer CLI version and report it, but do not install it — prints a notice with the manual upgrade command instead of self-updating. |
| `--channel <channel>` | Override the release channel for this run: `stable` or `preview` (see [uip config](./uip-config.md) `updateChannel`). Without this flag, the channel is resolved from `core.updateChannel`/the running CLI's own build. |
| `--name <tool-name>` | Restrict the tools update to one scoped tool name. |
| `--agent <agent>` | Restrict the skills update to one coding agent. |
| `--local` | Restrict the skills update to local (project) scope only. |
| `--no-local` | Restrict the skills update to global scope only. |

`--tools-only` combined with `--no-tools` (or `--skills-only` combined with `--no-skills`) is a contradiction and fails with `ValidationError` before anything runs.

## Version policy

There is no per-invocation version flag — `uip update` always targets the *effective version target*: your `core.version` pin from [`uip config`](./uip-config.md) if one is set, otherwise the latest published release.

- **No pin** — targets the latest release, crossing MINOR and MAJOR boundaries freely (an explicit `uip update` is the user opting into that, unlike the unattended daily background sync, which caps itself to avoid an unexpected MAJOR jump).
- **`major.minor` pin** (a "line" pin, e.g. `1.196`) — tracks the latest patch within that line.
- **`major.minor.patch` pin** (an exact pin, e.g. `1.196.3`) — **freezes updates entirely**. `uip update` skips the update engine altogether, emits a `Success` envelope with every section marked as not run, and prints a warning to stderr explaining the pin and how to clear it (`uip config set version <major.minor>` to track a line, or `uip config clear version` to follow latest again).

## Examples

```bash
# Update everything installed, including the CLI itself
uip update
```

```bash
# Update tools and skills but only report on a newer CLI, don't self-update
uip update --no-self
```

```bash
# Preview without applying
uip update --dry-run
```

```bash
# Tools only, on the preview channel
uip update --tools-only --channel preview
```

## Data shape (--output json)

```json
{
  "Code": "UpdateResult",
  "Data": {
    "DryRun": false,
    "Channel": "stable",
    "Cli": {
      "current": "1.4.2",
      "available": "1.4.3",
      "action": "updated",
      "reason": null
    },
    "Tools": [
      { "name": "orchestrator-tool", "status": "updated", "from": "1.4.2", "to": "1.4.3" }
    ],
    "Skills": { "Sections": [] },
    "Errors": [],
    "HasFailures": false
  }
}
```

`Cli.action` is one of `updated`, `notice` (a newer CLI exists but wasn't applied — because of `--no-self`, or because auto-update declined for another reason), `none` (already current), or `skipped` (an exact `core.version` pin froze the run — see above). `Tools`/`Skills` are `null`, not an empty array, when that section was skipped entirely (`--tools-only`, `--skills-only`, `--no-tools`, `--no-skills`, or the frozen-pin short-circuit).

A run with `Cli.action: "notice"` also logs the manual upgrade command to stderr (`npm install -g @uipath/cli@<version>`, or a tool-reported equivalent).

## Exit codes

`uip update` follows the [standard contract](./exit-codes.md), with one addition: **a partial failure still returns a `Success` envelope** (the orchestrator doesn't stop at the first failing subsystem — it runs every section and reports each outcome under `Data.Errors`), but the process still **exits non-zero** when `Data.HasFailures` is `true`. Check `HasFailures`, not just `Result`, if a script needs to detect a partial update failure.

## Related

- [uip config](./uip-config.md) — `version` and `updateChannel` govern what `uip update` targets.
- [uip tools](./uip-tools.md) — `uip tools update` is the tools-only equivalent with its own dedicated flags.
- [uip skills](./uip-skills.md) — skills installation and per-agent update behavior.

## See also

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