The next thing you’re going to want to try is the README. That means the CLI app you’re using doesn’t have any help commands, or they’re uncommon enough that you probably can’t guess them (thanks a lot, Developer!). Ok, so you tried all of the help commands above and couldn’t get any help to appear. When help doesn’t work, track down the README You’ll probably learn about some new features and options you didn’t know were there. I recommend trying this out with all of your CLI apps on Mac, even if you already know how to use them. īelow that, you’ll see all of the commands available with this app, how to use them, and what they do. For instance, in the screenshot above you can see that the app cask uses the same formula we outlined before: cask. The first line after you get one of these commands to work should be one explaining the basic syntax used for this CLI app. If you try one of these and it doesn’t work, just move down the list until you’ve tried all of them.Įventually, one of these should bring up a list of information for the CLI app you’re trying to learn about. Your command should look something like CLI_app help. Type the name of the CLI app you’re running into your terminal, followed by any of these commands: Or maybe you only know how to run one command for your CLI app, but you know it has way more commands than that. How to get help for CLI apps on MacĪlright, so let’s say you tried the above and it just didn’t work. ![]() Once you know the command and/or arguments, type the name of the app, then the command and/or arguments, then run that all together. And most CLI apps on Mac are built this way! If you don’t know the command you want to run, just run the name of the app. If you try this with an app that requires an argument, like youtube-dl, you should get an error explaining what you did wrong:Īs you can see, doing this makes it pretty clear what you’re supposed to do. You just type tree into the terminal, hit return, and it performs its action. The tree CLI app, for instance, is its own command. Not all apps are going to need an argument. It’s where you tell your terminal what you want to do with the app you just called. The second half, where you type the command, is known as the “argument”. It tells your terminal what app you want to run. That first part, where you type the name of the CLI app, is known as “calling” the application. The command is different, but the format is the same – the name of the CLI app followed by the command for the action I want it to execute. If I wanted to update youtube-dl, I would instead run the command youtube-dl -U. For youtube-dl, that command is the URL of the video I want to download. The second part,, is a stand-in for whatever command or argument (a.k.a., option) you want the app to execute. For instance, if I wanted to download a YouTube video using the Homebrew app youtube-dl, I would type youtube-dl into my Mac’s terminal. The first part, CLI_app, is a stand-in for whatever CLI app you’re trying to run. But 99% of the time, you’ll use this command to run a CLI app in your Mac terminal: Some will run similarly, while others are totally unique. To preface, not every CLI app is going to run this way. How to run CLI apps on Mac (most of the time) Ok, enough of that! Open your Terminal and let’s start running your CLI apps on Mac. It also helps to play around in the terminal a bit so that you understand the basics. I recommend checking out some of my previous posts on the Mac terminal to get a feel for what we’re talking about, which I’ve linked throughout this article. However, they’re also smaller, faster, and capable of things that GUI apps often aren’t. This means they generally have a steeper learning curve than your typical app. Unlike a typical GUI app (like Microsoft Word, Google Chrome, Photoshop, or any other app you use daily), CLI apps are entirely text-based. The name “CLI” stands for “Command Line Interface”, with the “command line” being the space in your terminal where you type commands and press return to run them. In short, a CLI app is an app that runs in your Mac’s terminal rather than through its graphical user interface (GUI). ![]() However, these apps are pretty simple once you’re able to wrap your head around them. ![]() If you haven’t read any of our previous posts on using the Mac terminal, then CLI apps might sound like a foreign concept.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |