Project generator for the Mob mobile framework. Installs a global mix mob.new command.
mob_new is a Mix archive — install it globally, not as a project dependency:
mix archive.install hex mob_newmix mob.new my_app
cd my_app
mix mob.install # first-run setup: download OTP runtime, generate icons, write mob.exs| Option | Description |
|---|---|
--no-install |
Skip mix deps.get after generation |
--dest DIR |
Create the project in DIR (default: current directory) |
--local |
Use path: deps pointing to local mob/mob_dev repos — see below |
This flag is for Mob framework contributors and library authors testing unpublished changes. It is not intended for app developers — use the standard
mix mob.new my_appinstead.
If you are working on Mob itself and want to test your changes end-to-end
before publishing to Hex, pass --local to generate a project that depends on
your local checkouts instead of the published packages:
mix mob.new my_app --localThis generates mix.exs with path: deps:
{:mob, path: "/path/to/mob"},
{:mob_dev, path: "/path/to/mob_dev", only: :dev, runtime: false}It also pre-fills mob.exs with your actual local paths so mix mob.install
skips the path configuration prompts and proceeds straight to OTP download and
icon generation.
Path resolution (in order):
MOB_DIR/MOB_DEV_DIRenvironment variables./mob/./mob_devin the current directory (e.g. running from~/code)../mob/../mob_devrelative to the current directory
# If mob and mob_dev live alongside each other in ~/code:
cd ~/code
mix mob.new my_app --local # auto-detects ~/code/mob and ~/code/mob_dev
# Or set explicitly from anywhere:
MOB_DIR=~/code/mob MOB_DEV_DIR=~/code/mob_dev mix mob.new my_app --localmy_app/
├── mix.exs
├── lib/
│ └── my_app/
│ ├── app.ex # Mob.App entry point
│ └── home_screen.ex # starter screen
├── android/
│ ├── build.gradle
│ └── app/
│ └── src/main/
│ ├── AndroidManifest.xml
│ └── java/com/mob/my_app/MainActivity.java
└── ios/
├── beam_main.m
└── Info.plist
First deploy (builds the native app and installs it):
mix mob.deploy --nativeDay-to-day (hot-pushes changed BEAMs, no native rebuild):
mix mob.deploy # push + restart
mix mob.watch # auto-push on file save
mix mob.connect # open IEx connected to the running device nodeFull guide at hexdocs.pm/mob, including Getting Started, screen lifecycle, components, navigation, and live debugging.