Skip to content

Quick Start

Installation

Rejigger ships as a standalone executable with no external dependencies, so installing the app is as simple as downloading the binary for your platform from the releases page and placing the binary in a folder accessible on your system path.

Configuration

Rejigger uses a YAML formatted plain-text config file named .rejig or .rejig.yml in the current users home folder to store user preferences and information about the templates it knows about. Before you can make use of a template, you must first add a reference to it in this file.

You can provide a direct link to an individual template using the templates property, or you can point to an inventory containing one or more templates using the inventories property. For simplicity, lets start by creating a new file named .rejig in your home folder and add the following snippet of YAML content to it:

inventories:
  - namespace: demo
    type: git
    source: https://github.com/TheFriendlyCoder/rejigger.git

This will allow you to make use of the sample projects defined in the rejigger source project to illustrate how templates work.

Creating a new project

Once you have the application installed and configured, you can try creating a new project using one of the demonstration templates. This can be done by running the following command:

rejig create ./projdir demo.simple 

This command will invoke the template named "simple" from the inventory named "demo", and create a new project based on that template in the folder "projdir". After invoking this command you should be prompted to provide values for 2 configuration parameters:

  1. project_name - the name of the project to be generated
  2. version - the initial version number for the project

After you provide values for these two parameters, Rejigger should clone the source template into the target folder, replacing all references to project_name and version with the values provided. You should see:

  • a new file named version.txt in the output folder, containing the version number you provided to the prompt
  • a file named after the project_name should exist in the output folder (ie: MyProj.txt) and the contents of this file should contain text that looks something like This project, MyProj, was generated by Rejigger!