Installing Homebrew and PHP0:00
Okay, now let's go through the CLI software and tools that I use for web development. First thing I installed was Homebrew, which is a package manager for macOS and is essential for installing command line tools on a Mac. So just run this command here and it should install it. So after Homebrew, I installed php. So the latest version, which is version 8 right now, just do brew install php. And if you want other versions as well, just do brew install php@7.4 or previous versions, and that should install it as well. And later on when we install Valet, then you can switch between different versions. So after php, I installed some PHP specific packages using PECL.
Adding PECL Extensions0:32
And later on when we install Valet, then you can switch between different versions. So after php, I installed some php specific packages using PECL. So if I do pecl list, you can see those packages that I have installed. So just do pecl install, for example, xdebug, and that should install it. And for Redis, you have to install it using brew first. So do brew install redis, and then do pecl install redis. And then to make sure you have it installed, you can do php -i and then grep redis. So same for Imagic, you have to install it using brew first. So brew install imagick, and then pecl install imagick, spelled differently, like this. And then that should install it.
Composer and Laravel Installer1:12
So brew install Imgec, and then pecl install Imgec, spelled differently, like this. And then that should install it. Next up is Composer, which is a package manager for php. So go ahead and install this. And I have it in this folder. So you just have to build it and then move it to this folder as per the instructions on the website. After that, I installed the Laravel installer. So just require it globally with Composer, and then you can use this laravel new command to create new Laravel applications.
Setting Up Laravel Valet1:44
So just require it globally with Composer, and then you can use this php artisan new command to create new Laravel applications. Also make sure you have this in your path file in your Z shell config. So let's open that up, and it should be at the bottom here. So right here for the Laravel installer, and you also need this in your path for Composer. The next thing I installed was Laravel Valet. So Valet automatically sets up a web server for each of your projects within a specific folder. So just Composer require it globally as per the instructions here. Actually, you have to install php first, which we've already done, and then require it globally.
So just composer require it globally as per the instructions here. Actually, you have to install php first, which we've already done, and then require it globally using composer. And then when you do valet install, it's going to also install any web server related tools that it needs, like dnsmasq and nginx. So after that, and make sure to do a valet park. Where's that command? valet park in the folder that you want to make available for all of your projects. So for me, it's within this project. So everything in here has its own domain.
Installing MySQL Database2:51
So for me, it's within this project. So everything in here has its own domain. So for example, this project, you can just use the .test domain, or you can configure that as well. And that should bring up the Laravel app. Next up is MySQL, which is my database of choice. Again, use Homebrew to install it. So brew install mysql. And I believe after you install it, there's a command that you can run. So it automatically runs every time your computer restarts.
Handy CLI Tools and Hub5:21
And some tools just work better with it. Next up is the Vue CLI, so Vue version whenever I'm working with Vue. So next up is a handy tool called trash. So instead of using the rm command, which can be dangerous, if you make a typo, you can accidentally delete an important file. So if you just install this package globally, instead of using rm or rm -rf, you can just do trash and then delete the folder or file that you need. Next up is hub, which is a command line tool for GitHub. And I pretty much only use this for one command. And that command is to create a new repository within GitHub for a project that I already.
And I pretty much only use this for one command. And that command is to create a new repository within GitHub for a project that I already have locally. So for example, if I'm in a project here, and say, for example, it's not a Git repo, I just do git init, and then I add my files using my aliases, and then I push whatever. And then I do hub create, or -p if you want a private repo. And that should push it up to GitHub with the same folder name. And then I can just do git push origin master, which I have an alias for as well. And actually think VS Code has a feature that does all of this automatically, but I'm still used to doing it this way.
