📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Claude Code for Absolute Beginners: STEP-BY-STEP TUTORIAL

Allie K Miller43:15

Transcription

Friends, this is going to be one of the messiest tutorials that I do, but it's so important that I didn't want to wait until my voice came back, which maybe will be in a week. Who knows? Uh, I wanted to show a tutorial on cloud code. Why? Because it's powerful and because really the majority of uh demos that I see are from engineers or from what I would consider very technical business people. Um, I'll I'll link uh Lenny Richitzky's newsletter. I think I think he did a wonderful job laying out non-technical uh or non-engineering use cases. And so this will be in addition to that. If anything, this will actually be a more basic tutorial of map for people who have never used cloud code, don't really even know what it is, um have no idea how to set it up on their computer. And so I'm going to like walk through the docs. Um, I'm going to explain how to set it up. It's already set up on my computer and I can't uninstall it. So, there's going to be some steps that are going to be missing, but hopefully I can grab a friend who hasn't done it and record that as well.

Okay, Claude Code. Claude Code is something that is going to run actually on your computer. So, this is not claude.ai where you're chatting back and forth with a web-based chatbot and this is not like a mobile app, though you can access cloud code on some of those things. Um, the thing that I want to show off is the fact that it can talk to your actual computer, talk to your file system, talk to your system settings, um, analyze your activity monitor to be able to see your actual computer and not just things that happen to be on that website right in that moment that you happen to attach or that happen to be in the uh, historical part of that conversation.

So you first have to install cloud code. Um if you go to claude docs, you can just copy this URL docs.cloud.com. Um you can read this whole overview. I just want to jump us kind of to this quick start guide. Um there are two ways to install it. There is a uh kind of older way and newer way. So this is an option. This is using NodeJS. You just have to install a more recent version of Node.js. 18 is just the version. So you can download this. It takes like two minutes. You download it and then you would run this command, which we're not going to do. What we are going to do is come down to and I have a Mac, but if you have a a PC, you'd use this one or this one. uh for MacOSS which is what I'm running. I'm going to copy this sort of statement and I'll explain at least the parts that I know. Um curl is client URL. So that's basically like hey you know code like I'm about to give you a URL get ready and it's going to like point to something. And so this is kind of like you saying hey I'm about to link you to something. Um this like every single letter is a setting uh in how it manages that URL. So how it goes to the URL and kind of navigates. Um F is like fail silently. It's just a bunch of settings honestly. Uh this is never something that I really look into. Uh because I'm also not an engineer. Okay. The this URL is where it's actually going to go. And um this vertical line right here uh is called a pipe. So basically anything to the left of the pipe is like go do this thing and then anything to the right of the pipe is like and put it there. Uh so bash is is like a shell that can then do some processing. So I'm basically saying, hey, I'm about to give you a URL. Handle it in this specific way. Okay, great. Here's the URL. Put it here. Cool.

So, I'm going to copy this. The next thing that I want to do is I need to access a terminal. A terminal is where you can, uh, manage code, type in code, talk to your computer, and so, um, you can pull it up in a few ways. You can open up Finder, or if you're on a Mac, if you hit the little flowery command button to the right of the space bar, you hit that, hold it down, and then hit space, you'll get a uh, Spotlight search that pops up. And so I'm just going to type in terminal. If you're in uh if you're on a Mac, this terminal will already be in your Mac. You don't have to download anything. There are way fancier terminals like iTerm or Weserm. Uh for the most basic beginners, we're just going to start here with what Steve Jobs gave us. Uh, so you're just going to hit terminal, and it is going to open up this blank terminal. Uh, it looks scary cuz it's not that pretty. There's no buttons. Uh, there's no color. You can switch it to dark mode. I still prefer light mode. Um, it's going to give you very little information. It's really just like the name of my MacBook Pro. Okay.

If you have not yet installed it, you're going to paste in that thing that we just copied. You're going to paste in that curl command and then you're just going to hit enter on your keyboard. What you'll see after you hit enter is that it'll actually go through the installation process. Um, if you have already installed it, uh, then or excuse me, if you have not yet installed it, it'll ask you a bunch of questions mostly in security and privacy. Hey, do you want to enable this? Hey, is it okay if we do this? Do you promise that you trust us? Are we friends? And you just have to decide whether you're going to say yes to all those questions or not use it. Uh, so I said yes to everything. Uh, it is up to you. Evaluate at your own risk level, risk tolerance. Okay.

