# `MobDev.GooglePlay.SetupWizard`
[🔗](https://github.com/genericjam/mob_dev/blob/master/lib/mob_dev/google_play/setup_wizard.ex#L1)

Interactive wizard for the Google Play one-time setup.

Automates the Google Cloud steps in the publishing guide (section 1.4),
leaving only the irreducible manual steps that have no API:

**Automated by this wizard:**
- Browser OAuth sign-in (no gcloud required)
- Selecting or confirming the Google Cloud project
- Enabling the Android Publisher API
- Creating the `play-publisher` service account
- Generating and saving the JSON key to `~/.google_play/`
- Granting Release Manager access via the Play Developer API
- Generating the upload keystore (if not already present)
- Printing the `mob.exs` config block to add

**Manual steps that cannot be automated (all one-time per developer account):**
1. Create the Google Play Developer account (requires $25 payment)
2. Complete identity verification (government ID upload)
3. Create the app record in Play Console (no create-app API)
4. Link the Google Cloud project to Play Console:
   Play Console → Setup → API access → Link to a Google Cloud project

See `guides/publishing_to_google_play.md` for the full step-by-step guide.

# `run`

```elixir
@spec run(keyword()) :: :ok | {:error, String.t()}
```

Runs the full interactive setup wizard.

Options:
- `:package_name` — Android applicationId (e.g. "com.example.myapp"). If not
  provided, the wizard will prompt for it.
- `:key_filename` — base filename for the service account JSON (without `.json`).
  Defaults to the last segment of the package name (e.g. `"myapp"`).
- `:dry_run` — when `true`, prints every step but makes no HTTP calls, writes no
  files, opens no browser, and answers all prompts automatically. Use this to
  preview the wizard before running it for real.

Returns `:ok` on success or `{:error, reason}` on any unrecoverable step.

---

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