Chapter 1

Set the ground

Create the repository on GitHub, clone it in the terminal, open it in your chosen tool, and install the GitHub CLI.

Create the repository on GitHub

The goal of this chapter is not to write code. It is to go from absolute zero and set up a project ready to be planned and executed with an agent.

That is why the start is manual on purpose. Before involving AI, you create the repository on GitHub yourself. This helps you understand where the project originates, what its official URL is, and how your local folder will connect to the remote.

Open GitHub in your browser and follow these steps:

  1. Click New repository.
  2. Choose a short, clear name such as my-hn-newspaper or [REPO_NAME].
  3. Add a simple project description.
  4. Check Public if you want to publish later on GitHub Pages.
  5. Leave Add a README file, Add .gitignore, and Choose a license unchecked. You will create these files later with the project open and with more context.
  6. Click Create repository.
Simple example

Name: my-hn-newspaper
Description: Live news newspaper with the top Hacker News stories, published on GitHub Pages

✓ Checkpoint:

The repository exists on GitHub and you can see its clone URL.


Clone in the terminal

With the repository created, the next step is to bring the project to your machine. On GitHub, click Code, copy the HTTPS URL, and run the commands in your terminal.

In the terminal
cd ~/projects
git clone https://github.com/your-user/[REPO_NAME].git
cd [REPO_NAME]
git remote -v
git status

If the repository is empty, that is normal: git clone will create the folder and git status may show No commits yet. The important thing here is to confirm that the local folder is linked to the correct repository on GitHub.

✓ Checkpoint:

The repository is cloned on your computer, git status works, and git remote -v shows the origin.


Open in your chosen tool

With the local folder ready, open that directory in the tool you will work with. The important point is to open the project root, not individual files.

AI development tools fall into three main categories, and all work well for this project:

  • AI-integrated IDEs (Cursor, Windsurf): complete environment with editor, terminal, and agent in the same place. Good choice if you want everything integrated.
  • AI CLIs for the terminal (Claude Code, OpenCode): agent that operates directly in the terminal, reads and edits files, runs commands. Good choice if you already have a preferred editor.
  • IDE assistants (GitHub Copilot, Codeium, etc.): inline suggestions inside IDEs like VS Code or JetBrains. Works, but requires more manual context management.

Any of these categories will work. What matters is that the agent can see the project root and operate on its files.

✓ Checkpoint:

The cloned folder is open in your tool and the agent can see the project root.


Bonus: install and authenticate the GitHub CLI

This step is optional but well worth it. The GitHub CLI (gh) lets you access GitHub directly from the terminal: authenticate your account, open repositories, view issues, and work with PRs without leaving your development environment.

The most common installation paths are:

  • macOS: brew install gh
  • Windows: winget install --id GitHub.cli
  • Linux: use the official packages for your distribution in the GitHub CLI documentation
Authentication in the terminal
gh auth login
gh auth status

In the interactive flow, the most common sequence is:

  1. Choose GitHub.com.
  2. Choose HTTPS as the Git protocol.
  3. Select browser-based authentication.
  4. Complete the login in the browser when GitHub opens.
Optional after login
gh auth setup-git

This command configures Git to use the GitHub CLI credentials. If it works, gh auth status should show your authenticated account.

If you finished this chapter, you have done the essential setup: created the remote repository, connected the local copy, and opened the project in your tool. In the next chapter, you will create the three planning files that will guide the agent: ROADMAP.md, AGENTS.md or CLAUDE.md, and DEV_PLAN.md.

✓ Checkpoint:

Repository created, cloned, and open in the tool. Ready to plan.

Before leaving this chapter

Save your work in Git before moving on. This gives you progress checkpoints, history, and safe rollback points.

git add .
git commit -m "[summarize what changed in this chapter]"
git push

Replace the commit message with a short, real summary of what changed in this chapter.

Chapter 1

0 of 3 checkpoints

Complete all checkpoints to unlock the next chapter.

Next up: Plan with the agent
Back to overview

Want to go deeper?

Articles

Community

Ask, answer, get unstuck

Use this space to ask questions about the lesson, share examples, and help other people understand the topic.