← Back to lessons

Build a Real Tool

Create a command-line tool that solves a problem you actually have. Something you will use tomorrow.

Day 2 · 30 min

01

Pick a Problem

You have built a website. Now build something different.

A command-line tool is a program you run in your terminal. It takes input, does something, and produces output. No browser, no interface, just function. The best tools solve a specific problem you have right now.

What to build

Pick one of these, or invent your own:

  • A quick note tool. Add notes, list them, mark them as done.
  • A daily journal. Type an entry, it saves it with today’s date.
  • A bookmark organizer. Save URLs with tags, search by tag later.
  • A file renamer. Give it a folder and a pattern, it renames files in bulk.

The specifics do not matter. What matters is that you pick something you would actually use tomorrow.

This is a second project

Your website lives in the my-site folder. This tool gets its own space. Close Claude Code if it is running (/exit), then:

cd my-tool

Wait, that folder does not exist yet. No problem. Start Claude Code first:

claude

Then tell it:

Create a new folder called my-tool. I want to build a command-line tool in it.

Claude Code creates the folder. Same workflow as the website, different kind of project.

02

Build the Tool

You have a problem and Claude Code is ready. Describe the tool.

The prompt

Be specific about what the tool does. Here is an example for the quick note tool:

Build me a command-line note-taking tool in the my-tool folder. It should:

- Let me add a note with some text
- List all my notes with numbers
- Let me mark a note as done by its number
- Store notes in a file so they persist between uses
- Show a timestamp next to each note

Keep it simple. One file, no external dependencies.

Notice the details: what it does, how it stores data, the constraint (one file, no dependencies). The more specific you are about the outcome, the less guessing Claude Code has to do.

Watch it build

Claude Code will create the file and ask your permission. Approve it.

Test it

Once Claude Code finishes, ask it to run the tool:

Add a note that says "Learn Claude Code" and then list all notes

Claude Code will run the commands and show you the output. You see the tool working without ever typing a command yourself.

Try a few more:

Add another note that says "Build something cool" and list everything
Mark the first note as done and show me what is left

If something does not work, tell Claude Code what happened:

When I asked you to list notes, it showed an error about a missing file. Fix it so the tool creates the storage file automatically if it does not exist.

Claude Code will read the error, read the code, and make a targeted fix.

03

Improve It

The first version works. Now make it better.

This is where building with Claude Code becomes genuinely powerful. You do not need to understand the code to improve it. You describe what you want, and Claude Code handles the implementation.

Add features

Tell Claude Code:

Add a search feature so I can find notes containing a specific word
Show how long ago each note was created, like "2 hours ago" instead of a raw timestamp
When I run the tool with no arguments, show a help message that lists all available commands

Each prompt is a new feature. Each feature takes seconds. Ask Claude Code to test each one after building it:

Test the search feature by adding a few notes and searching for one of the words

Fix edge cases

Think about what could go wrong:

What happens if I try to mark note number 99 as done when there are only 3 notes? Make it show a helpful error instead of crashing.
What if I try to add a note with no text? It should show a message asking for the note text.

The rhythm

This is the same loop from your website project: describe, build, test, improve. It works for a note tool. It works for a full application. The complexity of the project changes. The workflow stays the same.

You describe what you want. Claude Code translates that into working software. You verify the result. You iterate.

04

What You Learned

Step back and look at what you just did.

You built a working command-line tool from a conversation. It runs on your computer. It does something useful. You can keep improving it. You did not follow a tutorial, copy example code, or study a programming language first.

Two projects, one workflow

You have now built two things with Claude Code:

  1. A personal website (in my-site)
  2. A command-line tool (in my-tool)

The projects are completely different, but the workflow was identical: describe what you want, approve the actions, test the result, iterate. This workflow applies to anything you build.

What this means

You can build software. Not because you learned JavaScript or Python. Because you learned to describe what you want, verify the result, and iterate. The programming language is an implementation detail that Claude Code handles.

This does not make you a programmer in the traditional sense. It makes you something new: someone who can build real, working software by directing an AI. That is a genuinely new capability.

What’s next

Both of your projects work, but only on your computer. In the next lesson, you will learn how to customize Claude Code itself: your preferences, your rules, your workflow. Then in the final lesson, you will put your website on the internet with a real URL.