# Add a repository

> Choose where your machine installs charts from: add a charts repository, fetch its index, list what you have, and remove one without losing anything.

Your machine installs charts from its own folders and from the repositories you add. You add one by name and address, fetch its index when you want, and remove it when you no longer trust it. A repository you have not added is never contacted.

**Before you begin (3 minutes)**

- The `alta` command: [install the CLI](https://docs.os.altasystem.ai/start/install).
- The address of the repository's `index.json`, from its maintainers. It must be `https://`, with no user name or password in it.

### Add it

The name is yours: lower-case letters, digits and dashes. `--key` is the repository's public key, a file its maintainers publish (here saved as `community.pub`): every index is checked against it. Adding writes one line to the list of this machine's repositories and downloads nothing.

```sh [Terminal]
alta repo add community https://charts.example.org/index.json --key community.pub
```

```text [Output]
added community (https://charts.example.org/index.json); nothing was downloaded
next: alta repo update community
```

### See what this machine uses

```sh [Terminal]
alta repo list
```

```text [Output]
community        - charts  https://charts.example.org/index.json  never updated (alta repo update)
```

### Fetch the indexes

`alta repo update` fetches the index of every repository, or of the one you name. It sends nothing about you or your machine: one request per index, with only `alta-cli/<version>` as its user agent, and it asks for the index again only if it changed.

```sh [Terminal]
alta repo update
```

```text [Output]
community: 3 charts (signature verified with the key of community)
```

```sh [Terminal]
alta repo list
```

```text [Output]
community        3 charts  https://charts.example.org/index.json  updated 2026-12-05 09:00
```

### Remove it

Removing forgets the address and moves the cached index to the archive: nothing is deleted, and the charts you already pulled from it stay where they are.

```sh [Terminal]
alta repo remove community
```

```text [Output]
removed community; its cached index was moved to ~/.local/share/archive/2026-12-05/repo-community.<time> Charts already pulled from it stay where they are.
```

## A repository without a signature

`alta repo update` refuses an index that has no signature next to it, and a signed index from a repository added without `--key`: nothing could check that signature. For a repository you run yourself and trust, add it with `--insecure-unsigned`: its index is accepted, and every use prints a warning. Never use it for an address someone sent you.

## Where things are kept

| What | Where |
|---|---|
| The repositories you added | `~/.config/alta/repos.json`, readable by you only |
| Their indexes, as last fetched | `~/.cache/alta/repos/<name>/` |
| The charts you pulled | `~/.local/share/alta/charts/<name>/<chart>/` |

**Next:**

- [Find and install a chart](https://docs.os.altasystem.ai/marketplace/find-and-install)
- [Run a charts repository](https://docs.os.altasystem.ai/marketplace/run-a-repository)
- [alta repo](https://docs.os.altasystem.ai/reference/cli/repo)
