rob: Simple projects generator

[ cli, library, mit, program ] [ Propose Tags ]
Versions [RSS] 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5
Dependencies ansi-terminal (<=0.11), base (>=4.7 && <5), bytestring (<=, cmdargs (>=0.10.17 && <=0.10.20), directory (<=, ede (==, filepath (<=, fortytwo (<=1.0.5), Glob (<=0.10.1), pathwalk (<=, rob, text (<=, time (<=, unordered-containers (<=, vector (==, yaml (<= [details]
License MIT
Copyright Gianluca Guarini
Author Gianluca Guarini
Category CLI
Home page
Source repo head: git clone
Uploaded by gianlucaguarini at 2020-12-21T09:28:11Z
Executables rob
Downloads 2170 total (17 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-12-21 [all 1 reports]

Readme for rob-0.0.5

[back to package description]

rob logo

Simple projects generator written in Haskell

Call on me in the day of trouble, and I will deliver, and thou shalt glorify me.

Daniel Defoe, Robinson Crusoe


$ cabal install rob


Before using Rob you need to create your projects templates. If for example you work often with nodejs you can create your nodejs template from scratch. Let's see then how to create a new Rob template.

New Project Template Creation

Create a folder anywhere on your machine. Put in this folder all the files/folders you want to use anytime you will chose this template. For example for the nodejs template you may have a folder structure that might look like this:

│   │--index.js

The project.yml file

Rob relies on a single file that you must include in the root of your templates folders. This file is called project.yml

For example, the nodejs template must also contain an additional project.yml file:


The project.yml file will contain all the questions needed to copy and render your template files when you will chose that specific template. Depending on your answers to these questions Rob will be able to generate a (key, value) data map that will be used to shape your project files via its template engine

A typical project.yml might look like this:

    question: What's the name of the project?
    type: input
    default: foo

    question: Project description?

    question: Which test framework do you want to use?
    type: select
    default: mocha
      - mocha
      - jasmine
      - tap

    question: Which babel preset do you want to use?
    type: multiselect
      - babel-preset-env
      - babel-preset-env
      - babel-preset-es2015
      - babel-preset-es2016
      - babel-preset-es2017

    question: Is it public?
    type: confirm

    question: What's your password?
    type: password

The kind of answers types supported are only input, confirm, select, multiselect and password. The questionnaire prompt are powered by fortytwo

Template engine

Rob uses EDE as template engine. Any time you will create a new project with Rob, all the files of the template selected will be parsed rendered via EDE using the answers provided with the project.yml. For example the package.json in your nodejs template might be:

  "name": "{{name}}",
  {% if is_public %}
    "public": true,
  {% endif %}

Please check the EDE to see all the available expression. However if you have already used Liquid or Jinja it shouldn't be such a big deal

Add the template to rob

Once you have set up your new template you can link it to Rob via rob add template-name path/to/the/template Pay attention: the path to your template should be absolute! For example:

rob add simple-node-js `/Users/WhoAmI/Projects/rob-templates/nodejs`

The command above will store the template in a file called .rob in your home directory.

Create a new project

Run rob new from any folder on your machine and if you have Rob templates available, it will create your project running the questionnaire and copying the files of the template chosen in the current directory

Autoignore files

Rob will automatically parse any .gitignore recursively in your selected template folders to ignore specific files that you don't want to copy over when you create a new project


  • Unit test!
  • Improve performance
  • Improve the documentation
  • Write Documentation
  • Refactor the code and cleanup