# DevSetup AI — Linux Install (.deb)

For Debian / Ubuntu and derivatives (Mint, Pop!_OS, Zorin, elementary).

The package is self-contained: it bundles the setup engine **and** a portable
Node.js runtime, so you do **not** need Node installed.

---

## Check your architecture first

```sh
uname -m
```

| `uname -m` says | Supported? |
|---|---|
| `x86_64` (Intel / AMD — most PCs, laptops, servers, VMs) | ✅ install `devsetup-ai_1.0.0_amd64.deb` |
| `aarch64` (ARM — Raspberry Pi, ARM servers) | ❌ not available — see below |

**Why there is no ARM64 build:** Flutter does not publish an ARM64 Linux SDK
(every official Linux release is x86_64 only), so a Flutter Linux desktop app
cannot currently be compiled for ARM64. This is an upstream Flutter limitation,
not a packaging choice. On ARM hardware, run the app on an x86_64 machine or VM.

---

## Install

```sh
sudo apt install ./devsetup-ai_1.0.0_amd64.deb
```

`apt` pulls in any missing system libraries automatically. If you prefer `dpkg`:

```sh
sudo dpkg -i ./devsetup-ai_1.0.0_amd64.deb
sudo apt-get install -f      # only if dpkg reports missing dependencies
```

---

## Launch

- From your applications menu: **DevSetup AI**
- Or from a terminal:

```sh
devsetup-ai
```

The app starts its bundled engine automatically on `127.0.0.1:8756` and shows
**"Started local engine."**

---

## Using it

1. Pick a **stack** or a one-click **preset**.
2. Check the **Machine AI** panel — it grades CPU / RAM / disk before installing.
3. Toggle **Dry run** to preview the exact commands without changing anything.
4. Press **Start Setup** to watch progress, logs, and the final report.

---

## Notes

- **Real installs need administrator access.** The app asks your desktop for it
  (a standard system password dialog appears via polkit) — you don't need to
  start it from a terminal. **Dry run** needs no privileges and changes nothing.
- If your system has no graphical password agent, the app won't fail silently:
  it shows the exact command to run in a terminal, then you can start setup again.
- Some stacks use `snap` on Linux (e.g. VS Code, Android Studio). Install snapd
  first if your distro doesn't ship it: `sudo apt install snapd`.
- **Redis** and a few tools have Linux-specific notes shown in the app when a
  native package isn't available.
- If port `8756` is in use, close whatever is using it and relaunch.

---

## Uninstall

```sh
sudo apt remove devsetup-ai
```

---

## Rebuilding from source

Built with Docker, so it works from macOS, Linux, or Windows:

```sh
tools/build_linux_docker.sh
```

The packaging script detects the target architecture automatically, so if
Flutter ever ships an ARM64 Linux SDK, `TARGET_PLATFORM=linux/arm64` will work
without further changes.
