Create Code Base

You can either keep using npx ns-flip or you can install the cli and just use ns for every call: npm i -g ns-flip

Installing it globally will make it faster. On the other hand, you won't automatically have the latest version of ns-flip when you use it.

  1. Install your template. For instance, this sample template is used in the examples below.:

    mkdir ~/ns
    mkdir $TEMPLATES
    git clone
  2. Create a first code base:

    npx ns-flip generate $CODE -t $TEMPLATE

    Warning: for some templates, creating the code for the first time can take a while. A template may run a number of steps including installations.

Update Ns File

The ns-file tells what you need to customize your base code. Your default one should have generated code already.

  1. Open your default ns file ($CODE/meta/ns.yml). Also read the instructions provided by your template. Minimally, your template README should tell you any unique data that needs to be contained in your ns file.

    Edit the ns file to suit your needs for the code base. If you have not worked with yaml files, you may want to take a minute to learn YAML. See NS Files to understand the file.

  2. Regenerate the Code Base

    npx ns-flip generate $CODE

    The code is now ready for adding custom code.

    You can repeat steps 1 and 2 whenever you like.

Updating the Template

Note that you should call generate with the -t flag any time you update your template.

    npx ns-flip generate $CODE -t $TEMPLATE


If you have any problems, please feel free to ask for help on our community. Feel free to message us individually.