Fetch the complete documentation index at https://www.nativecluster.com/llms.txt

# How do I set up private AI for my team on our Macs?

> Install NativeCluster on a Mac, start your team's cluster, in its window or, since 0.4.21, with `nativecluster setup` by an AI agent, its person there or not, choose a model, and point your tools at one local address. A few steps are a person's own: the OK to install, joining a cluster, signing in, claiming a cluster an agent started, and the Mac's confirmations.

## Who does what

NativeCluster is built so an agent can do most of the work, as the person who signed it in. Since 0.4.21 an agent can also start NativeCluster itself, its person there or not, and its person claims the cluster later. These steps are always a person's:

- **The OK to install.** An agent runs the install line, or Homebrew's, only once the person says yes. A person who asked their agent to set NativeCluster up has said it.
- **Joining a cluster**, in NativeCluster's window, with the six-digit PIN an administrator reads out. An agent never adds a Mac to a cluster.
- **Signing in.** On a Mac a person set up, `nativecluster login` opens the person's browser, and they sign in there. An agent never types, fills in or submits a sign-in.
- **Claiming a cluster an agent started**: the person signs in on the link the agent gives them, or in NativeCluster's window on that Mac.
- **The steps the Mac confirms with Touch ID or its password**: making someone an administrator, owner or Mac owner, turning the API on, and showing a main's PIN. The command waits while the Mac asks the person.

NativeCluster never downloads a model on its own. A person chooses models in its window, and since 0.4.21 an agent's `nativecluster run` downloads one that fits its Mac (step 6).

## 1. Install NativeCluster

NativeCluster needs macOS 13 Ventura or later on Apple silicon (M1 or later), and it is free. With the person's OK, run the install line (since 0.4.19):

```sh
curl -fsSL https://nativecluster.com/install.sh | sh
```

It installs NativeCluster in Applications, puts the `nativecluster` command in `~/.local/bin` and opens NativeCluster. Before it opens or copies anything, the download must have the exact SHA-256 the script names, our team's signature and Apple's notarization. It never uses sudo and never replaces a NativeCluster already there; when a check fails it changes nothing and says why: show the person that line. A terminal that was already open, an agent's included, doesn't see the command: call `~/.local/bin/nativecluster`, or open a new terminal.

Or, with the person's OK, on a Mac where `brew` is there (since 0.4.20):

```sh
brew install --cask nativecluster/tap/nativecluster
```

It installs the same release in Applications and puts `nativecluster` and `ncdev` in Homebrew's `bin`, already on the PATH; then open NativeCluster: `nativecluster open` (before 0.4.22, `open -a NativeCluster`). If NativeCluster is already in Applications, Homebrew stops with "It seems there is already an App": leave it as it is.

