Skip to content

Your AI pair programmer

GitHub Copilot uses the OpenAI Codex to suggest code and entire functions in real-time, right from your editor.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env ts-node
import { fetch } from "fetch-h2";
// Determine whether the sentiment of text is positive
// Use a web service
async function isPositive(text: string): Promise<boolean> {
  const response = await fetch(`http://text-processing.com/api/sentiment/`, {
    method: "POST",
    body: `text=${text}`,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  });
  const json = await response.json();
  return json.label === "pos";
}
Copilot
Coca-Cola Logo
Coyote Logistics Logo
Duolingo Logo
GM Logo
Mercado Libre Logo
Shopify Logo
Stripe Logo

Trained on billions of lines of code, GitHub Copilot turns natural language prompts into coding suggestions across dozens of languages.

Explore docs

Don't fly solo

Developers all over the world use GitHub Copilot to code faster, focus on business logic over boilerplate, and do what matters most: building great software.

Copilot for Individuals

$ 10 per month / $100 per year

  • Plugs right into your editor
  • Turns natural language prompts into code
  • Offers multi-line function suggestions
  • Speeds up test generation
  • Filters out common vulnerable coding patterns
  • Blocks suggestions matching public code
Copilot for Business
new

$ 19 per user per month

  • Everything included in Copilot for Individuals, plus...
  • Simple license management
  • Organization-wide policy management
  • Industry-leading privacy
  • Corporate proxy support

Learn about GitHub Copilot Terms and Conditions

Focus on solving bigger problems

Spend less time creating boilerplate and repetitive code patterns, and more time on what matters: building great software. Write a comment describing the logic you want and GitHub Copilot will immediately suggest code to implement the solution.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main
type Run struct {
    Time int // in milliseconds
    Results string
    Failed bool
}
// Get average runtime of successful runs in seconds
func averageRuntimeInSeconds(runs []Run) float64 {
    var totalTime int
    var failedRuns int
    for _, run := range runs {
        if run.Failed {
            failedRuns++
        } else {
            totalTime += run.Time
        }
    }
    averageRuntime := float64(totalTime) / float64(len(runs) - failedRuns) / 1000
    return averageRuntime
}
Copilot
Octocat avatar