# uip or libraries

> Syntax and options for `uip or libraries`, which manages reusable `.nupkg` activity packages in the tenant feed.

Manage Orchestrator **libraries** — reusable `.nupkg` packages containing shared activities and logic. Libraries are **tenant-scoped**; no `--folder-*` flags apply. All subcommands accept `--feed-id <feed-id>` to target a specific feed. Libraries and process packages use **separate feeds**: a project packed with `--output-type Library` is uploaded here, one packed as `Process` or `Tests` with [`uip or packages`](./uip-or-packages.md).

For the cross-resource conventions (auth, key types, output envelope), see the [`uip or` overview](./uip-or.md).

## Synopsis

```
uip or libraries list      [--feed-id <feed-id>] [-s <search>] [--sort-by <field>] [--all-fields] [-l <n>] [--offset <n>]
uip or libraries get       <key> [--feed-id <feed-id>] [--all-fields]
uip or libraries delete    <key> [--feed-id <feed-id>] --yes
uip or libraries download  <key> -d <local-file> [--feed-id <feed-id>]
uip or libraries versions  <package-id> [--feed-id <feed-id>] [--sort-by <field>] [-l <n>] [--offset <n>] [--all-fields]
uip or libraries upload    [file] [--file <path>] [--feed-id <feed-id>]
```

## list

List libraries in the tenant feed. Filter: `-s, --search <term>`. `--sort-by <field>` sorts results (default `Id desc`). Returns `Key`, `Title`, `Version`, `Authors`, `Published`, `IsLatestVersion`, `IsPrerelease`, and `ProjectType` unless `--all-fields` is set.

```bash
uip or libraries list --search invoice
```

## get

Get library details by `<key>`. Key format is `PackageId:Version` (e.g. `MyLib:1.0.0`). A key without a `:` separator fails before any API call. `--all-fields` returns the full DTO.

## delete

Delete a library version by `<key>` (format `PackageId:Version`). Requires `-y, --yes` — the CLI never prompts for destructive operations. A read-only feed, such as the shared UiPath-Official feed, refuses the delete; target the feed that holds the package with `--feed-id`.

```bash
uip or libraries delete MyLib:1.0.0 --yes
```

## download

Download a library `.nupkg` to disk. Requires `-d, --destination <file>`. Missing parent directories are created, and an existing file at this path is overwritten.

```bash
uip or libraries download MyLib:1.0.0 --destination ./MyLib.1.0.0.nupkg
```

## versions

List every version of a package by its **Package ID** (the `Title` field from `list`, not the `Key`). An unknown package ID fails with `Library not found`. Paginated via `-l, --limit` / `--offset`; `--sort-by <field>` sorts results (default `Id desc`); `--all-fields` returns the full API response.

```bash
uip or libraries versions MyLib
```

## upload

Upload a library `.nupkg` package to the tenant libraries feed, the feed for projects packed with `--output-type Library`. Process packages go to [`uip or packages upload`](./uip-or-packages.md#uip-or-packages-upload) instead. Pass the path to the library package either as the positional `[file]` argument or with `--file <path>`. Omitting both fails with `ErrorCode: "invalid_argument"`.

To publish to a writable library feed other than the tenant feed, pass `--feed-id`. List feeds with [`uip or feeds list`](./uip-or-feeds.md).

```bash
uip or libraries upload ./MyLib.1.0.0.nupkg
```

```json
{
  "Code": "LibraryUploaded",
  "Data": { "Status": "Package uploaded successfully" }
}
```

## Exit codes

See [Exit codes](./exit-codes.md) for the shared contract. `delete` exits `1` if `-y, --yes` is omitted.

## Related commands

- [`uip or feeds`](./uip-or-feeds.md) — list available feeds and their IDs.
- [`uip or packages`](./uip-or-packages.md) — the processes feed, for `Process` and `Tests` packages.

## See also

- [`uip or` overview](./uip-or.md) — shared conventions for every `uip or` verb.
- [How-to: manage Orchestrator assets and queues](./howto-manage-resources.md) — multi-resource workflows.
