# How to use Makefiles to boost command-line productivity

> Learn how to use Makefiles to boost your command-line productivity by avoiding long commands or long sequences of commands.

- URL: https://graffino.com/til/how-to-use-makefiles-to-boost-command-line-productivity
- Author: Denisa Halmaghi
- Channel: command-line
- Published: 2021-12-08
- Updated: 2026-02-23

*Makefiles* are an awesome tool which can help you become more productive command-line wise by encapsulating long commands and/or sequences of commands. They also help abstract away complexity.

One practical example of creating a make command would be setting up a Laravel project. All you need to do is create a file called `Makefile` and type in the following.

```bash
.PHONY setup
setup: # Setup project
    composer install
    php artisan migrate:fresh --seed
    npm install
    ...
```

Now, a new developer who needs to setup his/her project can skip writing down that series of commands by simply typing in the following:

```bash
make setup
```

But this doesn't end here. You can create virtually any command to help you automate certain processes such as creating or deleting files, changing permissions etc.
