PART 2 : Claude CLI Setup in 15 Mins

genai.mentor · Beginner ·🛠️ AI Tools & Apps ·6mo ago

Key Takeaways

This video demonstrates the setup of Claude CLI, an AI coding assistant, using NodeJS, npm, and an Anthropic API key, with a focus on authentication, API key management, and usage-based billing.

Full Transcript

what is the prerequisite to have this claw CLI into the system? >> Yeah. So now uh we will get into action. Let me share uh okay I also created a GitHub uh G book >> uh so that so far I've been posting videos. So now to help you out I created a GitHub batch uh git book. So let me just share that and then explain answer your question so that it is documented and available for you. So you asked for a prerequisite right uh one NodeJS it should be version 18 and above because it's built on NodeJS uh the interface uh internally it's using u uh that to run the cloud CLA second you need a anthropic API key uh because it will use LLM to call the tokens uh input tokens whatever prompt it need to send it to think whatever prompt it need to send it to action Right. So you need you need to have a anthropy API key so that it can call sonnet models or optus model uh to get that work done. So these are the two prerequisites that you need. Uh sta >> yeah good. So uh just to clarity folks for this cloud CLI it uses an API credit. So there's a small cost associated with it but honestly for the time it saves that is totally worth it. Great Rafy. Can we just move on to the installation like how do we install this uh cli correct so now one point says thank you for pointing that out sa so now what I would advise is you start spending little bit of money so it could be $15 or $5 or $10 without spending some money you cannot get this skill that's what the point I want to make it clear >> promoted yeah Now it's installation time. >> Yeah, it's installation time. Uh first you need to have uh node. That is a prerequisite, right? We will set up the prerequisite first. Yeah. Yeah. So NodeJS. Yeah. So I downloaded the NodeJS. Uh you make sure if you already have a NodeJS you it need to be more than uh 18. So if you download uh freshly then it will be obviously more than 18. options. >> Okay, >> this is the first prerequisite. Second prerequisite, you need to have API key. I'll also show how do you login, setup clots CLA um to get the API key. >> Yeah, that will really help. Yep, it's installed. >> Yeah. So, we'll verify that installed. Okay. I'll go to a command line. Yeah. So note version 24 is there. So which means it is greater than uh 18. So cloud CLA will work. If it is less than 18, cloud CLA will not work. Uh okay. So now uh you need to have npm also. NPM comes by default with this. Uh >> may I know what is npm please? >> Yeah. Node package manager. So it is a distribution uh methodology where you can get your dependencies. Okay. For example, if you build uh one application, you may need dependencies. So you would have worked with Maven uh repository etc. Right? So npm is a node package manager. Anthropic is also coming as a package. So now which package we are going to install? Uh I'll just show you. It is a distribution methodology. Uh so okay now we are going to install uh this package anthropic cloud code so that comes via npm okay 1.6 it should be good enough to get a AP key you need to go to console.anthropic.com to use cloud you need to go to cloud.a both are different cloud.ai AI is more like a chat GPT. Uh many people would have used chat GPT. So it's a chat interface a conversational uh application. Internally it uses um it uses anthropic models. Okay. Let me just log in. This is cloud.ai. This is like a chat GPT. Okay. >> So now here you can have a conversation. But for API you need another one. I'll show you. But before going there here if you see uh you will have plans uh differently. Sometimes you may need to have a package plan here and a subscription there. So this is pro max etc. So maybe as a beginner you can take a pro but if it is necessary you take it. I generate lot of code I have max uh if it is needed you check first you try with um API alone. Okay you go to console.anthropic.com. anthropic.com both are different. You need to watch closely. Okay. So see this. Okay. This URL is cloud.ai. So this is uh nothing but your conversation. So here you can ask your question is like GPT and it has a package. But the other one is for API. So you need to buy credit. I already have a credit. So I can get an APA. I'll show you how to get an APA. Uh so once you come to console.anthropic.com you see this option to buy some credit. So I'll put some $5. Okay. So it is not allowing minimum purchase is asking. Okay. $10. So you need to put your bank card etc. That uh yeah you put $5 or $10. Say $5 is not allowing. You buy credit for $10. >> Okay. After that you generate AP key otherwise it will not work. Um got it. >> Okay. Now you bought credit right? You need to get the APA key. So you can create a new APA key. Uh so let me do that. Okay. I am creating a new key. So I'll just copy it and then save it. Uh we need this key. >> Okay. You're saving it separately. >> Yeah, we need to configure this in the cloud code. So, I'm just uh you need to configure this wherever you want to use. So, now your pre two prerequisites has met. Any question or any doubts? Uh that may come to our viewers. Uh SA >> I think it's pretty much clear because you started from scratch Rafi but if any comments come we can address them. >> Okay. Now we have prerequisite. Now let's go to the installation. Yeah. >> Okay. Installation all documentation is here. Uh I'll add the prerequisite documentation a little more. So go to the command prompt and then run npm uh command uh to install anthropic a cloud code package.pm is the command uh to install the package and minus g is a global and anthropic cloud code is the package. Okay. Now it is set up. It will typically typically take 30 seconds. So it has set up uh uh okay it is telling L.6 is set up and uh loun 7 is there. Okay now to run the upgrade you do this one. Okay that is for npm version upgrade 11.6 to 11.7 but anthropic cloud is set up. Okay now to check what is the version of cloud. Okay, related to I'll start another command. Yeah, cloud 2.0.75 is set up. So now your installation is done. So next step is to do authentication. So that's where your API key and all will be linked. Otherwise you just set up a software but no license is there kind of set uh state currently. For that you need to do another command cloud login. So when you do this the seamless option is it will ask you the authentication in the browser. Uh if that is >> okay if not you need to do manually. Uh let us see what it is. Cloud O login bash if installed but not in p set environment. You need one one more toolkit. So let's download that. >> So our prerequisites includes three things, right? >> Correct. Yeah. Okay. >> But that'll be great to have. No, we'll we'll entirely see the process from the scratch so that any beginner can easily pick it up video will be here and will have documentation. Uh so we started with uh cloud C setup right now we are in uh authentication one more prerequis >> so is there any prerequisites like for this to work efficiently you need to have a minimum amount of RAM or something like that >> if you have 8 GB is good enough or 4 GB is also okay cloud is saying 4 GB as a basic necessary. >> Oh okay now we are authenticating. >> Yeah we are authenticating. Yeah. So now it is going into authentication. Uh right uh you can choose whichever mode you want dark mode or uh or light mode. So let me keep the default one account with subscription. Okay. If you put API key how much token you consume you will be charged. It's called usage based subscription. >> Yeah. Pay as use. >> Yeah. Pay as you use. Okay. Now cloud.ai AI for a pro you may have some uh use token limit max you may have 5x higher than token limit it is authenticating it is asking you okay which method you want to log in whether it is subscription based pro max or team or enterprise. So all organization may have enterprise >> which licensing could be different or if you just want to have usage based uh uh billing then you can you put $10 and then start with you don't need to take um pro max etc. Okay so whether you want to have usage based billing or subscription based package based subscription you can choose. So I would suggest go with the APA usage based billing. So you don't need to take $15 also. Okay. So now let's me show API based usage billing. Then >> we got a $10 subscription right for the API. >> Correct. It's not Yeah, it's not a subscription. It is just uh balance like a prepaid balance >> credits. Correct. It's a credits. Okay. So that you can go and then uh buy credit and you can uh use it. Okay. Now here you can have Yeah. So you can have the credit and then you can uh say now that billing usage uh you can yeah so yeah in this billing you can have the credit right. This is what will be uh like a prepaid account. Uh it will be reduced as you use the tokens. M >> okay so that tokens whenever you use you can come and check how much tokens are you using etc. So in last few months I used 5 million tokens or almost 6 million tokens and which yeah so that gives the experience. So gradually if at least if you reach 1 million tokens then you would have got some skill um so and they charge based on input token output token differently the cost etc. You can see uh which model uh how much they charge uh uh for input token output token each model uh cost will be different that we'll see that in separate um yeah I think it opened uh so did I authenticate or not >> so where do we put the API key? Did we put the API key? >> Hold on. Hold on. So now Yeah. So now if you login like this it will take API key authentication. So now when I give the command right so it opened up a new browser. Uh so here if you see this is the window. So I diverted to explain the difference between these two. So here it came uh it gave me an option uh which organization. So I have one organization default organization individual organization and it is asking authorize. So when I authorize will be used to generate API key on your beh and access your anthropic profile information. I'm going to authorize okay this is the easiest way to do okay build something great authentication is complete. So now in the command uh login is successful. Okay authentication is complete. Uh okay. So now your thing is ready know your account because your credits are getting dynamically updated. Uh so it need to know which uh which authentication are you doing from there it will take credits if credit ran out it will stop working all of that will happen. >> Good. So we are authenticating.

