# Install Coloring Book Engine (CBE) - Agent Guide

CBE is a desktop application (Windows today; Linux/macOS as builds are
published) for producing publish-ready coloring books. This guide is written
for AI agents and scripts installing CBE on a user's machine.

## 1. Check the latest version

```
GET https://download.coloringbook.dev/api/latest?platform=<windows|linux|linux-deb|mac>
```

- `200` -> JSON `{ platform, version, displayVersion, file, url }`. Use `url` to download.
- `404` -> no build published for that platform. **Stop here** - do not guess artifact URLs.
- `400` -> unknown platform name; the response lists valid ones.

`GET https://download.coloringbook.dev/api/latest` (no query) returns every platform at once;
unpublished platforms are `null`.

## 2. Download

Stable URLs that always serve the newest build (Range requests supported):

- Windows (.msix): `https://download.coloringbook.dev/latest/windows`
- Linux (AppImage): `https://download.coloringbook.dev/latest/linux`
- Linux (.deb): `https://download.coloringbook.dev/latest/deb`
- macOS (.dmg): `https://download.coloringbook.dev/latest/mac`

## 3. Install

### Windows (recommended: App Installer, enables 24h auto-update)

```powershell
Add-AppxPackage -AppInstallerFile https://download.coloringbook.dev/cbe.appinstaller
```

Or install the MSIX directly (no auto-update):

```powershell
Invoke-WebRequest https://download.coloringbook.dev/latest/windows -OutFile CBE.msix
Add-AppxPackage .\CBE.msix
```

The package is signed. Expected publisher: `CN=memengin, O=memengin,
L=Anyang-si, S=Gyeonggi-do, C=KR`. Requires Windows 10 1709+ or Windows 11.

### Linux (AppImage)

```bash
curl -fL -o CBE.AppImage https://download.coloringbook.dev/latest/linux
chmod +x CBE.AppImage
./CBE.AppImage
```

### Linux (.deb)

```bash
curl -fL -o cbe.deb https://download.coloringbook.dev/latest/deb
sudo apt install ./cbe.deb
```

### Linux: verify a download (recommended)

All Linux artifacts ship with a GPG-signed SHA256SUMS manifest under
`https://download.coloringbook.dev/linux/` (versioned keys; get `<file>` from the API's
`file` field, e.g. `CBE_x64_1.2.3.AppImage`):

```bash
ver=$(curl -fsS "https://download.coloringbook.dev/api/latest?platform=linux" | sed -n 's/.*"displayVersion": "\([^"]*\)".*/\1/p')
curl -fLO "https://download.coloringbook.dev/linux/CBE_x64_${ver}.SHA256SUMS"
curl -fLO "https://download.coloringbook.dev/linux/CBE_x64_${ver}.SHA256SUMS.asc"
gpg --verify "CBE_x64_${ver}.SHA256SUMS.asc" "CBE_x64_${ver}.SHA256SUMS"
sha256sum -c "CBE_x64_${ver}.SHA256SUMS" --ignore-missing
```

### macOS

Not published yet - `/latest/mac` returns 404. Abort and inform the user.

## 4. Verify the install

```powershell
Get-AppxPackage com.cbe.ai.Sideload   # Windows: non-empty output = installed
```

On Linux, the AppImage running (or `dpkg -s` for the .deb) confirms the install.

## System requirements

- 16 GB RAM, 5 GB free disk, modern GPU with 4 GB VRAM
- Optional: DirectML-compatible GPU with 8 GB VRAM (local GPU colorization)

## Licensing

CBE launches with a free trial; a one-time license unlocks full use.
Details: https://coloringbook.dev/trial and https://coloringbook.dev/#pricing
Support: admin@coloringbook.dev
