# `mix mob.install`
[🔗](https://github.com/genericjam/mob_dev/blob/main/lib/mix/tasks/mob.install.ex#L1)

Runs first-time setup for a Mob project generated by `mix mob.new`.

Must be run from inside the project directory (the one containing `mix.exs`).

    mix mob.install [--icon PATH]

## What it does

  1. Prompts for machine-specific paths (`mob_dir`, `elixir_lib`) and writes them
     to `mob.exs` (gitignored) and `android/local.properties`
  2. Downloads and caches the pre-built OTP runtime tarballs for Android and iOS
  3. Writes the Mob logo as a placeholder app icon (if no icon exists yet)

## Options

  * `--icon PATH`    — use a custom image instead of the Mob logo placeholder

## Icon output

  - `android/app/src/main/res/mipmap-*/ic_launcher.png`
  - `ios/Assets.xcassets/AppIcon.appiconset/icon_*.png` + `Contents.json`

The Mob logo is written as a placeholder. Replace it any time:

    mix mob.icon                     # generate a custom icon
    mix mob.icon --source my_logo.png

## Under the hood

`mix mob.install` does three things that would otherwise require manual steps:

**1. Path configuration** — reads `mob.exs`, detects sensible defaults, prompts
for missing values, and writes them back. Equivalent to:

    # mob.exs (gitignored, machine-specific)
    config :mob_dev,
      mob_dir: "/Users/me/code/mob"

**2. OTP download** — fetches pre-built ERTS tarballs from GitHub Releases:

    # Roughly equivalent to:
    curl -L https://github.com/genericjam/mob/releases/download/<tag>/otp-android-arm64.tar.gz          -o ~/.mob_dev/otp-android-arm64.tar.gz

**3. Placeholder icon** — writes the Mob logo to all platform icon sizes (pre-built PNGs,
no system tools required). Run `mix mob.icon` afterwards to replace it with a custom icon.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
