Alongside an ever-increasing amount of tools and frameworks in the software industry also come increasingly complex boilerplates and more difficult ways to start off a new project.
In order to alleviate this pain, we have created now init – a new subcommand for Now CLI that allows you to create new projects based on a wide range of examples specifically tailored to the Now 2.0 platform.

Basic Usage

After making sure you are running the latest version of Now CLI (which can be downloaded here), you can use the following command to start off a new project:
When running the command without any arguments, you will see a list of boilerplates from our now-examples repository.
All of them were built to run on Now 2.0 – the latest version of our platform.
From this list, select the starting point or framework that suits your new project best by navigating up and down with your arrow keys.
Once you have found a project to use, hit enter (if the list does not include what you are looking for, read about adding it). You will then see a directory created containing the boilerplate you selected:
Then, when you inspect the directory:
You will notice that all of the files from the example were prepared for you:
From here, you only need to modify the files to your liking and run now in order to deploy your project – that is all.

Advanced Usage

If you already know which project example you want to use, you can pass its name to the command directly and avoid seeing the listing:
This also works if you mistype the name of an example:
When running the above command, you will see a suggestion for the correct name and only need to type y in order to create the boilerplate:

Contributing

With all boilerplates used by now init located in our public now-examples repository, you can suggest modifications at any point in time.
We also highly appreciate any contributions made to our examples repository. We look forward to having an ever-growing and rich resource of boilerplates to quickly get started and deployed in moments.
Should you have any questions about now init or need help with adding a new boilerplate to the repository, make sure to ask our team on our community chat.