mix amur.gen (amur v0.2.2)

Copy Markdown

Generates the boilerplate needed to start using Amur in your application.

mix amur.gen inspects your project's mix.exs to detect the OTP app, derives the web module (AppWeb when a Phoenix-style lib/<app>_web layout is present, otherwise App), and writes:

  • an AuthController module with on_success/2 and on_failure/2
  • a forward "/auth", Amur.Router mount in your router
  • a config :amur block in config/runtime.exs wired to the generated controller, defaulting to the github provider

No user input is required. Run it from your project root:

mix amur.gen

Options

  • --provider - provider atom used in the generated config (default: github)
  • --app - override the detected OTP app (rarely needed)
  • --no-config, --no-router, --no-controller - skip individual pieces

Examples

mix amur.gen
mix amur.gen --provider google