Running Claude Code for the first time
Learn how to run Claude Code, configure authentication, authorize projects, and use its command line interface.
Lesson Content
You can run the claude command from any project directory. I recommend setting up the project first before continuing. I just set up a vanilla install of Laravel, a popular open-source framework built on PHP. If you don't want to run claude against your home directory, change into your project directory first, and then run the command.
The first time you run claude, it sends you through a few one-time configuration options. The first is the theme -- go ahead and pick the one you like.
Next, it asks how you want to authenticate with the Claude APIs. You can authenticate with a subscription, with an API key, or through a third-party provider. A subscription is the most common choice, and it's the one I'll use here. If you don't have a subscription yet, go ahead and grab one before continuing.
Choosing to log in opens your web browser, where you can sign in with your existing account -- I'll continue with Google. Claude then asks you to confirm what access Claude Code should have to your account. Click "Authorize", and you'll see a "Login successful" message back in your terminal. Tap Enter to continue.
Claude Code then reminds you that it can make mistakes and that you should be careful with security. Tap Enter again.
The last configuration step covers your terminal setup. For now, I'll proceed with the recommended settings. If you want to revisit these options later, you can run /terminal-setup from inside Claude Code.
That completes the initial configuration. But because we're inside a specific project directory, Claude Code runs one more safety check to confirm this is a project you created and trust. Take note of what it tells you here: Claude Code will be able to read, edit, and execute any file within this directory. If you're comfortable with that, answer "Yes, proceed".
Any time you see a list of numbered options in Claude Code, you can use the up or down arrows and tap Enter to make your selection, or just tap the related number -- which is a bit quicker. I'll tap 1.
You will then finally arrive at the Claude Code command line interface. It tells you the version of Claude Code you're working with, how you're logged in, the model and context limits available to you, the plan you're on, and any additional news or announcements tied to your Anthropic plan.
At this point, you can start typing commands and see what happens. To exit, just type exit.
Join the discussion!
Comments
Want to comment on this lesson?
Log in to leave comments.