DEV Community

Cover image for What CLI utilities/commands do you use when creating a new project?
Horus Lugo
Horus Lugo

Posted on

What CLI utilities/commands do you use when creating a new project?

Let's all share the commands that we run when bootstrapping a new project, maybe we can all get to know a few new tools that can help us create our future projects!

Here's my list:

git init

I always use git, so this is usually the first command I run.

yarn init

Most of my projects are related to web development and this is an easy way to create a package.json file.

npx tsc --init

If my project uses TypeScript, this command generates a tsconfig.json with great documentation about all the configuration properties.

npx gitignore

As I use git in every project, I need to have a .gitignore to prevent committing some files. For example, running npx gitignore node will generate a .gitignore file for this kind of project.

There are multiple types supported, you can check the list by running npx gitignore -types

npx licensed

This one allows you to choose a license for your project and then it will generate its corresponding LICENSE file, and that's great if you want to make your project open source.


That would be it for me, now it's your turn to share with us the commands you use the most when you start a new project.

Cat typing

Top comments (4)

Collapse
 
sroehrl profile image
neoan

I actually went a step further and created a cli-tool that is perfectly suited to my needs. Next to custom functionality, some commands simply chain external cli commands from composer, npm and git.

So to answer your question: starting a new application is one single cli command for me.

Collapse
 
horusgoul profile image
Horus Lugo

Awesome! I did something like this for my React projects πŸ˜„

Collapse
 
webstyle profile image
Farrukh Mamatkhalilov
  1. npm init
  2. touch .gitignore tsconfig.json Dockerfile docker-compose.yml
  3. code ./ πŸš€
Collapse
 
webstyle profile image
Farrukh Mamatkhalilov

πŸ‘πŸ‘πŸ‘πŸ‘