So we see that with that native install option, literally all I did was copy, paste, enter, and you can see that it is successfully installed. Installation complete. And yet we still don't really have uh information. This says like run claude help. And you're like how do I even run something? All you're giving me is like a text box. So if I were to type in what that says and hit enter, that's what running is. Run means type enter. Uh, it's it's like texting. I feel like I'm like texting a a laptop. So then I get this gobbledegook and you're like, "What am I supposed to do with that?" We're going to skip over all that. I just wanted to show you that if you follow its own instructions, you're like, "This is not meant for me." All we're going to do is just hit the word, type the word claude, and hit enter. And what you'll get back is um and I'm going to say that I trust it. You'll start to get back something that's very lightly visual. There's like a little uh robot dude. Uh and then you'll get um uh prompts to log in. You'll go through the login process. It will give you options to either go via Claude or Anthropics APIs. Uh I would go with Claude again for ease. So I signed in with Claude. I It basically kicks you over to a website. You log in, it kicks you back. Takes two seconds. Um, and so you can see here that it says Cloud Pro because the account that I connected it to is a Claude Pro account. Okay.

So, it's giving you one potential uh example, which is like, how does file path work? We're not going to do that. Why on earth would we point to that as a first question? Okay, I'm going to go to my handy dandy uh tutorial plan that I have thrown together that I just want to show you what it can do. So, as I said, it can help you with your actual computer. And so, what I'm going to do is drag over a window. This is Sorry. Um, this is my finder. So, this is where I can see all my files. I hid all my files, so you can't see what clients I'm working with. Uh, but I said hide it all. I hid it all. So, if I come here and I say, uh, create a new folder on my desktop called Oh my god, Ally. Uh what I love about claude code which the team always thinks of like fun little ways to make it fun. Um if you saw there was uh well I'll call it out when I give it a longer task but basically it comes up with these fun little like jirens that's like canoodling whispering contemplating and so it just has this like tiny little model that's coming up with that. It's just a moment of fun. Uh great. So it's like I'm going to create a new folder. Are you good with that? Do you want to proceed? Um mkdir is make directory. So this is basically saying hey go ahead and create make it a directory of users me desktop that file just like when you're like trying to hunt down a file on your computer where you know where it's nested. So this is where it's basically saying hey do you want me to nest it like this? Do you want to create a folder? I can either say yes, yes and always, I want you to do this forever and always this type of command without asking any permission or no, you totally got that wrong and I'm going to fix it. Um, for now I'm just going to say yes. You can either hit the digit one or hit enter. Uh, and so I just hit the digit one and you can see on the left it immediately created that folder and it then tells you back in your terminal, done, I've created the folder. Awesome. You don't really have to talk to it. Uh, it just makes me smile. Uh, awesome.

Uh, go ahead and write a short story about an anxious anxious perfectionist robot and add that to the folder we just made. So you'll note I'm not actually specifying and added to this folder. I'm not providing the directory. I'm speaking to my computer management in natural language. And as it's doing this, here's the choreographing. There's that little model. As it's doing this, I want you guys to feel not like feel the AGI. I want you to feel this movement toward AI as an operating system. The fact that it can manage files on my computer, the fact that I can talk back and forth to it, uh, in not just language, but also actions. Um, the fact that I can approve actions immediately and it'll do it. So, if I were to open this right now, you can see there's no document yet because I haven't approved this plan. Um, for now, I'm just going to say yes. The next one I'll do allow all edits. But now immediately you can see that this txt file is in here. And we get the exact same thing except I need it in a word doc. So, you can go back and forth with file types. Um, and then it will let's see. Yeah. Uh, it added a second file that is in doc x. And if we open that up now, the perfectly imperfect robot and it looks like a normal word doc. Okay. I might say actually let's take a look at that story. Unit 88 91. Let's go there. Blah blah blah. Scanner is fine. sevens are actually on page eight. Okay, cool. So if we say like change uh character name of this to Beatatric um and I do that then it'll actually edit uh the file itself. So I can ask for file edits. I could have said um do you want uh I want it as a new version. and save it as version two, whatever. And um you can see that the sort of pink color is the before, the green is the after, and the highlighted the darker part is the actual edit. And so it's very transparent about the edit that it's making. And so I'm going to say yes. And actually, I'm going to switch it to this yes, allow all edits during this session. And so I'm just uh going with the up down arrow to navigate between these options settling on to and I'm going to hit enter. So now anytime that I ask for edits it's just going to do it. So it is going to update that document and then when we open it we will see beatatric instead. I don't see any unit I see beatatric beatatric phenomenal. Okay.

