Ai Coding Tools

How to Use GitHub Copilot for Your First Project in 2 Hours

By BTW Team3 min read

How to Use GitHub Copilot for Your First Project in 2026

If you’re anything like me, diving into a new coding project can feel like staring at a blank canvas, paralyzed by possibilities. Enter GitHub Copilot. This AI-powered coding assistant can help you write code faster and more efficiently, but how do you actually get started? Let’s break it down so you can kick off your first project in just two hours.

Prerequisites: What You Need to Get Started

Before you jump in, here’s what you’ll need:

  • GitHub Account: Free to sign up.
  • Visual Studio Code (VS Code): Download it here.
  • GitHub Copilot Subscription: $10/month after a free trial.
  • Basic understanding of JavaScript or Python: This guide assumes you’re familiar with basic coding concepts.

Setting Up GitHub Copilot

  1. Install VS Code: If you haven’t done this yet, download and install VS Code.
  2. Sign Up for GitHub Copilot: Navigate to the GitHub Copilot page and choose the subscription that fits your needs. You can start with the free trial.
  3. Install the Copilot Extension: In VS Code, go to the Extensions panel (or press Ctrl+Shift+X), search for "GitHub Copilot," and install it.
  4. Authenticate: You’ll need to sign in to your GitHub account to authenticate the extension.

Starting Your First Project

Let’s say you want to build a simple web application using JavaScript. Here’s how to set it up:

  1. Create a New Project Folder: Open your terminal and run:
    mkdir my-first-project
    cd my-first-project
    
  2. Initialize a New Node.js Project: Run:
    npm init -y
    
  3. Install Express: For a simple web server, install Express:
    npm install express
    
  4. Create Your Main File: Create a file called app.js:
    touch app.js
    

Using GitHub Copilot to Write Code

Now, let’s leverage Copilot to speed things up. Open app.js and start coding:

  1. Start with a Comment: Type // Create an Express server and wait for Copilot to suggest code. You should see a suggestion pop up—hit Tab to accept it.
  2. Add Routes: Type // Add a route to return "Hello World" and again, let Copilot suggest the code.
  3. Run Your Server: At the end of your file, type // Listen on port 3000 and accept the suggestion.
  4. Test Your Application: In your terminal, run:
    node app.js
    
    Open your browser and navigate to http://localhost:3000 to see "Hello World!"

Troubleshooting Common Issues

  • Copilot Not Suggesting Code: Ensure you’re logged into GitHub and that the extension is enabled in VS Code.
  • Errors in Code: Don’t hesitate to tweak Copilot’s suggestions; it’s not perfect! Always test your code.

What’s Next: Building on Your Foundation

Now that you have your server running, consider adding more features:

  • Create additional routes to handle different endpoints.
  • Integrate a database like MongoDB for data storage.
  • Explore deploying your app using platforms like Heroku or Vercel.

Conclusion: Start Here

You can realistically set up your first project and get GitHub Copilot to help you code in about two hours. It’s a powerful tool that can greatly reduce the friction of starting new projects, but remember, it’s not a replacement for understanding the code you’re writing.

With your first project up and running, continue learning and experimenting with Copilot’s capabilities.

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