xgen is an opinionated interactive project generator. It can currently
generate standard Elixir, Nerves and escript projects. The documentation for
options is printed directly during the generation process, so that you don’t
need to remember all the possibilities if you don’t use it every day.
Each project comes with:
CHANGELOG.mdwith the initial version;
.envrcto set up reliably the development environment using Nix, and optionally direnv;
- an optional license file.
If Git is enabled, a
.gitsetup script is also added to the project to help
git-flow the same way on every machine.
Standard Elixir projects
Each new standard Elixir project comes with the following dependencies:
In addition to the common options, you can choose to add a supervision tree, a
release configuration with Distillery, package information, and a
CONTRIBUTING.md to your project.
Nerves project are already configured with a release and the IEx console on UART. In addition to the options available in standard projects, you can add a network configuration that works out of the box, setup SSH firmware updates, NTP and more.
escript projects comes with the standard Elixir projects dependencies, and:
A “Hello, World!” escript is generated as an example.
$ mix escript.install github ejpcmac/xgen
To update an already installed
$ xgen update
To update to the current development version:
$ xgen update --dev
Once installed, simply run:
You will asked to choose the type of project you want to generate and guided through the process.
- Standard Elixir projects generator
- Nerves projects generator
- Interactive generation
- Declarative way of handling generators and options
- escript generation
- Minimal Phoenix projects generation
- C projects generation (with Nix and Ceedling configured)
- Exctraction of the generation logic*
- Project generator generation (for fun!)
* I eventually plan to extract all the generation logic in a project generator
framework and only keep generators, options and templates in
xgen. This way,
anyone will be able to build easily a project generator fitting its own needs.
xgen will provide a project generator generator as a beautiful mise en
Before contributing to this project, please read the CONTRIBUTING.md.
Copyright © 2018 Jean-Philippe Cugnet
This project is licensed under the MIT license.
Some code have been inspired by Mix, Phoenix and Nerves generators.