So now that we have edited the story and saved it, I'm going to switch into some like data analysis. So if I said um create a CSV in that same folder with fake bike sales data shimmying, it's just like Claude, you guys are so fun. Um, okay. Also, you can kind of see that it's counting up. Hold on. Sexy. Okay. It's counting up the amount of tokens that it's using. If you're trying to be very cost conscious and you're using API, um, some people might, um, check in on token usage. Honestly, it's a couple bucks. I wouldn't really worry about it. Um, unless you're coding very large scale code bases, uh, then it can quickly get into the thousands of dollars. But for little things like this, genuinely don't worry about that token count. Um, if you see that it's running a muck, if you're like, I asked you to write two lines and you're already at a thousand tokens, um, you can just hit the escape button and it'll stop everything that's happening. And what I love about this uh cloud code is that I can already cue up my next prompt. So I already know what I'm going to have it do. Create an interactive dashboard to view the sales data in an awesome way. Uh, we can go ahead and open that up just to double check that it made some nice fake data. Cool. Cool. So funny. Uh, whenever you see these names in particular, like Sarah Johnson, Michael Chen, Emily Rodriguez, you know that someone asked Claude to come up with with characters, they always default to those. Uh, okay. Creative interactive dashboard to view the sales data in an awesome way. While it is doing that, I'm going to show you what it looks like to cue up the next prompt. So, I'm going to hit enter on this. Uh, great. Now, turn that dashboard uh into a presentation style still in HTML, but allow me to click left and right to navigate between slides. So, I hit enter on that before the first ask was finished. So you can see that because I already hit enter, it queued up that next prompt and it is already working on the second prompt that I gave it. It's already working on that like left right navigation sort of thing. Um, and you can see it right here. I'll transform the dashboard into a presentation style. I can cue up things especially knowing you know the order of operations that I might want to go in. Uh, okay.

So, it says, let's scroll back up. So, I said create that interactive dashboard. It wrote all these lines. It wrote out the code to be able to build out that HTML page. And if I were to open this, it's going to open in a web browser. And it opened on my other Okay, it's missing all the data that we just gave it. So, I'm going to say the dashboard is pretty, but you forgot to include all the data from the CSV. I want to visualize that CSV bike sales data. And I don't like I wouldn't actually have to have said I want to visualize that CSV by sales data. Um, it kind of already knows because we're in the same conversation which ones I'm talking about. It is spazzing out. That terminal decided to spaz out. I'm not sure why that hasn't happened to me. Uh, but what we're going to do is just start a new one. That's how you do it. Then we're going to say yes, we trust it. Okay. So now because it doesn't really remember what we were talking about, you can either send it to that specific and I bet if I don't give it the full Let me just see this before I talk through what just happened. Yeah, but I want to see if it finds it. Okay, so basically I I like tricked it. Uh, no. Let's see. Okay, let me explain what I'm doing before I do this. Um, CD is change directory. So, it means that you're like hanging out in some sort of folder or uh area of your computer that it's pointed at. And change directory is like, okay, leave this area, go to that area. Usually, if you're saying change directory, you have to provide the whole directory, that long thing of like users, Allison Miller, whatever. Instead, I just wanted to see what would happen if I just gave it the actual folder name. And it basically said like, I have no idea what you're talking about. And it gave me an error. And then it said like, let me see what's available overall. And then it says, I don't see a directory, which makes sense. And it says, do you want me to create it? Do you want me to search for it or check if it might have a different name? I'm going to say two. And I want to see if it can find this uh folder that we had just created. And you can see right here that it found it on desktop and that it's creating the actual uh directory. Uh, brilliant. So I I can even point it generally at a file or a folder and I probably could have typed it in, you know, I probably could have said, "OMG GG Alley," and it still would have found it. Uh, okay.

