# Install OSMates

Install the app, start its background service, and add the `osmates` command to Terminal.

Requires macOS 27 or later on a Mac with Apple silicon.

## Download OSMates

During the beta, download `OSMates-<version>.dmg` through your [beta invite](https://osmates.com/docs/beta#accept-the-invite).

## Open OSMates the first time

1. Open the disk image. In its window, drag **OSMates** onto **Applications**.
2. Open OSMates from **Applications**. If you see a warning about an app downloaded from the internet, click **Open**.
3. In the welcome window, click **Create Debian Machine**, or **Choose Another System** to open [New Machine](https://osmates.com/docs/create-machine).

The Debian machine has no desktop, and you sign in from Terminal with your keys from `~/.ssh`. To open the welcome window again, choose **Help > Welcome to OSMates**.

## Start the background service

The background service keeps machines running after you quit OSMates. If the welcome window shows **Register**, click it. If it shows **Open Login Items Settings**:

1. Click **Open Login Items Settings**.
2. Turn on **OSMates**, then return to OSMates.

To check the service later, choose **OSMates > Settings**, then click **General**.

## Add the command line

1. Choose **OSMates > Settings**, then click **Command Line**.
2. Turn on **osmates in Terminal** and **Add ~/.local/bin to the PATH**.
3. Open a new Terminal window and run `osmates status`. It shows whether the background service is running.

The second switch adds two lines to your shell's startup file, after a backup:

| Shell | File |
|---|---|
| zsh | `~/.zprofile` |
| bash | The first of `~/.bash_profile`, `~/.bash_login`, and `~/.profile` that exists, or a new `~/.bash_profile` |
| fish | `~/.config/fish/conf.d/osmates.fish` |

With another shell, `ZDOTDIR`, or `XDG_CONFIG_HOME`, add `~/.local/bin` to your PATH yourself.

To install the command for every account on this Mac instead:

```sh
sudo mkdir -p /usr/local/bin && sudo ln -sfn /Applications/OSMates.app/Contents/Helpers/osmates /usr/local/bin/osmates
```

## Connect your beta account

During the beta, updates come only to a Mac connected with your Discord account. See [Join the beta](https://osmates.com/docs/beta#connect-your-beta-account).

## Uninstall OSMates

1. Shut down every machine.
2. For each AI agent you connected, run `osmates mcp uninstall <client>`, with a name from `osmates mcp clients`.
3. If you set up ssh by name, run `osmates ssh-config uninstall`.
4. Choose **OSMates > Settings**, click **Command Line**, then turn off both switches.
5. If you signed in, [sign out](https://osmates.com/docs/account#sign-out) and remove this Mac to free its place.
6. Click **General**, then click **Unregister**.
7. Quit OSMates and move it to the Trash.

Your machines stay in `~/Library/Application Support/OSMates`, and downloaded images in `~/Library/Caches/OSMates` or the folder you chose. To delete both folders, which you can't undo:

```sh
chflags -R nouchg,nouappnd ~/Library/Application\ Support/OSMates/Audit
rm -rf ~/Library/Application\ Support/OSMates ~/Library/Caches/OSMates
```

## If OSMates says to move it

OSMates can't run the background service or install updates from the disk image, or from a temporary copy macOS made.

1. Click **Show in Finder**. OSMates quits, and Finder shows it.
2. Drag **OSMates** to the **Applications** folder.
3. Open OSMates from **Applications**.

Move it with Finder. A copy made in Terminal shows the alert again.
