Ai Coding Tools

How to Use GitHub Copilot to Code Your First App in 2 Hours

By BTW Team3 min read

How to Use GitHub Copilot to Code Your First App in 2026

If you've ever thought about building an app but felt overwhelmed by the coding part, you're not alone. Many aspiring developers get stuck at the beginning, unsure of where to start or how to write code efficiently. Enter GitHub Copilot, a tool that can help you write code faster and with less friction. In this guide, I’ll walk you through how to use GitHub Copilot to code your first app in just 2 hours.

Prerequisites

Before we dive in, here’s what you need to get started:

  • GitHub Account: Sign up for a free account if you don’t have one already.
  • Visual Studio Code: Download and install this code editor if you haven’t yet.
  • GitHub Copilot Subscription: It costs $10/month after a free trial.
  • Basic Understanding of JavaScript: Familiarity with basic programming concepts will help, but you don’t need to be an expert.

Step 1: Setting Up Your Environment

  1. Install Visual Studio Code: Once installed, open it.
  2. Install GitHub Copilot: Go to the Extensions view (Ctrl+Shift+X), search for “GitHub Copilot,” and install it.
  3. Sign in to GitHub: You’ll need to authorize the extension to access your GitHub account.

Expected Output: You should see the GitHub Copilot icon in the status bar of Visual Studio Code.

Step 2: Starting Your First Project

  1. Create a New Project Folder: Open a terminal and create a new directory for your app.
    mkdir my-first-app
    cd my-first-app
    
  2. Initialize a Git Repository: Run git init to create a new Git repository.
  3. Create an HTML File: Inside your project folder, create an index.html file and open it in Visual Studio Code.

Expected Output: Your project structure should look like this:

my-first-app/
│
└── index.html

Step 3: Writing Code with Copilot

  1. Start Typing: In your index.html, begin by typing <!DOCTYPE html>. Copilot will suggest completing the HTML structure.
  2. Add a Title: Type <title>My First App</title>. Copilot will suggest the full <head> and <body> structure.

Example Code Snippet:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My First App</title>
</head>
<body>
    <h1>Welcome to My First App</h1>
</body>
</html>

Expected Output: Your index.html should now contain a basic HTML structure.

Step 4: Adding Functionality

  1. Create a JavaScript File: Add a script.js file in your project folder.
  2. Write a Simple Function: In script.js, start by typing a function that greets the user. For example:
    function greetUser() {
        return "Hello, World!";
    }
    
  3. Connect JavaScript to HTML: In your index.html, link the JavaScript file:
    <script src="script.js"></script>
    

Expected Output: When you open index.html in a browser, it should load the HTML, and you can test the JavaScript in the console.

Troubleshooting: What Could Go Wrong

  • Copilot Suggestions Don’t Appear: Make sure you're connected to the internet and that the extension is enabled.
  • Code Doesn't Work: Double-check your syntax. Copilot might suggest code that’s not perfect for your context.

What's Next?

After you’ve built your first app, consider expanding it by adding CSS for styling or exploring frameworks like React or Vue.js. Both of these can work well alongside GitHub Copilot to streamline your development process.

Conclusion: Start Here

Using GitHub Copilot can significantly speed up your coding, especially when you're just starting out. By following the steps above, you can build your first app in about 2 hours. The key is to leverage Copilot’s suggestions while still learning the basics of coding.

If you’re ready to dive in, give it a shot—GitHub Copilot may just be the assistant you need to turn your app idea into reality.

Follow Our Building Journey

Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.

Subscribe

Never miss an episode

Subscribe to Built This Week for weekly insights on AI tools, product building, and startup lessons from Ryz Labs.

Subscribe
Ai Coding Tools

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time As a developer, whether you're just starting out or have years of experience, debugging can feel like a neverend

Oct 16, 20265 min read
Ai Coding Tools

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
Ai Coding Tools

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read