Ai Coding Tools

How to Create Your First Project Using GitHub Copilot in Just 2 Hours

By BTW Team3 min read

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

In short

A step-by-step tutorial for beginners to build a simple application with GitHub Copilot's assistance.

If you’re a beginner looking to harness the power of AI for coding, GitHub Copilot can feel like a game-changer. But let’s be real: diving into AI tools can be daunting, especially if you’re unsure where to start. In just two hours, you can set up your first project with Copilot, even if you’ve never written a line of code before. Here’s how.

What You Need to Get Started

Prerequisites

  1. GitHub Account: Sign up for free if you don’t have one.
  2. Visual Studio Code (VS Code): Download and install this code editor.
  3. GitHub Copilot Subscription: It’s $10/month after a 30-day free trial.
  4. Basic Understanding of JavaScript: Familiarity with variables and functions will help, but you can learn as you go.

Estimated Time: 2 Hours

This project can be completed in roughly two hours if you follow the steps closely.

Step-by-Step Guide to Create Your First Project

Step 1: Set Up Your Environment (30 minutes)

  1. Install VS Code: Download it from Visual Studio Code's website.
  2. Install GitHub Copilot:
    • Open VS Code and go to Extensions (Ctrl+Shift+X).
    • Search for "GitHub Copilot" and click "Install".
    • Sign in with your GitHub account to activate the Copilot extension.
  3. Create a New Project:
    • Open a new folder in VS Code and create a file named app.js.

Step 2: Start Coding with Copilot (1 hour)

  1. Write Your First Function: Start typing a simple function like:
    function greet(name) {
    
    • Copilot will suggest the rest. Accept the suggestion by pressing Tab.
  2. Build More Features:
    • Type comments to guide Copilot, such as:
      // Create a function to add two numbers
      
    • Copilot will generate the function based on your comment.
  3. Test Your Code:
    • Open the terminal in VS Code (Ctrl+), run your file with node app.js`, and see how it works.

Step 3: Iteration and Improvement (30 minutes)

  1. Refine Your Code: As you run your code, you might find areas for improvement. Use Copilot to suggest enhancements:
    • For example, if you want to handle invalid input, type:
      // If input is not a number, return an error
      
  2. Add Comments and Documentation: Good code is well-documented. Use comments to explain what each part of your code does.

What Could Go Wrong

  • Limitations: Copilot is not perfect. Sometimes it might suggest incorrect code or miss edge cases. Always review the suggestions.
  • Debugging: If you encounter an error, use console logs to debug or search online for common issues.

What's Next?

Once you’ve created your project, consider expanding it. You can explore adding:

  • A user interface with HTML/CSS.
  • More complex functionalities like API calls.
  • Deploying your project on platforms like GitHub Pages.

Conclusion: Start Here

Creating your first project with GitHub Copilot is not just about coding; it’s about learning how to leverage AI to speed up your development process. Follow these steps, and you’ll have a working project in no time.

What We Actually Use

For our projects, we rely heavily on GitHub Copilot for quick prototyping, especially when we need to explore new libraries or frameworks. We also utilize VS Code for its robust extension ecosystem.

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