# 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> [--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` 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`). `--all-fields` returns the full DTO.

## delete

Delete a library version by `<key>`. Requires `-y, --yes` — the CLI never prompts for destructive operations.

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

## download

Download a library `.nupkg` to disk. Requires `-d, --destination <file>`.

```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`). 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` to the tenant feed. The path is positional; `--file <path>` is accepted as an alias.

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

## 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.
