# uip ont

> Syntax and options for `uip ont`, which authors, checks, and validates UiPath ontologies in a local solution and reads deployed ones.

`uip ont` authors, checks, and reads UiPath ontologies. An ontology is an `ontology` resource in a local solution. It maps Data Fabric entities of the same solution to a schema, and its artifact files are kept as one zip next to the solution. Nothing exists on a tenant until the solution is packed, published, and deployed.

Install it with `uip tools install ont`, or invoke `uip ont …` and let auto-install run. Refer to [Tools (plugins)](./concepts-tools.md) for the install model. `ont` is the command prefix; the underlying package is `@uipath/ontology-tool`.

Most commands work on the solution on disk and need no login. Three commands call the Ontology service and need [`uip login`](./uip-login.md): `validate`, and `get` and `list` with `--folder-key` or `--folder-path`.

## Synopsis

```
uip ont create <name> --local [--entity <name>]... [--display-name <text>] [--description <text>]
uip ont get <name> (--local | --folder-key <guid> | --folder-path <path>)
uip ont list (--local | --folder-key <guid> | --folder-path <path>) [-l <n>] [--offset <n>]
uip ont update <name> --local [--add-entity <name>]... [--remove-entity <name>]... [--display-name <text>] [--description <text>]
uip ont delete <name> --local -y
uip ont files add <name> <files...> --local [--type <type>]
uip ont files list <name> (--local | --package <zip>)
uip ont files remove <name> <files...> --local
uip ont validate [name] --local
uip ont artifacts check <file> [--type <type>] [--content <text>]
```

## Commands