Original Description

🚀 Learn how to use Claude CLI - the AI coding assistant that's revolutionizing how developers work in 2026! Perfect for beginners, students, and professionals looking to boost productivity. You can learn to code 10x faster! In this playlist, step-by-step tutorial, we'll show you: ✅ What is Claude CLI ✅ How to install Claude CLI from scratch ✅ Your first AI-generated project in under 10 minutes ✅ How to work with existing projects ✅ Implementing complex multi step tasks and complex projects ✅ Professional tips to ensure max results Whether you're changing careers, a computer science student, or an experienced developer, this AI coding tool will transform your workflow. 🔗 RESOURCES https://www.youtube.com/@genai.mentor https://www.genai-mentor.ai/books/claude-code 💼 ABOUT GEN AI MENTOR We help IT professionals, students, and career changers master AI-powered development tools. Subscribe to our Youtube channel to learn more! 👨‍💻 WHO THIS IS FOR: - College students who are graduating or already graduated and looking for job - Self-taught programmers - Career changers moving into tech - Junior developers - Senior developers wanting to boost productivity - IT professionals exploring AI tools 🎯 SKILLS YOU'LL LEARN: - AI-assisted coding - Command line tools - Modern development workflow - Automation techniques - Professional coding practices #LearnToCode #CodingTutorial #AIForBeginners #TechCareer #Programming2026 #ClaudeCLI #AItools #DeveloperProductivity #SoftwareEngineering #AICoding #TechTrends2025 #CodingWithAI #DeveloperTools #FutureOfWork #AIPairProgramming #CareerPath
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

