Create New Template

Ns-flip lets you generate fairly fast a template from a sample code base. Your users will be able to enter once the information needed and it will be stored in their settings file for future generation.

NOTE: this information is updating very actively. We're trying to keep this reasonably up-to-date, but it's hard. If there are errors here, or if you have quations, please tell us on our community.

Start by selecting or creating a sample code base from which to build a template. Then do the following.

  1. Install the cli:

    npm i -g ns-flip

    Or, skip this step and run npx ns-flip instead of ns when calling commands.

  2. call

    ns newtemplate

    and answer the questions there. For more information about what happens with the setup sequence, see create your own setup sequence.

  3. call

    ns newtemplate

    and answer the questions there. This is an area where we are attempting to automate more. You can add your needed files. Basically, you keep calling diff on $SAMPLE and $CODE and making them more and more equivalent until you have a version of the working code that was produced by the template.

  4. Add to config information about the needed general info and other config information.

  5. Create a Readme File Although it's not technically required, in practice a README file is necessary to explain how to use the template. Actually, ns newtemplate generated a stub for you.

Here's a slightly outdated video that nevertheless gives you a basic idea: Getting Started with ns-flip 1.6 Templating


Please ask for help from our new community or feel free to open an issue.

Also, please contact us at if you have suggestions or want us to see what you've created--could be we'll promote some examples soon. ☺