hello everybody i'm nikki in this video i'm going to show you how you can make your very own URL_TOKEN cli tool now this is one of the features URL_TOKEN that i'm personally using quite a bit i'm using it to control lights in the office i'm using it to check the weather i'm using it for so many things from so many tools i made myself and really this is what this is all about it's about you using the URL_TOKEN for your own benefit now in this video i'm only going to focus on showing you how to make the tool itself and then the use cases are for you to solve in a future video we're gonna see how we can supercharge that dotnet cli tool technology and make very nice custom cli tools in dotnet if you like a lot of content and you want to see more mix you subscribe and hit the notification bell to get highlighted when i upload new video so what is a dotnet cli tool well in this pc i have dotnet installed and now because i've installed the microsoft thai cli tool i can do this i can say just tie and i get all the tie functionality from anywhere on my pc in my terminal and it's not limited to tie it can be anything all you do is the name of the tool and i can do tie run i can do whatever i want now i'm going to show you how you can make your own this basically and i'm going to go with a very simple example i'm going to make a cli tool where you say weather and then you either provide the city or you do weather and the city name and you get the weather back the current weather let's see how we can do that well first i'm going to go here and create a new project and that is going to be a console application so let's select console application and i'm going to say URL_TOKEN as the project and really that's it it's just another regular console app it doesn't have to be a console app it can be anything you want in my case it will be a console app that just prints the current weather now for brevity's sake i'm gonna import some code here because there is no point to me showing you how to build the weather api URL_TOKEN this should be focused on the cli functionality itself so i'm gonna import some weather models and then the code that calls the open weather api which we can call NUMBER_TOKEN times an hour i think for free which is more than enough for me for this cli tool so here are the contracts this is just copied from effectively the open weather api spec and here is the program i have an api key which by the time you're watching this is long gone so don't even try and then i'm initializing an http client like any other console app i'm checking to get the first um city if it is provided as an argument so if someone did weather and then the city name and then i have a label here and then i'm checking if it's not if it's not i'm providing a city name and then i'm making an api call if the city can't be found due to NUMBER_TOKEN then the city doesn't exist you did a mistake and if
START_INTERACTION_TOKEN if you like a lot of content and you want to see more mix you subscribe and hit the notification bell to get highlighted when i upload new video END_INTERACTION_TOKEN