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
AuthControllermodule withon_success/2andon_failure/2 - a
forward "/auth", Amur.Routermount in your router - a
config :amurblock inconfig/runtime.exswired to the generated controller, defaulting to thegithubprovider
No user input is required. Run it from your project root:
mix amur.genOptions
--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