In this tutorial, you’ll learn how to use Claude Code to build and debug Python projects using natural-language commands directly from your terminal. Unlike browser-based AI assistants, where you copy code back and forth, Claude Code operates inside your project directory. It reads your files, runs shell commands, proposes edits as diffs, and waits for your approval before making any changes.

You’ll start by installing and configuring Claude Code, then use it to build a command-line application from scratch. After that, you’ll return to the project as if picking it up after time away, and ask Claude Code to find and fix bugs. Along the way, you’ll develop a repeatable workflow: plan first, review every change, commit often, and clear context between sessions.
Get Your Code: Click here to download the free sample code you’ll use to build and debug mini-contacts, the command-line contact manager you create with Claude Code in this tutorial.
Prerequisites
Claude Code is a standalone application that doesn’t depend on any specific Python version. Before you start, make sure you have the following tools and accounts ready:
- A paid Anthropic account: To use all Claude Code features, you need either a Claude subscription at the Pro, Max, or Team tier, or an Anthropic Console account with API billing enabled.
- Git: You’ll use Git as a safety net throughout this tutorial, committing between tasks so you can always revert if Claude Code makes an unwanted change. If you’re new to Git, work through Introduction to Git and GitHub and configure your name and email before continuing.
You don’t need prior experience with AI coding tools. This tutorial assumes you’re trying Claude Code for the first time and walks through every step from installation to building a working project.
Step 1: Install and Configure Claude Code
Claude Code ships as a self-contained native binary, with no Node.js, global npm packages, or version manager required. In this step, you’ll install it, sign in to your Anthropic account, and take a quick tour of the built-in commands before writing any code.
Install and Authenticate
Claude Code installs from a single script. Pick the command for your operating system. On Windows, you can install natively in PowerShell or use Windows Subsystem for Linux (WSL), which runs the Linux command:
The installer drops a claude binary into your path and handles auto-updates going forward. Verify the install by checking the version:
$ claude --version
If you see a version number, you’re ready to authenticate. Start Claude Code to trigger the login flow:
$ claude
The first launch shows Claude Code’s welcome screen in your terminal, which looks something like this:

On the first run, Claude Code opens a browser tab for login. Sign in with your Claude Pro, Max, or Team account, or choose the Anthropic Console option if you’re billing through the API. Once authenticated, Claude Code stores a login credential locally and won’t prompt you again unless it expires or you run the /logout command.
Note: Because Claude Code can edit and delete files, only run it inside project directories you’re actively working on. Starting it from your home directory gives the agent access to far more than it needs and will trigger a warning.
With Claude Code installed and authenticated, you’re ready to look at what it can do.
Explore the CLI Interface
Before jumping into a project, take a moment to familiarize yourself with Claude Code’s built-in features. These will save you time throughout the tutorial: