cmd: init



The syntax for the init command is:

nift init (output-extension)
nsm init (output-extension)


The init command is to initialise a Nift project, it either takes zero parameters where the default is to use an output extension of .html or takes a single string parameter specifying what the default output extension should be for the project. The init command will:

  • create a hidden directory .nsm containing a config file nift.config and a tracking.list file for keeping a record of tracked files, this directory will also be used for storing other files Nift needs in order to manage and generate your project;
  • create a basic template file for you called either template/page.template for html projects and template/project.template otherwise; and
  • for html projects an empty page named index will also be tracked and built.

Note: Once the project root directory for your project is initialised, much the same as with Git, Nift may be run from any directory within the project root directory (project root directory inclusive).