| Command | Purpose |
|---|---|
| [`create`](#uip-ont-create) | Create an ontology resource in the local solution, with no artifacts yet. |
| [`get`](#uip-ont-get) | Show an ontology of the local solution, or a deployed one. |
| [`list`](#uip-ont-list) | List the ontologies of the local solution, or the ones deployed in a folder. |
| [`update`](#uip-ont-update) | Change an ontology's entities, display name, or description. |
| [`delete`](#uip-ont-delete) | Delete an ontology and its attached zip. |
| [`files add`](#uip-ont-files-add) | Check artifact files and attach them to an ontology. |
| [`files list`](#uip-ont-files-list) | List the artifacts of a local ontology, or of one in a packed solution. |
| [`files remove`](#uip-ont-files-remove) | Remove artifact files from an ontology. |
| [`validate`](#uip-ont-validate) | Run the convention and cross-file rules, then the Ontology service's check. |
| [`artifacts check`](#uip-ont-artifacts-check) | Check one artifact file against the convention rules, offline. |

### `--local` and `--solution-folder`

- `--local` is required on every command that reads or changes the solution on disk. Without it, the command fails with `Code: LocalFlagRequired`.
- `get` and `list` take one of `--local`, `--folder-key`, or `--folder-path`. Two of them together fail with `LocalAndFolderConflict` or `FolderKeyAndPathConflict`.
- `--solution-folder <path>` names the folder that holds the solution's `.uipx` file. It defaults to the current directory. A folder without a `.uipx` file fails with `NoParentSolution`.

### Artifact types

An ontology holds five artifact types. The file extension decides the type.

| Type | Extensions | Count |
|---|---|---|
| `schema` | `.ofn` | Exactly one. |
| `constraints` | `.ttl` | Optional, any number. |
| `mapping` | `.yarrrml.yml`, `.yml`, `.yaml` | Exactly one. |
| `summary` | `.json` | At most one. |
| `context` | `.json` | At most one. |

A `.json` file is ambiguous. End its name with `-summary` or `-context` before the extension, for example `sales-summary.json`, or pass `--type`.

Artifact names use letters, digits, `.`, `_`, and `-`, start with a letter or a digit, and end in an extension. `ontology.json` is reserved for the zip's manifest.

## uip ont create

Create an ontology resource in the local solution. The ontology has no artifacts until [`files add`](#uip-ont-files-add) attaches them.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<name>` | yes | Ontology name, unique in the solution, ignoring case. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | Required. Act on the ontologies authored in the local solution. |
| — | `--entity` | name | — | Local entity the ontology maps. Repeatable. The entity must be an entity resource of the solution. Refer to [Local entities](./uip-df-entities.md#local-entities---local). |
| — | `--display-name` | text | the name | Display name. |
| — | `--description` | text | — | Description. |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |

### Example

```bash
uip ont create Sales --local --entity SalesOrder --entity Customer
```

### Data shape (--output json)

```json
{
  "Code": "OntologyCreated",
  "Data": {
    "Name": "Sales",
    "DisplayName": "Sales",
    "Key": "11111111-2222-3333-4444-555555555555",
    "Entities": ["SalesOrder", "Customer"],
    "Artifacts": []
  }
}
```

## uip ont get

Show one ontology. With `--local`, the command reads the solution on disk. With `--folder-key` or `--folder-path`, it reads the deployed ontology from the Ontology service. The deployed read changes nothing.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<name>` | yes | Ontology name. For a deployed ontology, the name it was deployed under. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | Read the ontology authored in the local solution. |
| — | `--folder-key` | GUID | — | Key of the deployment folder. Reads the deployed ontology. Needs `uip login`. |
| — | `--folder-path` | path | — | Path of the deployment folder, for example `Shared/Finance`. Reads the deployed ontology. Needs `uip login`. |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |

### Examples

```bash
# An ontology authored in the local solution
uip ont get Sales --local

# A deployed ontology, by folder key or by folder path
uip ont get Sales --folder-key aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
uip ont get Sales --folder-path "Shared/Finance"
```

### Data shape (--output json)

A local ontology returns the same `Data` as [`create`](#uip-ont-create), with one entry per attached artifact under `Artifacts`. A deployed ontology returns:

```json
{
  "Code": "OntologyDetails",
  "Data": {
    "Id": "99999999-8888-7777-6666-555555555555",
    "Name": "Sales",
    "DisplayName": "Sales",
    "State": "DEPLOYED",
    "FolderKey": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  }
}
```

`FolderKey` is the key the service returned, also when the folder was named by `--folder-path`.

## uip ont list

List the ontologies of the local solution, or the ontologies deployed in a folder.

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | List the ontologies authored in the local solution. |
| — | `--folder-key` | GUID | — | Key of the deployment folder. Lists the deployed ontologies. Needs `uip login`. |
| — | `--folder-path` | path | — | Path of the deployment folder, for example `Shared/Finance`. Lists the deployed ontologies. Needs `uip login`. |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |
| `-l` | `--limit` | number | all | Return at most this many rows. |
| — | `--offset` | number | `0` | Skip this many rows before the first one returned. |

### Examples

```bash
uip ont list --local
uip ont list --folder-path "Shared/Finance" --limit 20
```

### Data shape (--output json)

`Code` is `OntologyList`. `Data` is an array of rows in the shape [`get`](#uip-ont-get) returns: local rows for `--local`, deployed rows for a folder. An empty list returns `Data: []`. With `--limit` or `--offset`, the response also carries `Pagination`.

## uip ont update

Change the entities, the display name, or the description of a local ontology.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<name>` | yes | Ontology name. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | Required. Act on the ontologies authored in the local solution. |
| — | `--add-entity` | name | — | Local entity to add. Repeatable. |
| — | `--remove-entity` | name | — | Entity to remove, by name. Repeatable. |
| — | `--display-name` | text | — | New display name. |
| — | `--description` | text | — | New description. |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |

### Example

```bash
uip ont update Sales --local --add-entity Invoice --remove-entity Customer \
    --display-name "Sales ontology"
```

### Data shape (--output json)

`Code` is `OntologyUpdated`. `Data` has the same shape as [`create`](#uip-ont-create), with the new values.

## uip ont delete

Delete a local ontology and its attached zip.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<name>` | yes | Ontology name. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | Required. Act on the ontologies authored in the local solution. |
| `-y` | `--yes` | flag | — | Required. Confirm the deletion. The command never prompts. Without it, the command fails with `Code: ConfirmationRequired` and `ErrorCode: confirmation_required`. |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |

### Example

```bash
uip ont delete Sales --local --yes
```

### Data shape (--output json)

```json
{
  "Code": "OntologyDeleted",
  "Data": {
    "Name": "Sales",
    "Key": "11111111-2222-3333-4444-555555555555"
  }
}
```

## uip ont files add

Check artifact files and attach them to a local ontology. The command checks every file with the [per-file rules](#per-file-rules) first. When one file fails, nothing is attached. A file added under a name the ontology already holds replaces that artifact.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<name>` | yes | Ontology name. |
| `<files...>` | yes | One or more artifact files to attach. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | Required. Act on the ontologies authored in the local solution. |
| — | `--type` | type | from the extension | Artifact type, for a file whose extension does not decide it. Refer to [Artifact types](#artifact-types). |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |

### Example

```bash
uip ont files add Sales ./sales.ofn ./sales-mapping.yarrrml.yml \
    ./sales-summary.json ./sales-context.json --local
```

### Data shape (--output json)

```json
{
  "Code": "OntologyFilesAdded",
  "Data": {
    "Files": [
      { "FileName": "sales.ofn", "Type": "schema", "Status": "Added" },
      { "FileName": "sales-mapping.yarrrml.yml", "Type": "mapping", "Status": "Added" }
    ],
    "Violations": []
  }
}
```

`Status` is `Added` or `Replaced`. `Violations` lists the `WARNING` violations, which do not stop the command. When a file has an `ERROR` violation, the command fails with `Code: ArtifactCheckFailed` and lists the violations under `Data.violations`.

## uip ont files list

List the artifacts of a local ontology, or of an ontology in a packed solution.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<name>` | yes | Ontology name. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | Read the ontology in the local solution. |
| — | `--package` | zip | — | Read the ontology in a packed solution, the `.zip` that [`uip solution pack`](./uip-solution-pack.md) writes. Cannot be combined with `--local`. |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |

### Examples

```bash
uip ont files list Sales --local
uip ont files list Sales --package ./out/SalesSolution_1.0.0.zip
```

### Data shape (--output json)

```json
{
  "Code": "OntologyFilesList",
  "Data": {
    "Name": "Sales",
    "StoredName": "Sales.zip",
    "Artifacts": [
      {
        "FileName": "sales.ofn",
        "Type": "schema",
        "MediaType": "text/owl-functional",
        "SizeBytes": 1204,
        "Checksum": "<sha-256-checksum>"
      }
    ]
  }
}
```

## uip ont files remove

Remove artifact files from a local ontology's zip.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<name>` | yes | Ontology name. |
| `<files...>` | yes | One or more artifact file names to remove. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | Required. Act on the ontologies authored in the local solution. |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |

### Example

```bash
uip ont files remove Sales sales-constraints.ttl --local
```

### Data shape (--output json)

`Code` is `OntologyFilesRemoved`. `Data.Removed` lists the removed file names, and `Data.Artifacts` lists the artifacts that remain.

## uip ont validate

Validate the ontologies of the local solution. The command runs the [per-file rules](#per-file-rules) and the [cross-file rules](#cross-file-rules) against the current local entities. For each ontology without an `ERROR` violation, it then sends the artifacts to the Ontology service for a syntax check. The service check stores nothing on the tenant.

The service check needs `uip login`. The local rules run first, so their results are in `Data` also when the service check cannot run.

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `[name]` | no | Validate only this ontology. Omitted, every ontology in the solution is validated. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--local` | flag | — | Required. Act on the ontologies authored in the local solution. |
| — | `--solution-folder` | path | current directory | Solution folder that holds the `.uipx` file. |

### Examples

```bash
# Validate every ontology in the solution
uip ont validate --local

# Validate one ontology
uip ont validate Sales --local
```

### Data shape (--output json)

```json
{
  "Code": "OntologyValidated",
  "Data": [
    {
      "Name": "Sales",
      "Valid": true,
      "ServiceValidation": "Done",
      "Violations": []
    }
  ]
}
```

`ServiceValidation` is `Done` when the service checked the ontology, and `Skipped` when a local `ERROR` violation stopped the check.

### Failures

| `Code` | `ErrorCode` | Exit | Cause |
|---|---|---|---|
| `ValidationFailed` | `invalid_argument` | `1` | An ontology has an `ERROR` violation. |
| `ServiceValidationUnavailable` | `authentication_required` | `2` | No login. Run `uip login`, then validate again. |
| `ServiceValidationUnavailable` | `not_supported` | `1` | The connected environment does not offer the Ontology service. |
| `ServiceValidationFailed` | varies | `1` | The Ontology service could not validate an artifact. |

On each of these failures, `Data` still lists one entry per ontology. The keys of a failure's `Data` are lower case: `name`, `valid`, `serviceValidation`, and `violations`.

## uip ont artifacts check

Check one artifact file against the [per-file rules](#per-file-rules). The command runs offline: it makes no network call and needs no solution. The file name decides the artifact type the same way as in [`files add`](#uip-ont-files-add), so the file is checked as the type it is attached as.

The command checks UiPath conventions only. The Ontology service checks the syntax of the file during [`validate`](#uip-ont-validate).

### Arguments

| Name | Required | Purpose |
|---|---|---|
| `<file>` | yes | Artifact file to check. |

### Options

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| — | `--type` | `schema` \| `constraints` \| `mapping` \| `summary` \| `context` | from the extension | Artifact type, for a `.json` file whose name ends in neither `-summary` nor `-context`. The type must be one the extension allows. |
| — | `--content` | text | — | Check this text instead of reading the file. `<file>` still names the artifact. |

### Examples

```bash
uip ont artifacts check ./sales.ofn
uip ont artifacts check ./orders.json --type context
```

### Data shape (--output json)

```json
{
  "Code": "ArtifactChecked",
  "Data": {
    "Type": "schema",
    "MediaType": "text/owl-functional",
    "RuleSetId": "ofn",
    "PassedRules": 5,
    "FailedRules": 0,
    "Violations": []
  }
}
```

When an `ERROR` rule fires, the command exits `1` with `Result: Failure`, `Code: ArtifactChecked`, and `ErrorCode: invalid_argument`. `Data` carries the same fields with lower-case keys, and `Data.violations` lists every violation.

## Violations and rules

Each violation has these fields:

| Field | Meaning |
|---|---|
| `rule` | Rule ID, for example `OFN-002`. |
| `severity` | `ERROR` or `WARNING`. An `ERROR` fails `validate`, `files add`, and `artifacts check`. A `WARNING` does not. |
| `message` | What the rule found. |
| `suggestion` | How to fix it, when the rule has a suggestion. |
| `file` | The artifact the violation is in, when it belongs to one file. |
| `source` | `local` for a rule the CLI runs, `service` for a finding of the Ontology service. |

### Per-file rules

`files add`, `validate`, and `artifacts check` run these rules on each file.

Schema (`.ofn`):

| Rule | Severity | Checks |
|---|---|---|
| `OFN-001` | ERROR | The ontology IRI starts with `https://ontology.uipath.com/`. |
| `OFN-002` | ERROR | Data properties are named `ClassName.fieldName`. |
| `OFN-004` | WARNING | Every class has an `rdfs:label`. |
| `OFN-005` | WARNING | Every object property has an `rdfs:label`. |
| `OFN-009` | ERROR | No data property is named `has{Prop}`. |

Constraints (`.ttl`):

| Rule | Severity | Checks |
|---|---|---|
| `SHC-002` | ERROR | Every `sh:targetClass` is on an `sh:NodeShape`. |
| `SHC-003` | ERROR | Every `sh:NodeShape` has an `sh:targetClass`. |
| `SHC-004` | WARNING | Every shape has an `rdfs:label`. |
| `SHC-006` | WARNING | Property blocks have `sh:maxCount`. |
| `SHC-007` | WARNING | Property blocks have `sh:name`. |
| `SHC-008` | WARNING | At least one property has `sh:minCount 1`. |
| `SHC-009` | WARNING | Decimal properties have `sh:minInclusive`. |
| `SHC-010` | WARNING | Relationship paths use `sh:class`. |
| `SHC-011` | WARNING | The file declares at least one SHACL shape. |

Mapping (`.yarrrml.yml`, `.yml`, `.yaml`):

| Rule | Severity | Checks |
|---|---|---|
| `MAP-002` | ERROR | Mappings read `access: datafabric` table sources. |
| `MAP-004` | ERROR | The subject template is `prefix:ClassName/$(field)`. |
| `MAP-005` | ERROR | Each mapping asserts an `a <Class>` type. |
| `MAP-006` | WARNING | Relationships are inline `~iri` values. |
| `MAP-012` | ERROR | The mapping holds no Data Fabric IDs (`entityId`, `folderId`). It names each entity by `table:` only. |

Context and summary (`.json`):

| Rule | Severity | Checks |
|---|---|---|
| `CTX-001` | ERROR | The context is JSON with a root `@context`. |
| `CTX-002` | ERROR | `@base` is declared. |
| `CTX-003` | ERROR | The `xsd` prefix is declared. |
| `CTX-005` | ERROR | Each term has `@id` and `@type`. |
| `CTX-006` | WARNING | Relation terms use `"@type": "@id"`. |
| `CTX-007` | WARNING | `@id` uses the ontology prefix. |
| `SUM-001` | ERROR | The summary is JSON. |
| `SUM-002` | WARNING | The top level of the summary is an object. |
| `SUM-003` | ERROR | The summary has no root `@context`. A file with one is a context file. |

### Cross-file rules

`validate` runs these rules on the whole ontology, against the current local entities. `files add` also runs `ZIP-001`.

| Rule | Severity | Checks |
|---|---|---|
| `ZIP-001` | ERROR | The zip fits the service limits: each artifact at most 10 MiB, the zip at most 50 MiB and 64 entries. |
| `XF-001` | ERROR | One schema, one mapping, any number of constraints, at most one summary, and at most one context. |
| `XF-002` | ERROR, or WARNING for a display name or description that differs | The zip's manifest matches the artifacts and the resource. |
| `XF-003` | ERROR | IRIs use `https://ontology.uipath.com/<name>`. |
| `XF-004` | ERROR | The `shape:` prefix is `https://ontology.uipath.com/shapes#`. |
| `XF-005` | ERROR | The schema stays in the OWL 2 QL profile. |
| `XF-006` | ERROR | Every `ont:` term in the mapping is declared in the schema. |
| `XF-007` | ERROR | Every term has `rdfs:label` and `rdfs:comment`. |
| `XF-008` | ERROR | Constraints name declared schema terms. |
| `XF-009` | ERROR | Every class is a property domain and is instantiated in the mapping. |
| `XF-010` | ERROR, or WARNING for a class without a shape | Every property is mapped. When the ontology has a constraints file, every class has an `sh:targetClass` shape. |
| `XF-012` | ERROR, or WARNING for an entity that no mapping reads | Every mapping reads a `table:` that is a local entity of the ontology. |
| `XF-013` | ERROR | Every `$(column)` is a field of its entity. Names are case-sensitive. |
| `XF-014` | ERROR | Every join is a declared object property. |
| `XF-015` | ERROR | Every object property between mapped classes has a join. |
| `XF-017` | ERROR | The ontology's entities form no relationship cycle. A self-reference is not a cycle. |
| `XF-019` | ERROR | Each `sh:in` on a property mapped from a choice-set field names only values of that local choice set. |

### Service rule

| Rule | Severity | Checks |
|---|---|---|
| `SVC-001` | ERROR or WARNING, as the service reports it | The Ontology service's syntax check of an artifact. `file` names the artifact. |

## Error codes

A failure carries its reason in `Code`, and the CLI-wide classification in `ErrorCode`. `ErrorCode` is `invalid_argument` unless the table says otherwise.

| `Code` | `ErrorCode` | Cause |
|---|---|---|
| `LocalFlagRequired` | `invalid_argument` | `--local` is missing. On `get` and `list`, none of `--local`, `--folder-key`, and `--folder-path` was passed. |
| `LocalAndFolderConflict` | `invalid_argument` | `--local` was combined with `--folder-key` or `--folder-path`. |
| `FolderKeyAndPathConflict` | `invalid_argument` | `--folder-key` and `--folder-path` were combined. |
| `InvalidFolderKey` | `invalid_argument` | `--folder-key` is not a GUID. |
| `InvalidFolderPath` | `invalid_argument` | `--folder-path` is empty. |
| `InvalidArguments` | `invalid_argument` | `files list` got both `--local` and `--package`. |
| `NoParentSolution` | `not_found` | The solution folder holds no `.uipx` file. |
| `OntologyNotFound` | `not_found` | No ontology has that name, in the solution or in the folder. |
| `OntologyNameTaken` | `invalid_argument` | The name is in use in the solution, ignoring case. |
| `InvalidOntologyName` | `invalid_argument` | The name is not a valid resource name. |
| `EntityNotFound` | `not_found` | `--entity`, `--add-entity`, or `--remove-entity` names an entity that is not a local entity resource. |
| `ConfirmationRequired` | `confirmation_required` | `delete` ran without `--yes`. |
| `ArtifactNotFound` | `not_found` | A file to attach cannot be read, or a file to remove is not in the ontology. |
| `InvalidArtifactFileName` | `invalid_argument` | The file name breaks the naming rule, or is `ontology.json`. |
| `ArtifactTypeUnresolved` | `invalid_argument` | The extension does not decide the type, or `--type` does not fit the extension. |
| `ArtifactTypeAlreadyPresent` | `invalid_argument` | A second file of a type that takes one file. Add the file under the existing name to replace it, or remove the old file first. |
| `ArtifactTypeNotSupported` | `not_supported` | The artifact type cannot be authored with the CLI. |
| `ArtifactCheckFailed` | `invalid_argument` | `files add` found `ERROR` violations. Nothing is attached. |
| `ResourceFileMissing` | `not_found` | The ontology's zip is missing from the solution, or the packed solution carries none. |
| `InvalidResourceArchive` | `invalid_argument` | The attached zip cannot be read. |
| `PackageNotFound` | `not_found` | `--package` points at no readable packed solution. |
| `OntologyNotInPackage` | `not_found` | The packed solution has no ontology of that name. |

Where the connected environment does not offer the Ontology service, `get` and `list` with `--folder-key` or `--folder-path` fail with `ErrorCode: not_supported` and `Retry: RetryWillNotFix`. `Code` is `OntologyDetails` or `OntologyList`.

## Author and deploy an ontology

The ontology's entities are local Data Fabric entities of the same solution. The solution carries the ontology to the tenant:

```bash
uip solution init SalesSolution && cd SalesSolution
uip df entities create SalesOrder --local --file ./SalesOrder.json
uip df entities create Customer --local --file ./Customer.json
uip ont create Sales --local --entity SalesOrder --entity Customer
uip ont files add Sales ./sales.ofn ./sales-mapping.yarrrml.yml \
    ./sales-summary.json ./sales-context.json --local
uip ont validate --local
uip solution pack . ./out
uip ont files list Sales --package ./out/SalesSolution_1.0.0.zip
```

[`uip solution publish`](./uip-solution-publish.md) and [`uip solution deploy run`](./uip-solution-deploy.md) then publish and deploy the package. `uip ont get <name> --folder-path <path>` confirms the deployed ontology.

## Related

- [`uip df entities`](./uip-df-entities.md) — author the local entities an ontology maps.
- [`uip df choice-sets`](./uip-df-choice-sets.md) — author the local choice sets that rule `XF-019` checks.
- [`uip solution pack`](./uip-solution-pack.md) — pack the solution that carries the ontology.

## See also

- [Tools (plugins)](./concepts-tools.md)
- [Global options](./global-options.md)
- [Exit codes](./exit-codes.md)