So now we are in the right folder. We're we're back to where we were. Um, and just for well I don't have to control it myself. I can say delete the HTML file in the folder. Found one file. Good. Deleting it. Yeah, now it's gone. Perfect. use the CSV file and create create an interactive dashboard um to visualize that bike sales data. Cool. So hopefully this will um work and then the goal after this. Okay, I've got another one that I'm actually going to queue up on my side. Uh do I want to? Sure. a lot of these um Oh, I wrote Python. Hold on. So funny. Like what I have found is that I just keep hitting enter like assuming that nothing really looks terrible. Like this is just in Well, it actually tells you what it's doing. Um, it's installing two libraries. it like created code to be able to build the dashboard and now it will use that code to create the dashboard. Let's see. Great. Um, you'll also see that like I'm only hanging out in one terminal. Uh, I could have multiple terminals running. I could have six on my desktop. And if I'm not just assigning little like one minute things here, uh if I'm assigning longer tasks or if I've automatically approved things, which I haven't done in these examples, then I could let six things run a muck and it's like having six interns. Okay, so if I open this, hopefully this HTML will look nice. Not sure why San Francisco's written diagonally, but cool. Okay. So, electric glide 3 3,000. I guess I sold a lot. Uh, awesome. And so, now I want to say um, uh, what do I want to do? Uh, turn that HTML dashboard into a presentation where I can navigate. Okay. Um, I could have also given it like I want HTML, JS, CSS, like I could have special um, specified the format that I want it in or where I want it to pop up. Um, but you can see that it's walking me through the steps. Awesome. And again, if I am like, oh my god, don't do that. And by the way, if I say now make it version that looks totally like a McKenzie presentation. So I can cue up the next task. So it is still working on that first presentation. I've then queued up the Mackenzie one. And you'll see I had a typo on the word version. There we go. And it's going to handle it totally fine. Just like when you prompt with a typo. It's totally fine. Okay.

So, we're just going to keep saying yes to these things. Um, again, I like it when it prompts me with each of these just as I'm showing people. When I'm working on my own, I just approve things, especially if it's like create a presentation. Very low risk. Um and while it is uh figuring that out hopefully we will then get this sort of new files make them HTML files so I can immediately show them in this client. Okay. Um, great. So let's give that a little bit of time uh to run through and then we can check back in on it. But I've chatted with you know sales people where they are creating demos. This is even preclude code that they were creating demos or presentations five minutes before a meeting. The cool thing about claude code is that you don't have to upload a bunch of documents into claude. you could point it at an entire folder that you have for that one client. Like if you if you're working with Home Depot or whatever, you have an entire folder with like Home Depot sales, Home Depot corporate values, Home Depot strategies, the the sales conversations that you had with them. You could then just basically say, review all files in the Home Depot folder and make me a new presentation that blah blah blah. Uh, okay. How are we doing? Still doing all the Python stuff. Hopefully, open bike sales dashboard. Ah, it re it overrode it. Okay, whatever. I could have said make a new one. Make a new one. But this is our McKenzie style bike sales. Oh, it's so good. It's so good. Um, the HTML file, blah blah blah. I wanted two versions. Give me both. Okay. What I'm hoping that this will actually do is it'll go back to the code that it wrote for the first one and that it'll be um done very quickly. Okay. Um, we're just going to keep hitting enter under enter enter. All right, this presentation colorful one should be the non Mckenzie one. Uh, and so you get the colorful one. Awesome. Uh, and so now we have both of those saved into the folder. Um, I just want to show one other um one other sort of task that you can do which is like my computer is running super slow. Give me three files I could potentially remove. Don't remove them. Not that I think it would. Okay. Um, and so he wants to hide my my father's photos from Africa, which I would never. Uh, okay. So, it is going to kind of find those. Uh, it's going to flag certain things. Sparkle Project, I think, was a coding thing that I did forever ago. Uh, Cap Cut makes sense because those are huge videos. And so, I could say, "Okay, great. Delete those." Uh, I could say, uh, review my activity monitor. What is stealing the most? I am Cool. So, Microsoft Teams, which I always complain about. Uh, Firefox. Great. The biggest culprit is Firefox. So funny. Like the way that it yells back. I asked it some other question forever ago and it was like, "This is your problem." Uh, cool. And so it gives you advice, which I also love. Um, maybe one more which I moved a file to my desktop which is just called no code one. Do you see a JPEG uh on my desktop like no code something? So again you can kind of talk to it in fico language. Perfect. It found it just for fun. We're going to terminate that. Start a new one. Uh f we have to include. Yeah. Uh, find the no code JPEG on my desktop and down res it. Down res. Downscale. Compress. Whatever. Uh, if you Oh, that's funny. Just the way that it's searching is very funny. It'll find it there. That's like that's the most magical part is when you like talk about file names in natural language. Uh, the image is currently 40% And again you can always switch to option two. Cool. You can see this one is resized and it's tiny. Yay. So fun. Um, you could also like like I've seen people take um, let's see photo of receipt. Uh, that looks like a fake photo. Real photo. Save images as great. turn my Walmart receipt on my desk on my desktop into an expense report. And so you could imagine like all these things I'm pointing it at one file. You could imagine pointing it at an entire folder that is filled with receipt images or an entire folder filled with PowerPoints. could point it to an entire folder and say, "Review all of my, you know, sales presentations. What are they missing? Review all of my um client contracts in this folder. What risks are we not thinking about?" Okay, we are going to approve. And so what I'm actually testing here and I could have specified like what um um I could have specified what OCR technology like what is actually going to read the receipt itself but it created a markdown file. So I didn't specify uh how to read it or what format to put it in. I just said make it an expense report. Uh, and it looks really nice. Great. It took I just think like this is the more impressive bit. It took what is a uh technically an unstructured piece of data in the sense that it is an image um and it was able to apply OCR aka read the text that is on the receipt. It was able to pull out the vendor. it was able to pull out the address. Um, and so it was able to turn unstructured unstructured with structured stuff written on it into structured. Uh, and so I've seen people like, hey, go through this entire folder and turn it into a an expense sheet. Um, okay.

