Skip to content
An opinionated interactive project generator.
Elixir HTML Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status

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:

  • a template;
  • a with the initial version;
  • a .editorconfig;
  • a shell.nix and .envrc to 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 setting 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 to your project.

Nerves projects

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.

Elixir escripts

escript projects comes with the standard Elixir projects dependencies, and:

A “Hello, World!” escript is generated as an example.


To install xgen:

$ mix escript.install github ejpcmac/xgen

To update an already installed xgen:

$ xgen update

To update to the current development version:

$ xgen update --dev


Once installed, simply run:

$ xgen

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 abyme.


Before contributing to this project, please read the


Copyright © 2018 Jean-Philippe Cugnet

This project is licensed under the MIT license.

Some code have been inspired by Mix, Phoenix and Nerves generators.

You can’t perform that action at this time.