[create-new-cli.](https://github.com/dabit3/create-new-cli)
To get started, check out the repo here.
With the rise in the popularity of projects like Create React App, Angular CLI, and Ionic CLI, as well as the productivity these CLIS bring to the table, there should be an easy way for developers to create their own CLI using boilerplates and also to introduce them to the world of CLI creation.
With Create New CLI, you can easily create your own CLI with just a couple of commands and a base project, and then add on to and polish your CLI using the generated project.
To get started, check out this video or follow the directions below.
To create your own CLI:
create-new-cli
globallynpm i -g create-new-cli
2. type create-new-cli and follow the commands
create-new-cli
In the above step, we will create a name and a command for our cli. The name will be the folder created for our project, and the command will be what the application is registered as in the npm registry, which will be the name field in our newly created package.json.
We will reference these two items as
<YourProjectName>
and<your-project-command>
in the following steps.
3. CD into newly created project directory
cd <YourProjectName>
4. Publish to npm (or link to test locally)
npm publish OR npm link
5. Install new cli globally on your own machine (skip this step if you ran npm link)
npm i -g <your-project-command>
6. Create new application using your new CLI
<your-project-command> MyAppName
I hope to see people build a lot of cool stuff with this!
My Name is Nader Dabit . I am a software consultant and trainer and the founder of React Native Training where we teach developers at top companies around the world how to quickly get up and running with React Native.
If you like React and React Native, checkout out our podcast — React Native Radio on Devchat.tv.
Also, check out my book, React Native in Action now available from Manning Publications
If you enjoyed this article, please recommend and share it! Thanks for your time