# Dependencies

> The charts a chart builds on, with version ranges; one version installed at a time; one owner per service.

`requires.charts` lists the charts that must be installed first, each with a version range.

```json [chart.json: requires]
{ "charts": [{ "id": "alta-os", "version": ">=0.1.0 <1.0.0" }] }
```

- **Ranges** are semver ranges: `>=0.1.0 <1.0.0`, `^0.5.0`. A missing or too old chart stops the install before anything is written; `alta install` says which one to install first.
- **One version at a time.** A machine holds one release of a chart. `alta upgrade` makes a new revision of it; the previous one is archived.
- **No cycles.** `alta lint --repo` refuses a chart that requires itself through others.
- **Optional** requirements (`"optional": true`) are offered, never forced.

## One owner per service

A service is a long-running program on a port (a local model server, for example). Exactly one chart **owns** it, declares it in `services`, and may restart it. Another chart that needs it lists it in `uses` and may only read its proof. Two programs fighting for one port is how a machine breaks silently: the rule makes the owner explicit.

```json [alta-os chart.json: services]
[
  {
    "id": "ollama",
    "label": { "macos": "ai.altasystem.ollama" },
    "port": 11434
  }
]
```

**Next:**

- [Trust](https://docs.altasystem.ai/charts/concepts/trust)
- [alta upgrade](https://docs.altasystem.ai/reference/cli/upgrade)
