The ONLY Cursor AI Tutorial you need 💥 Learn Cursor Coding in 20 Mins 💥
12.78k views3852 WordsCopy TextShare
1littlecoder
Join the membership - https://www.youtube.com/channel/UCpV_X0VrL8-jg3t6wYGS-1g/join
This tutorial o...
Video Transcript:
this is the only cursor video that you have to probably see if you have not used cursor at all see cursor AI has been making a huge waves in the programming space A lot of people are using this to develop applications that they wouldn't have developed otherwise including me so I wanted to put together a very simple tutorial that explains you everything about cursor because there is not a lot of beginner level tutorial rather than the project level tutorials and this assumes that you have just installed cursor and then you you just have logged in nothing else and a lot of comments on my channel currently says that maybe this is a sponsored video this is definitely not a sponsored video this company has been advocated by lot of rich people in Silicon Valley I'm nobody for them they're not giving me any money and I can say that without any doubt that I have not received a single penny to make this video but if you were to support the channel I've open membership which charges you $1 per month you could sign up and then support the channel so first of all what are we going to do so if you have not downloaded all you have to do is go to cursor. comom and download this here and then you have to also log in here and because this is uh using their own model so you have to log in and then use it but once you have done it one of the easiest way for you to launch cursor is just go here and then search for it and all my tutorials are on Mac I don't have a Windows to test it so I'm going to show you on Mac so once you open cursor so the options that you have got is that you can open a folder you can open with SSH if you're going to do everything in local machine you can just open a folder but if you want to a remote loging into a remote machine then you can open it to with an SSH so I can just click open a particular folder for example one of my recent projects here is the Retro maath I can open it after I opened this uh you would see something like this where the very first time when you open this you can import the settings from Visual Studio code cursor is not a completely new IDE it is just a fork of Visual Studio code which is an open- Source ID integrated development environment by Microsoft but let's say you have not done it so now what are we going to do we're going to see a bunch of cursor settings that I believe you should start enabling the first of all what you have to do is command shift p command shift p so when once I do command shift p you would see this small menu bar like the project menu and here you you can go search cursor settings once you go to cursor settings you would notice certain things for example one I am on a Pro trial account I've not still purchased it I'm still on the fence uh whether to use cursor or separately claw 3. 5 but for now I'm on the Pro trial account so if you register for cursor for the first time I guess for 2 weeks you get the Pro trial account then if you have Visual Studio code uh settings like key bindings extensions you can go here and import it the next thing is a very important thing imagine you are going to code in only one particular project in only particular language then you can set the rules here so this is where you can say okay just use react just use Python so this is where you set the rules for AI that will be used across all the chats which is your command L and across all command Cas sessions so this is very important if you're going to code in only one language imagine I'm going to develop an iOS application like an apple um iPhone application a game which I definitely want to do then all you have to do is go here and then specifically mention that always use a swift or whatever that iOS application thing is so you have to mention that very clearly so then you can say that okay never do this thing never do that thing and then give the rules the set of boundaries that you want the AI to be um adhering to and play by one is that option but if you want to do it let's say repo wise you don't want to set it uh um across all the projects you want to do it projectwise so what you can do is in any project that you have got let's say this is your project folder which we just opened it now you can add a file just like your git ignore file if you're familiar with Git ignore like for example like this you can add something called a DOT cursor rules file and you can specify the exact set of rules there so now what you're doing is instead of making it across all the projects like for example you want to say the just use Python now maybe you want to code a nextjs project maybe tomorrow you want to code a swift project project so you don't want that confusion to be there so you can go ahead and then leave this empty here and then set that cursor rules file in your current working direct the root folder and this will pick that up so and you can enable that if you disable it it will not pick it up if you enable it it will pick it up right now I don't have a cursor rules file but I can set a cursor rules file and then use it then one another thing is if you are like me you're paranoid about companies using your data because especially like right now a free child but if I pay I don't want them to use my data I'm like very clear about it so if on none of your code will be stored by them so this this is enabled your code is not going to be stored by them if off we may save prompts collect elemetry data to improve cursor I'm sorry boss um I don't want that to happen so I'm going to just say enabled so I don't want it to collect my data which I believe they may not do because there is a fiduciary duty for them not to Do It um yeah if they cheat that's a totally different topic but as it's face value I'm believing that they're not going to do it this is all about the cursor settings cool so one another important thing before I move into the next one one another important thing a lot of people love to do it on Visual Studio code is the ability to open a folder from command prompt or a terminal shell whatever that you use the way you can enable that is you can just do command shift p and once you do command shift p you you can just say shell if you search for shell you have four options shell command install cursor command fix WSL install if you're on Windows install code command Visual Studio code command uninstall cursor command from path so if right now for example I'm going to uninstall cursor command from path and U it's asking me to enter the password hopefully I don't yeah so now what happens is I can go to my let's say this one my terminal and I can say cursor Dot and what did I get I got an error that says it does not understand cursor and this is one of the easiest way that you can open a folder which like I always do with Visual Studio code just go here and then say code dot inside the current working directory and it would open it's it's fairly easier so if you were to do that first time when you install it you would not have it command shift p go here start searching for Shell install cursor command done okay it's going to ask me to add password again hopefully yeah now I go back here and then select whatever folder that I want to select like for example I'm iner retro math I'm going to just say cursor Dot and it opens a retro math for me as a folder very simple everything is in relative path quite useful do it so first step cursor settings Second Step make cursor available for the next use so that you can launch from terminal third step go to models and then see what are the models that you want to use what are the models that you do not want to use what what is it that you want to enable so for example this is all offered by cursor like um gbd4 GPD 4 um claw 3 Opus and all the other models now you can add your own model as well if you want the other thing is you can go enter your own APA key so bring your own model bom so you can do bom and you can uh use open AI APA key or anthropic APA key Google AP key I want actually test it with Google AP because at this point there are like couple of calls with Google is free um I tried with uh Google Gemini 1.
5 Pro the experimental version but I was hitting the rate limit but it worked with 1. 5 Flash not with cursor I did it with AER I might make a separate video on it but if you want to use your own model you can just go here enter it and verify it this is one of the easiest ways for you to bring your own model so that you have the capability that you bring in and uh finally if you have got U any feature that you want to enable one thing is cursor people who use cursor like live by something called a composer it's a new feature it's in beta uh it's not available by default so all you have to do is you have to go any enable here so you can go here and enable or you can also do command shift p and then you can search for composer and it will say enable composer or disable composer like for example after I disable composer the composer is disabled here it's inside the features go here enable it and then you have got a bunch of other settings that you want to do you can do it and one important thing is you want to do codebase indexing so that it builds embedding of the code base that you have got you want to enable that as well and the other thing is uh cursor tab a lot of people like tab tab tab tab tab and you can also have cursor tab enabled so you can see here cursor tab is enabled so cursor tab composer and also basically every other thing is like the chat and all the other thing it's a very basic thing you can enable this you can disable this whatever you want to do it here you can do it here so this is a setting that you should pay attention to any new feature that comes in it is inside beta so for example long context chat the claws 200,000 um that is disabled by default AI review that is disabled by default you can enable it and use it I think it depends upon um when they're going to make it full fully available so some is some features are in Alpha some are in beta so you can enable it and then do it hope at this point you're clear about cursor settings now what I'm going to show you is three different ways uh you can make changes to the code I think the first way is quite obvious so what I'm going to do is I'm going to close this I'm going to close this go back to my terminal come out of this I'm going to create a new directory new folder I'm going to create a new folder um I would like to call this let's say dirty page I don't know um maybe a terrible name but yeah dirty page okay so I'm going inside dirty page I'm going to uh cursor inside it cursor also you can uh Alias code to cursor I didn't want to do it I want to use Visual Studio code separately cursor separately so cursor Dot once you do that you got a dirty page so this is a dirty page and uh also another thing is if you do not know you can just select any theme that you like uh for example I've gone ahead with synth wve theme which I used to love when I was in art studio and a lot of other IDs so I'm going ahead with the same syn wave theme so once you go to cursor there are three different ways you can create files one I even though I usually advise you to go ahead with um the the base boilerplate code one of the thing that you can do is you can use composer so command I will invoke composer as you can see here I did command I it is invoked composer so when you do this thing one of thing that you can also do within composer and anything else is you can keep a file here okay and you can call that file here for example let me give you an example so I'm going to create a file here um I'm going to call this um stupid. MD okay instead stupid MD I'm going to say this is a set of rules that you should definitely follow make sure your python code uses tabs not spaces some bunch of other crap okay so what you can do is command I will invoke this thing so what I can do is I can remove this file and I can say hey um and then select the file the file is stupid MD Now I can give further instruction and that will take whatever I have mentioned here into the account so for example let's say youve got a certain way of creating database you can specify it in a markdown file and use it you have a certain way of creating authentication you can create one standard document and then use it across your projects you have a particular style or brand uh design that you want to follow in your frontend application you can mention it in the file and then use it so this is extremely valuable if you iterate and then use it right now it looks like a joke but you can actually do it okay so I'm going to go ahead and uh delete my stupid file inside my dirty folder so I'm going to go ahead and just simply say create a simple HTML CSS JavaScript retro game uh and make sure the game has got uh splash splash screen okay now I have sent this in the composer which is expected to create all the files that are required so as you can see here it is creating index.
html I'm not sure if it is going to also create IND okay it's going to create a pong game and as you can see here it is creating all these things and um okay so accept all and after you accept all and close it you go to index. html it's available for you to use it I'm not sure how effective it is you can just go ahead and then play with that so I'm going to go back here I'm going to do open Dot open Dot and then I've got this here and I'm going to open this with my browser and I've got a redro game start game oh how do I play this seriously um okay with the mouse cool ah this is nice this is nice interesting so almost like an Atari game um rather than uh thear brick game but anyways the game worked so one of the ways to create something is to use the composer the second way to do the same is uh for example I can select all these things do command K and then make some changes for example I can say uh right now this is uh very minimalistic can you make it more colorful probably in U Tron legacy theme okay so I did not mention anything I've just like literally thrown a movie name there which is TR Legacy I hope it understands what do I mean by that and it's going to make code changes so this diff code format is extremely helpful if you're dealing with only one single file uh so composer is helpful if you want to create something boiler plate if you want to create something standard and also it's very extremely helpful if you want to take a lot of instructions and give it and you want to make changes across files command K is extremely helpful if you want to make changes in one file and next one we going to see the chat which is very helpful um again to make changes across the file and also to chat okay I'm going to refresh this oh CH Legacy I like the glow I like the glow enter the grid I like it wow this is actually nice um this is beautiful this is very interesting and there is no score and all those things so what I can do is I can just select command L and then I can say um the game is amazing I don't know why am I appreciating it the game is amazing um and I can say web I can go to the web and uh let's say here I'm going to say Tron legacy design okay um to take some Tron legacy design I to copy this link copy the image address okay want to go back here um right now um there are not a lot of images please use images design inspiration from this um and also also use um let's say I want to give one more documentation here Transformer JS uh Transformer Transformer JS let's see yeah uh let's give this um use web Transformer JS uh to integrate Transformer JS feature that can be part of the game I don't know what this is going to do um make sure to create separate files I'm not sure if it's going to respect it but one thing that you learn is you can give the web and then you can do this and also you can do docs so when you do docs it has got like a bunch of documentation like for example you can say hugging face Transformer official open AI like for example if you were to create a chatbot this is like fairly simply easier for you to create a chatbot because this is already an official documentation other than that like I said initially if you have got local file you can give the file if you have got folder you can give the enter folder you can give code code base and everything that you want so let's give this if I press enter it's going to go if I press command edor it is going to take my code base and then chat with that and then do all those things so it's as you can see here it is searching on the the internet did you see this searching on the internet getting bunch of pages collecting the pages and it has also taken transformer.