This video teaches beginners how to set up Claude CLI, an AI coding assistant, and use it for coding tasks, with a focus on authentication, API key management, and usage-based billing. By following the steps, viewers can learn to use Claude CLI and boost their productivity.

Key Takeaways
  1. Download NodeJS
  2. Check NodeJS version
  3. Install npm
  4. Obtain Anthropic API key through console.anthropic.com
  5. Subscribe to Pro or Max plan
  6. Go to console.anthropic.com
  7. Buy credit for $10
  8. Generate API key
  9. Install cloud code package using npm command
  10. Configure API key and license for authentication
💡 The key to using Claude CLI effectively is to understand how to manage Anthropic API keys and use usage-based billing, which requires a basic understanding of LLM access and authentication.

Related Reads

📰
Never Walk Into a Meeting Cold: Build an AI Briefing Pack
Learn to create an AI briefing pack to prepare for important meetings and conversations, boosting productivity and confidence
Medium · Startup
📰
Best AI Tools for Beginners in 2026: A Simple Guide to Start Using Artificial Intelligence
Discover the best AI tools for beginners in 2026 and start using artificial intelligence with ease
Medium · ChatGPT
📰
Part 4: I Can’t Draw. So I Made an Entire Game’s Art Out of Math Instead
Learn how to create game art using math instead of traditional drawing, a budget-friendly solution for indie game developers
Medium · JavaScript
📰
AI Inventory Rebalancing: The Smarter Way to Eliminate Stockouts and Excess Inventory
Learn how AI inventory rebalancing can help eliminate stockouts and excess inventory, and why it matters for growing businesses
Medium · AI
Up next
I Tested Every AI Tool for Ranking #1 on Google
Adam Hamdan - ABHMedia
Watch →