10 min

# Add the ontology files

A git-managed project needs one complete ontology tree in the repository. Usually, you pull the ontology Cassis already created and commit it.

## If the project already has an ontology

1.  Install the [Cassis CLI](/build/cli/) and set `CASSIS_API_KEY`.
    
2.  From the repository checkout, pull the current ontology:
    
    ```bash
    cassis ontology pull --project <project-id>
    ```
    
    This creates the `cassis/` directory, including `project.yml`, the ontology files, and the generated `AGENTS.md` modeling guide. `project.yml` binds later commands to the project.
    
3.  Validate the files:
    
    ```bash
    cassis ontology fmt
    cassis ontology check
    ```
    
4.  Review the diff, then commit the complete `cassis/` directory.
    

## If you are starting from scratch

Run the [context bootstrap kit](https://github.com/GetCassis/ontology-bootstrap) on the stack you already have. It drafts a first tree from what your warehouse schema, dbt models, dashboards, query history and docs already declare, keeps the evidence behind every claim, and stops at four checkpoints where your team decides: the scope, the domain grouping, the metrics, and the questions the sources could not answer. What it writes is a `cassis/` directory you review and commit like any other change.

The kit is a standalone repository, not part of the Cassis CLI. It versions on its own, we expect to fold it into the CLI as it settles, and until then the fastest way past anything it gets wrong is to [tell us](https://getcassis.com/contact/).

To hand-author instead, copy the [`cassis/` directory from the minimal example](https://github.com/GetCassis/cassis-ontology-examples/tree/main/examples/minimal) into the repository and update it for your warehouse. Either way, validate before committing:

```bash
cassis ontology fmt
cassis ontology check
```

Commit the result when it passes. The [modeling guide](/build/cli/#the-modeling-guide) explains how people and coding agents should structure the content, while the [schema reference](/reference/schema/) defines every field.

Keep only ontology files under the configured `cassis/` path. An import treats that directory as the complete ontology: adding a file adds an object, and deleting a file deletes it.

## Next

[Connect the repository](/build/git-connect/), then [protect changes with CI](/build/ci/).
