Train with your Copilot. Reach new heights.
Flight School is a sample implementation showing how to build AI-powered developer tools using the GitHub Copilot SDK. It's a learning platform where developers practice coding challenges, receive real-time AI evaluation, and get personalized guidance all powered by GitHub Copilot.
The fastest way to run Flight School is with GitHub Codespaces — everything is pre-configured:
- Click Code → Codespaces → Create codespace on main
- Wait for setup to complete (installs dependencies and tools automatically)
- Run
gh auth loginto authenticate with GitHub - Run
npm run devto start the app
That's it! Open the preview URL and you're ready to go.
To run Flight School on your own machine, you'll need:
- Node.js 22+ — Download here
- GitHub CLI — Installation guide
- GitHub Copilot CLI — Required for AI features
- GitHub Copilot access — Individual, Business, or Enterprise subscription
# Install GitHub CLI (if not already installed)
# macOS
brew install gh
# Windows
winget install GitHub.cli
# Then authenticate
gh auth loginThe Copilot SDK uses the Copilot CLI for AI features. Install it as a GitHub CLI extension:
gh extension install github/gh-copilotgit clone https://github.com/chrisreddington/flight-school.git
cd flight-school
npm install
npm run devOpen http://localhost:3000 — you should see your GitHub profile loaded automatically.
If you prefer not to use the GitHub CLI, you can authenticate with a Personal Access Token (PAT):
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token (classic)
- Select these scopes:
repo— Access your repositoriesread:user— Read your profile informationread:org— Read organization membership (optional)
- Create a
.env.localfile in the project root:
GITHUB_TOKEN=ghp_your_token_hereNote: You'll still need the GitHub Copilot CLI installed for AI-powered features like challenges, hints, and coaching. The token only handles GitHub API access for profile and repository data.
AI can be a learning partner, not just a tool that helps generate solutions. Flight School explores how the Copilot SDK can create educational experiences that adapt to each developer's existing experience, their skill level, provide constructive feedback, and guide learners toward understanding.
Flight School gathers data from your GitHub profile and repositories through the Octokit package and uses the Copilot SDK to tailor a personalized learning experience:
- Daily Focus — A challenge, goal, and learning topics tailored to your skill gaps
- Interactive Challenges — Practice in a sandbox with real-time AI evaluation
- Progressive Hints — Get guidance without spoilers when you're stuck
- Learning Conversations — Chat with an AI coach about your code and repositories
flowchart LR
subgraph Flight School
A[GitHub Profile<br>& Repos] --> B[Copilot SDK<br>+ MCP Tools]
B --> C[Your Learning<br>Dashboard]
B --> D[AI-Powered:<br>• Evaluation<br>• Hints<br>• Coaching<br>• Focus Gen]
end
Flight School demonstrates several Copilot SDK patterns that you can adapt for your own applications:
The SDK's CopilotClient manages authenticated sessions. To optimize performance, Flight School creates different session types for different use cases:
- Lightweight sessions for fast responses (hints, quick chats)
- MCP-enabled sessions when GitHub exploration is needed (repo search, file contents, etc.)
- Conversation caching for multi-turn chats that maintain context
Flight School connects to GitHub's Remote MCP Server, giving the AI access to GitHub tools like get_me, list_user_repositories, and search_code. This enables context-aware responses based on your actual repositories in the chat experience.
The chat and challenge evaluation experiences stream feedback in real-time using the SDK's streaming mode, showing results as they're generated rather than waiting for the full response.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Create production build |
npm run lint |
Run ESLint |
npm test |
Run tests |
npm run test:watch |
Run tests in watch mode |
We welcome contributions! Flight School is both a learning platform and a reference implementation. Improving either helps the community.
- Report bugs — Open an issue with reproduction steps
- Suggest features — Describe your use case in an issue
- Improve documentation — Help others understand the SDK patterns
- Submit code — Fix bugs or implement features
- Fork the repository
- Create a feature branch (
feature/your-feature-name) - Make your changes with clear commits
- Run tests (
npm test) and linting (npm run lint) - Open a Pull Request
See CONTRIBUTING.md for commit conventions, testing practices, and code review process.
Flight School stores your data outside the repository in your user data directory to prevent accidental commits:
| Platform | Location |
|---|---|
| Linux/macOS | ~/.local/share/flight-school/ |
| Windows | %LOCALAPPDATA%\flight-school\ |
| Custom | Set FLIGHT_SCHOOL_DATA_DIR environment variable |
| File | Contents |
|---|---|
profile-cache.json |
Cached GitHub profile (username, avatar, bio, repos) |
focus-storage.json |
Daily challenges, goals, learning topics, completion states |
habits.json |
Your custom learning habits and progress tracking |
threads.json |
Chat conversation history with the AI coach |
workspaces/{id}/ |
Challenge solution code and metadata |
~/.local/share/flight-school/ # or %LOCALAPPDATA%\flight-school\ on Windows
├── profile-cache.json # GitHub profile cache
├── focus-storage.json # Daily focus content + state
├── habits.json # Learning habits
├── threads.json # Chat history
└── workspaces/ # Challenge workspaces
└── {challengeId}/
├── _workspace.json # Metadata
└── solution.ts # Your code files
- Chat history may contain sensitive info based on whatever you discuss with the AI coach.
- Workspace files contain your actual solution code for challenges.
- Back up before clearing — Delete the data folder to reset all local state
- Framework: Next.js with App Router
- UI: GitHub Primer React Components
- AI: GitHub Copilot SDK with MCP tool integration
- Data: Octokit for GitHub API access
- Storage: Local JSON files in user data directory (see above)
- Testing: Vitest
This project is licensed under the MIT License—see the LICENSE file for details.