Or the person downloads [NativeCluster.dmg](https://updates.nativecluster.com/NativeCluster.dmg), opens it, drags NativeCluster to Applications and opens it. See [Install](https://www.nativecluster.com/docs/install.md).

> **Every model call runs on one of your group's own computers.** NativeCluster never sends a request's words, an app's data or your usage to its servers, or to any hosted AI service. See [Privacy](https://www.nativecluster.com/docs/privacy.md).

## 2. Start a cluster, or join one

### A person, in NativeCluster's window

NativeCluster's window asks the person to sign in, in their browser, and then:

- **To start a cluster:** Make a new cluster, give it a name, and choose what this Mac does: **The main** (it holds the group's shared data and its always-on work, and runs its models) or **Just using it**. The person who makes the cluster is its owner.
- **To join a cluster:** pick it, or the invitation, and type the six-digit PIN an administrator reads out. The Mac must be on the office network with the main, or joined to it by a Thunderbolt cable.

### An agent starts it (since 0.4.21)

Claude Code is on Jane's new Mac mini, with 48 GB of memory, and Jane is out. It runs:

```sh
curl -fsSL https://nativecluster.com/install.sh | sh
~/.local/bin/nativecluster setup --accept-terms --email jane@acme.com
~/.local/bin/nativecluster run gemma4:26b-a4b "hi"
```

- `setup` makes this Mac the main of a new cluster, with its inference on, and signs the agent in on this Mac. No browser opens, and nothing downloads. `--name "Jane's lab"` names the cluster; without it, it's "Agent's cluster".
- `--accept-terms` accepts NativeCluster's [Terms of Service](https://www.nativecluster.com/terms) and [Privacy Policy](https://www.nativecluster.com/privacy), whose links `setup` prints first. They bind whoever uses NativeCluster, a person or an AI agent. Without it, and with nobody at a terminal, `setup` sends nothing and exits 2.
- `--email` names the agent's person: the one who may claim the cluster. It grants nothing by itself.
- `setup` works only on a Mac where nobody has set NativeCluster up, and always starts a new cluster. A Mac that should join a cluster you already have is joined by a person, in the window, with a PIN.
- `run` then downloads gemma4:26b-a4b (14 GB) into this Mac's own models folder, since it fits this Mac, and answers.

Until a person claims the cluster, the steps that need a person exit 10 (`claim_needed`): a new administrator, owner or Mac owner, turning the API on, a main's PIN, inviting people, and adding a second Mac. To claim it:

```sh
nativecluster claim --email jane@acme.com
```

1. It prints a link that works for an hour. NativeCluster emails it to nobody: the agent gives it to Jane.
2. Jane opens it on her phone or any computer, signs in with NativeCluster as jane@acme.com, and chooses **Claim**. Or she signs in as jane@acme.com in NativeCluster's window on the Mac mini, which claims it too.
3. The agent runs `nativecluster claim` again. Jane owns the cluster, and the agent works for her from then on. The steps that need a person now wait for Jane to confirm them on the Mac.

Anyone else who opens the link, or signs in on the Mac mini, gets nothing, and nothing changes.

## 3. Install the command

The install line has already put the command in `~/.local/bin`, and Homebrew both commands in its own `bin`. From the dmg, or to add `ncdev` after the install line, the person chooses **Install the nativecluster command…** in NativeCluster's menu bar menu. It links `nativecluster` into `~/.local/bin` and puts that folder on the PATH, once. Since 0.4.19 it also links `ncdev`, NativeCluster's tool for building apps, beside it, and NativeCluster's two skills for coding agents are in `~/.claude/skills` (see [Install](https://www.nativecluster.com/docs/install.md#skills-for-your-coding-agent-and-ncdev)). A terminal that was already open, an agent's included, doesn't see the change: call `~/.local/bin/nativecluster`, or open a new terminal. Without the line or the menu step, the command is at `/Applications/NativeCluster.app/Contents/Resources/nativecluster`.

## 4. Check this Mac, and sign the command in

```sh
nativecluster doctor
nativecluster login
nativecluster status
```

- On a Mac an agent set up with `setup`, the command is signed in already, and `login` there signs the agent in again with no browser (since 0.4.21).
- `doctor` runs without a sign-in. Before `login`, it says whether NativeCluster runs on this Mac and which of its ports listen, and exits 3 (not signed in): that's expected here. Signed in, it also names the main this Mac is joined to, and, for the Mac owner or an administrator, its disk encryption and screen lock.
- `login` opens the person's browser and waits, up to 10 minutes, until they've signed in there. Then the command works as them on this Mac, with no password or PIN ever typed into it.
- `status` says who is signed in, this Mac, and its main.

`nativecluster help` (or `--help`, `-h`) lists every command and exits 0. Never run `nativecluster` with no command, or with any other first word starting with `-`: that starts NativeCluster itself, not a command. (Before 0.4.19, `--help` did too, and `help` wrote the list to stderr and exited 2.) Output is text, also when piped; `--json` asks for JSON.

## 5. Choose a model

```sh
nativecluster models list
nativecluster models places <model>
nativecluster models get <model>
```

`models list` shows the cluster's models and which computers keep each. The [Models](https://www.nativecluster.com/models) pages on this site say how big each one is and which Macs can run it.

- `models get <model>` downloads the model to this Mac's own folder for models; `--computer` and `--folder` name another. Since 0.4.21, an agent (nobody at a terminal) may run it by itself: it then takes only a model with room in that folder and about 21 GB to spare. Before 0.4.21, an agent ran it only when the person said to.
- Administrators and the Mac owner download models.
- `models get` returns at once, and the download carries on: `nativecluster models list` shows it. `models places <model>` shows each folder and the room there.
- Models are downloaded on the main. On a computer turned on for inference for its cluster, the cluster's owners and administrators download models to its own folder (since 0.4.19). On a computer that joined a cluster with its switch off, `models get` downloads nothing and says so: run it on the main.

## 6. Ask a model

```sh
nativecluster run <model> "Say hello in five words."
```

Since 0.4.19, `run` prints one answer, as text, and a pipe is input too: `cat notes.txt | nativecluster run <model> "summarize this"`. A short name such as `gemma4` takes the largest of that family the cluster has. With no question and a terminal, it opens a chat for a person.

If the cluster doesn't have the model:

- **An agent** (nobody at a terminal), since 0.4.21: `run` downloads it into this Mac's own models folder, then answers. It takes only a model that fits this Mac: its memory, and room in that folder for the model with about 21 GB to spare. One that doesn't fit is refused, exit 9, saying why, and nothing downloads. There is no limit on how many. Models are large (often 5 to 60 GB): if the agent's own command times out, the download goes on, and the same `run` again waits for it.
- **A person at a terminal**: `run` asks once, `[Y/n]`, naming the size and the folder. That answer is the person's.
- **`--no-get`** never downloads: it prints the `nativecluster models get` line, with the size and the folder, and exits 9. Before 0.4.21, that was what `run` did for every agent.

See [The nativecluster command](https://www.nativecluster.com/docs/cli.md#a-model-the-cluster-doesn-t-have).

## 7. Use the models from a tool or script on this Mac

```sh
nativecluster env
. '<the path it printed>'
curl -s "$OPENAI_BASE_URL/models" -H "Authorization: Bearer $OPENAI_API_KEY"
```

`nativecluster env` writes `OPENAI_BASE_URL` (`http://localhost:8487/v1`), `OPENAI_API_KEY` and `NATIVECLUSTER_API_KEY` to a file only the person can read, and prints its path, never the key. Sourcing the file sets them, and any tool that reads those variables uses your cluster. Never print, paste, log or commit anything starting `nck_` or `nct_`. See [Any OpenAI-compatible tool](https://www.nativecluster.com/docs/integrations/openai-compatible.md) and [The API](https://www.nativecluster.com/docs/api.md).

## 8. Add people and Macs

- **People:** an owner or administrator invites them on Members, in NativeCluster's window, and decides which apps each one gets. See [Members and roles](https://www.nativecluster.com/docs/members.md).
- **Macs:** each Mac installs NativeCluster and joins with a PIN. An administrator turns on inference on the Macs that should run models. See [Several Macs, one cluster](https://www.nativecluster.com/docs/cluster.md).
- **On a cluster an agent started**, a person claims it first (step 2).

## The prompt for your agent

A person can paste this into their coding agent to have it set NativeCluster up for them:

<!-- build:prompt -->
```text
Set up NativeCluster so my team can use private AI on our own Macs.
NativeCluster is a Mac app that runs open models on the Macs a group owns and
gives every person, app and agent one OpenAI-compatible endpoint, with one
sign-in and roles. Before you do anything, read
https://www.nativecluster.com/llms.txt and
https://www.nativecluster.com/docs/quickstart.md; for anything else, search
https://www.nativecluster.com/llms-full.txt. Then:
1. If /Applications/NativeCluster.app is missing, install it (this prompt is
   my OK):
   curl -fsSL https://nativecluster.com/install.sh | sh
   It checks the download, installs NativeCluster, puts the nativecluster
   command in ~/.local/bin and opens NativeCluster. If a check fails, it
   changes nothing: show me what it says. This terminal doesn't see the
   command yet: call ~/.local/bin/nativecluster. Or, if brew is on this Mac:
   brew install --cask nativecluster/tap/nativecluster, then
   nativecluster open (if it says there is already an App, leave it).
   (The other way: I download
   https://updates.nativecluster.com/NativeCluster.dmg, drag NativeCluster to
   Applications, open it, and choose "Install the nativecluster command…" in
   its menu bar menu.)
2. Run nativecluster doctor and read what it says. nativecluster help (or
   --help, -h) lists the commands. Never run nativecluster with no command,
   or with any other first word starting with -: that starts NativeCluster
   itself, not a command. (Before 0.4.19, --help did too.)
3. If nobody has set NativeCluster up on this Mac, and we have no cluster
   yet, set it up yourself (NativeCluster 0.4.21 or later), with my email
   (ask me for it if you don't know it):
   nativecluster setup --accept-terms --email <my email>
   --accept-terms accepts NativeCluster's Terms of Service and Privacy
   Policy for me: https://www.nativecluster.com/terms and
   https://www.nativecluster.com/privacy. When a step needs a person, the
   command exits 10: run nativecluster claim and give me the link it
   prints. I sign in there to make the cluster mine; then run
   nativecluster claim again. If this Mac should join a cluster we already
   have, that is mine: NativeCluster's window asks me to sign in and to join
   with a PIN. On a Mac set up already, signing in is mine too:
   nativecluster login opens my browser, and I sign in there. Never type,
   fill in or submit my sign-in for me.
4. A few steps are mine to confirm on the Mac with Touch ID or its password:
   a new administrator, owner or Mac owner, turning the API on, and a main's
   PIN. The command waits for me. Never ask me for my password or a PIN.
5. To ask a model once: nativecluster run <model> "your question". Since
   0.4.21, if the cluster lacks the model, run downloads it into this Mac's
   own models folder first, but only one that fits this Mac; one that
   doesn't fit exits 9 and says why. Models are large (often 5 to 60 GB):
   choose with nativecluster models list and the Models pages, and tell me
   which one you downloaded. If run asks whether to download a model, that
   answer is mine: never type it.
6. For a tool on this Mac, nativecluster env writes the base URL
   (http://localhost:8487/v1) and a key to a file only I can read: source
   that file. Never print, paste, log or commit anything starting nck_ or
   nct_.
7. Ask me before you change any of this Mac's settings (sleep, FileVault,
   sharing), and leave handing a key to anyone else to me.
```
<!-- /build:prompt -->

## Not in 0.4.21

- Reaching the cluster from the internet or a cloud server: today the agent runs on one of the cluster's Macs, or on the office network.
- Windows and Linux. NativeCluster runs on Macs. A Windows PC or a Linux server on the office network can still call the main's API with a key; see [The API](https://www.nativecluster.com/docs/api.md).