So, just to review a couple last tips when we go to the terminal. Uh, last tips. So, if you go to um shift tab, you can switch between different modes. So, right now I'm holding down shift and hitting tab. You can switch between mode. accept edits is um the the automatic like yeah, I'm going to approve it no matter what. Plan mode is like don't do anything. Just think about it and tell me what you're going to do. Um, and then you can cycle to the to the help thing. If you do um where's tab? If you do tab, if you see kind of in the bottom right, I'm tabbing between thinking off and thinking on. Any sort of thing that's like write me this story and save it or um, you know, edit this file name to include the word final at the end, you don't need thinking on. If you're doing really large code bases, if you're reviewing 15 documents and you wanted to think really thoughtfully about contract reviews, I would hit tab and toggle thinking on. Uh, I already showed you that hitting the escape button when something spazzes out, um, it'll stop it. And if it still is spazzing out, which we did experience, you're just going to hit the exit button, terminate that terminal, and start over. Um, and then again, my like favorite favorite thing that Claude.AI doesn't have is the ability to queue up all of these different prompts. And you could literally queue up 10 different tasks, whatever. It's so so cool. Um, things to flag. Uh, number one was the permission setting and data privacy. So, you have to determine that for yourself. I cannot tell you what to do there. Um, I can tell you that some people are like, "I'm auto approving everything. I don't need to review." I'm not like that. I need to like see it do it once. I need to know like what its fail rate is before I automatically bless it to do something. Um, it's moving through kind of progressive trust. You'll see even through the login process that it tells you like, "You sure if I have this access? You sure if I get this access?" Uh, and so I love that you can um point it to only have access to certain directories. So if you're like, I don't want it to see my entire desktop. I only want it to see this one little folder that I'm willing to play around with. And so you can do that. Uh, basically you're adding a directory inside of of cloud code. You can remove access if you've gave it access to two directories and you want to take one away. Um, Um I think if we also there are a couple of these like backslash uh things. So again all I did was just type in slash and so you can see all of these um different commands that you can use. Um clear is really nice especially if you are about to switch tasks and you don't want to delete the terminal or terminate the terminal and restart it. um where it just clears your whole conversation and doesn't have as much uh memory dragging it down. Um, you can also go and do agents, which we didn't get into in this, but what I love is that if you do backslash agents and create a new agent, um you can basically create um like ready ready, it's like a GPT. It's a ready-to-use prompt. Um, but you can also give it tools. So if I say yes to create a new agent, uh, if I say that I want to do it at a project level, let's say, uh, always generate with claude, unless you're like Andre Garpathy, uh, cool. Create a new agent. And then I'm going to say an agent that turns a Word doc into a PowerPoint. Okay. So I gave it I gave it a very uh vague description and it is going to in the same way that we've seen it in cloud console um or GBT creation um where it's configuring itself that you can give it a very vague prompt and that it will generate its own prompt for that um and when needed also generate its own code. So, one of them could have been uh like that uh image extraction sort of thing, right? That was a little mini script that it wrote to be able to read the receipt and do something with it. That could be an agent. Um tool selected. I mean, this doesn't actually matter, but okay. Al to selected. Continue. Oh, there. Continue. Sorry. Um, select model. Um, sonnet is fine. Um, if you were working on something that was tiny, I would use haiku, but I would actually default to sonnet. Uh, you can set it as a certain color. We're going to make it blue. And you can see that it wrote the description. It wrote a system prompt. It gave access to all tools, which again I could have um uh changed. And then press S or enter to save. We're just going to say yep. So now I have saved it. So you can see that in agents uh I just created this doc to PowerPoint converter. Boom. Great. Um, so now I can hit escape. It'll show me that I've created that document and then I can say like doc to poweroint converter and any document on my cool. This is looking at my desktop. Hopefully, it'll find zero. Sure. Let's turn a receipt into a PowerPoint. Um, yeah. So, you can create a bunch of go-to agents. Um, for the most part, it might be like a common prompt that you're running. So, if you're always doing something on top of like a um uh folder like review this and come up with suggestions, then that might be um an interesting one. Or uh review this, you know, invoice and generate uh or review this S. So, and generate an invoice. Those sorts of of commonly used ones. You might want to start there and then be able to build up. Um, okay.

