---
title: "Install"
description: "Install Regent with Homebrew, then let it set up Apple container (and Tart for macOS)."
---

> Documentation Index
> Fetch the complete documentation index at: https://regent.c4n.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Install

You need an Apple silicon Mac and [Homebrew](https://brew.sh).

## 1. Install Regent

```sh
brew tap frkcn/tap
brew trust --formula frkcn/tap/regent
brew install frkcn/tap/regent
```

Homebrew loads formulae from taps other than its own only once you trust them; `brew trust`
trusts this one formula, not the whole tap. `brew upgrade` updates Regent like anything else.

Or build it from source with Go:

```sh
git clone https://github.com/frkcn/regent
cd regent && make build      # bin/regent
```

## 2. Set up Linux environments

```sh
regent setup
```

This installs Apple's `container` CLI and starts its services, which download a Linux
kernel the first time. It asks before each step; `--yes` doesn't ask. `regent create` does
the same the first time you run it, so this step is optional.

## 3. Set up macOS environments (optional)

```sh
regent setup macos            # Tart and the macOS image (about 30 GB)
regent setup macos --xcode    # the image with Xcode and the simulators (about 70 GB)
```

You don't need [Rex](https://www.superlogical.com/rex) on this Mac for either kind. With
it, each environment is also a Rex host; see [Integrations](https://regent.c4n.dev/docs/guides/integrations/).

## 4. Check

```sh
regent doctor
```

`doctor` lists what's installed, what's missing and how to fix it. Missing requirements make
it fail; optional things (Rex, herdr, Tailscale) are warnings.

## Updating

```sh
regent update                 # brew upgrade frkcn/tap/regent, or plain brew upgrade
```

Regent looks for a new release once a day when you use it in a terminal, and says when one is
out; `REGENT_NO_UPDATE_CHECK=1` turns that off. The first run of a new version brings what
Regent set up on your Mac up to date by itself: ssh entries, its background services, the Rex
actions and the agents' skill.

Environments keep running the image they were built from. `regent ls` and `regent doctor` say
which ones an older Regent built; `regent reset NAME` moves one to the new image (on Linux the
home stays; macOS needs `--wipe`). `regent reset NAME --refresh` also rebuilds the image with the
latest packages and agents.

## Shell completion

```sh
regent completion install     # zsh, fish, carapace: environment names, snapshots, flags
```

Source: https://regent.c4n.dev/docs/getting-started/install/index.mdx
