Ai Coding Tools

How to Use GitHub Copilot to Write Your First Simple App in Under 2 Hours

By BTW Team3 min read

Comparing tools? See the AI tools tested on the show.

In short

A step-by-step guide for beginners on leveraging GitHub Copilot to create a basic application, showcasing its capabilities and easing the onboarding process.

If you're a beginner looking to dip your toes into app development, GitHub Copilot is like having a coding buddy right by your side. But let’s face it: the prospect of writing your first app can be intimidating. You might think it’s going to take weeks of learning before you can actually build something functional. Well, I’m here to tell you that with the right tools and guidance, you can create a simple app in under 2 hours using GitHub Copilot.

In this guide, I’ll take you through the entire process—from prerequisites to troubleshooting—so you can focus on building rather than getting bogged down by the details.

Prerequisites: What You Need to Get Started

Before we dive in, here’s what you’ll need:

  1. GitHub Account: Sign up for free at GitHub.
  2. Visual Studio Code: Download and install VS Code, which is a popular code editor.
  3. GitHub Copilot: You’ll need access to GitHub Copilot. As of May 2026, it costs $10/month after a free trial.
  4. Basic Knowledge of JavaScript: Familiarity with the basics of JavaScript will help, but even if you're a complete newbie, Copilot can guide you.

Step 1: Set Up Your Development Environment

  1. Install GitHub Copilot: Open VS Code, go to the Extensions view (Ctrl+Shift+X), and search for "GitHub Copilot." Click "Install."
  2. Create a New Project: Open your terminal in VS Code and create a new directory for your app:
    mkdir my-simple-app
    cd my-simple-app
    
  3. Initialize the Project: Run the following command to create a basic package.json file:
    npm init -y
    

Step 2: Use GitHub Copilot to Generate Code

Now it’s time to leverage Copilot to help you write your app. Let’s say we want to create a simple to-do list app.

  1. Create an HTML File: In your project directory, create a file named index.html. Start typing:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Simple To-Do List</title>
    </head>
    <body>
        <h1>My To-Do List</h1>
        <input type="text" id="task" placeholder="Add a new task">
        <button id="addTask">Add</button>
        <ul id="taskList"></ul>
        <script src="app.js"></script>
    </body>
    </html>
    

    As you type, Copilot will suggest code snippets. Accept its suggestions by pressing the Tab key.

  2. Create a JavaScript File: Now create a file named app.js. Start typing:

    const addButton = document.getElementById('addTask');
    const taskList = document.getElementById('taskList');
    
    addButton.addEventListener('click', function() {
        const taskInput = document.getElementById('task').value;
        const listItem = document.createElement('li');
        listItem.textContent = taskInput;
        taskList.appendChild(listItem);
    });
    

    Again, accept Copilot’s suggestions as you go.

Step 3: Run Your App

  1. Open index.html in a Browser: Right-click on index.html in the VS Code file explorer and choose "Open with Live Server" (you’ll need the Live Server extension installed).
  2. Test Your App: Try adding tasks to your list. It should work seamlessly!

Troubleshooting: What Could Go Wrong

  • Copilot Not Suggesting Code: Make sure that your GitHub Copilot subscription is active and that you're logged in to GitHub in VS Code.
  • Live Server Not Working: If you don't see the Live Server option, install the Live Server extension from the VS Code marketplace.

What’s Next: Building on Your Simple App

Once you’ve got your simple app running, consider enhancing it by adding features like:

  • Task Removal: Allow users to delete tasks.
  • Persistence: Save tasks in local storage so they remain after a page refresh.
  • Styling: Use CSS to make your app visually appealing.

Conclusion: Start Here

If you’re a beginner, GitHub Copilot can significantly speed up your learning process and help you overcome common hurdles in coding. With just a few hours and the suggestions from Copilot, you can build a simple app and gain confidence in your coding abilities.

So, what are you waiting for? Grab your laptop, set up your environment, and get coding!

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools
Ai Coding Tools

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them)

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them) In the everevolving landscape of AI coding tools, it's easy to get swept up in the hype. As indie hackers and s

Nov 30, 20263 min read
Ai Coding Tools

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026 In 2026, the landscape for indie hackers and solo founders has evolved significantly, especially with the advent

Nov 26, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026 If you’re a developer stuck maintaining legacy code, you know the frustration. It’s like navigating a maze blindfolde

Nov 23, 20264 min read
Ai Coding Tools

10 AI Coding Tools That Will Save You Hours of Debugging in 2026

10 AI Coding Tools That Will Save You Hours of Debugging in 2026 Debugging can feel like a neverending cycle of frustration. Whether you're a solo founder or an indie hacker, spend

Nov 18, 20265 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for MVP Development

10 Common Mistakes When Using AI Coding Tools for MVP Development As a founder in 2026, you’re likely aware that AI coding tools can significantly speed up the MVP development proc

Nov 16, 20264 min read
Ai Coding Tools

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026 As a beginner developer, you’ve probably come across a ton of buzz surrounding AI coding tools. But with all the hyp

Nov 12, 20263 min read