This was a 40 minuteish tutorial on cloud code. Um, just again to to show if I hit well maybe I'll let this if I hit escape um you'll see this interrupted. What should clock do instead? It's like it thinks that it like got hit and it needs to fix its problems. Um, so if you want to terminate this, you're just going to hit this X button. Do I want to terminate it? Yes. And yeah, that is claude code. Uh, we went through so much in so little time. Uh, we went through how to uh initialize it, how to like actually install it, how to kind of set it up and making sure that you are reading the permission requests. Uh, the fact that you can point it at specific directories for your whole computer. That's at that stage. Uh, we talked about how to open up the terminal. We talked about how to talk to Claude. Um, we talked about how to create new files, edit files, create versions, change file names, uh, create different file types, create synthetic data like the bike sales thing, uh, create dashboards, create powerpoints. Um, I gave some examples about reviewing entire folders for advice or for edits. We even showed how to create an agent. You could have agents that again take action and not just like turn this text into this text. Um, but that is cloud code. I think that there are so many use cases out there for non-engineers. It's not the sexiest uh user interface that I've ever seen. Terminals can be very overwhelming and can feel very inaccessible. But the last hack that uh I I always end these tutorials on is when in doubt, ask Claude. Literally, you can just highlight the entire terminal conversation and just hit Apple A, grab that whole thing, Apple C, copy the whole thing, go into the cloud that you know and love, cloud.ai, or even go into chatbt, whatever, paste it, and go, "What the heck's going on?" Or, "It's telling me this error. How do I fix it?" or all I want it to do is do this agent. Like, how do I tell it to do that? Uh, and you can also talk to it within the terminal, but again, if ever you're just like, get me out of here, you can go to the safe place of the pretty web page and ask for that help and go back into it. My hope is that every single one of you is going to be able to complete all of those tasks that we just showed. When in doubt, hit escape, terminate the terminal, start it up again, and ask Claude or Chad GBD or a friend uh for help. My name is Ally K. Miller. I'm the number one most followed voice on AI business. I think I've probably been giving too many workshops the last month and maybe I should uh drink some more water, have some more cough drops. But talk to you guys later. Bye.