# InfiniBot OS — Quick Start

**Goal: a running InfiniBot gateway on your machine in under 5 minutes.**

This repo is **private**, so the install relies on the [GitHub CLI](https://cli.github.com/) (`gh`) for transparent auth. Once `gh auth login` is done, every command below "just works."

---

## 0 · One-time prerequisites

| Requirement | Why | Install |
|---|---|---|
| Node.js **22 LTS** | Runs the gateway | <https://nodejs.org/> |
| `gh` CLI | Auths private-repo clone + raw downloads | <https://cli.github.com/> |
| `bun` (preferred) or `pnpm` | Package manager — faster than npm | `npm i -g bun` |

```bash
gh auth login          # GitHub.com → HTTPS → Login with a web browser
gh auth setup-git      # Lets `git clone` use gh's token (no prompts)
gh auth status         # Verify you're authed
```

---

## 1 · Install (one-liner)

The installer clones the repo, builds, and opens the onboarding wizard. Pick your OS:

### macOS / Linux

```bash
gh api repos/MrYungCEO/infinibotOS/contents/install-scripts-static/install.sh \
  -H "Accept: application/vnd.github.raw" | bash
```

### Windows (PowerShell)

```powershell
gh api repos/MrYungCEO/infinibotOS/contents/install-scripts-static/install.ps1 `
  -H "Accept: application/vnd.github.raw" | Invoke-Expression
```

> **Why this shape?** `gh api ... | bash` lets `gh` handle the private-repo download (no public URL needed). The shell pipes the raw script straight into your interpreter.

Default install paths:

| OS | Source location | Workspace |
|---|---|---|
| macOS / Linux | `~/.infinibot` | `~/clawd` |
| Windows | `%USERPROFILE%\.infinibot` | `%USERPROFILE%\clawd` |

---

## 2 · Manual install (skip the bootstrap script)

If you'd rather see every step yourself:

```bash
gh repo clone MrYungCEO/infinibotOS
cd infinibotOS

bun install                                     # or: pnpm install
cp .env.example .env                            # then add your ANTHROPIC_API_KEY

bun start gateway \
  --auth password --password "Kingly888$" \
  --bind lan
```

Open <http://127.0.0.1:18789> → log in with the password → the **Welcome walkthrough** auto-loads.

---

## 3 · Verify the install

```bash
infinibot status     # Gateway up? Auth wired? Daemon registered?
infinibot doctor     # Full diagnostic — points at anything misconfigured
```

If `infinibot` isn't on your PATH yet:

- **macOS/Linux:** `export PATH="$PATH:$(npm prefix -g)/bin"` (add to `~/.zshrc` / `~/.bashrc`)
- **Windows:** the installer adds the npm global prefix to PATH for the current user — open a fresh PowerShell

---

## 4 · Add a satellite (second device on the same network)

Once the master device is running with `--master-mode`, the satellite gets paired through the dashboard:

1. On the **master**, open the dashboard → **Federation → Add Satellite Node**.
2. Run the one-liner from [§1](#1--install-one-liner) on the satellite.
3. Walk through the wizard — when it asks for the master, hit **⊕ Scan LAN** (mDNS discovery) or paste the master URL.
4. The wizard writes `infinibot.json` to the satellite's config directory:

   | OS | Config path |
   |---|---|
   | macOS / Linux | `~/.infinibot/infinibot.json` |
   | Windows | `%USERPROFILE%\.infinibot\infinibot.json` |

5. Start the satellite gateway — it auto-connects:

   ```bash
   bun start gateway
   # [FEDERATION] satellite mode, connecting to ws://192.168.1.10:47913/federation
   # [FEDERATION] connected to master as node-<uuid>
   ```

Full walkthrough with troubleshooting: [`docs/federation/satellite-setup.md`](./federation/satellite-setup.md).

---

## 5 · Connect messaging channels (optional)

After install, hook InfiniBot up to whichever channels you live on:

| Platform | Difficulty | Setup time |
|---|---|---|
| [Telegram](channels/telegram-quickstart.md) | Easy | 3 min |
| [WhatsApp](channels/whatsapp-quickstart.md) | Easy | 2 min |
| [Discord](channels/discord-quickstart.md) | Medium | 5 min |
| [Slack](channels/slack-quickstart.md) | Medium | 10 min |
| [Signal](channels/signal-quickstart.md) | Medium | 5 min |
| [iMessage](channels/imessage-quickstart.md) | macOS only | 5 min |

---

## 6 · Mobile companion

Pair the React Native app (Expo Go QR or personal EAS build):

[Mobile node setup →](nodes/mobile-quickstart.md)

---

## Troubleshooting

| Symptom | Fix |
|---|---|
| `gh: command not found` | Install <https://cli.github.com/> first |
| `Permission denied` / 404 from `gh api` | Run `gh auth login` again; confirm `gh auth status` shows the right account |
| `git clone` prompts for password | You forgot `gh auth setup-git` — run it, then retry |
| `unknown method: ...` on first request | Restart the gateway after install so the methods registry rebuilds |
| Login screen rejects password | Stop, restart with `--password "<your-password>"` — passwords aren't read from `.env` |
| Satellite won't pair | Check master is `--master-mode`, both devices on same LAN, same gateway version |
| **Anything else** | `infinibot doctor` runs every diagnostic and tells you what's wrong |

---

## What's next?

- [`docs/index.md`](./index.md) — full feature index (~20 surfaces)
- [`setup.html`](../setup.html) — friendly one-page setup with copy buttons (open in a browser)
- `/learn` (in-app) — 19 interactive walkthroughs + Master certification
- [`docs/federation/satellite-setup.md`](./federation/satellite-setup.md) — multi-device topology
