GitHub Repo Agent
Frictionless, one-click GitHub repository setup with user control automation. Designed for educators, bootcamp hosts, and workshop trainers who need to distribute code instantly.
GitHub Repo Agent eliminates the administrative friction of creating repositories and inviting dozens of students manually. Just drop a text file with their GitHub usernames, click one button, and start teaching.
⚡ Quick Start
- Install GitHub Repo Agent from the VS Code Marketplace.
- Create a
.vscode/repo-users.txt file in your project folder.
- Add student GitHub usernames (one per line).
- Click the
GitHub Repo Agent status bar icon and select Setup / Update Repository.
- Enter your Profile details (first time only) and select HTTPS or SSH handoff.
🚀 Installation
- Install from VS Code Marketplace
- Command Line:
code --install-extension spajs.github-repo-agent
✨ Features
- The Command Center: A clean, single status bar entry point
$(github) Your-Profile that handles both repository initialization and profile management.
- Automated Invitations: Automatically loops through your student list and sends GitHub collaborator invitations.
- Explicit Removal: Prepend a
- to a username in your list to instantly revoke their access.
- Stateful Memory: Remembers which profile you are using for each specific local repository across VS Code restarts.
- Secure Secret Storage: Uses your operating system's native keychain (via VS Code) to securely encrypt your Personal Access Tokens (PATs).
- Multiple Identities: Seamlessly juggle "Work", "Personal", and "Bootcamp" profiles without constantly logging in and out.
- Perfect Handoff: Sets up the remote URL (
origin) using your preferred transport (HTTPS or SSH) and steps aside so your native Git CLI can push the code.
⚙️ Configuration
repo-users.txt Setup
The core of the extension relies on a simple text file to manage students.
# .vscode/repo-users.txt
# Add users simply by typing their GitHub username
student-handle-1
student-handle-2 # Inline comments are ignored
# Remove users who dropped the class by prepending a minus sign
- dropped-student-handle
⚙️ Extension Settings [ ctrl + , ] / githubRepoAgent
githubRepoAgent.usersFilePath: Relative path to the users list file within the workspace. [default: .vscode/repo-users.txt]
Change this if you use an alternative editor (e.g., .codium/users.txt) or prefer storing the list elsewhere.
🔐 Authentication & Setup Guide
Because GitHub Repo Agent interacts with the GitHub REST API to create repositories and manage users, it requires a Personal Access Token (PAT).
1. Generating the Right PAT (GitHub)
Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic).
Click Generate new token (classic).
Select scope: Check repo (Full control of private repositories) and User Scope.
Set an Expiration (e.g., 30 days for a bootcamp).
Copy the token (you won't see it again).
2. The HTTPS vs SSH Handoff
Once the repository is created via this extension, it asks how you want to push your actual code (the Transport Layer).
HTTPS (Recommended for Simplicity): The extension links the standard HTTPS URL. Your OS's native Git Credential Manager will handle the push authentication automatically.
SSH (Advanced/Multiple Accounts): Links the git@github.com:... URL. Ensure you have your ~/.ssh/config and SSH keys properly configured on GitHub.
💡 Pro-Tip: The "Read-Only" Student Workaround
The Goal: You want students to be able to pull the codebase during the workshop, but you do not want them to push changes back to your repository.
The GitHub Limitation: If you create a repository under a standard Personal GitHub Account, anyone invited as a collaborator automatically receives both read AND write access. GitHub's free tier ignores requests for "Read-Only" access on personal accounts.
The Solution:
Create a Free GitHub Organization (e.g., github.com/My-Mastery-Bootcamps).
Free Organizations do support granular permissions.
When using GitHub Repo Agent, use the Organization's name as the "GitHub Username" in your active profile.
The extension automatically sends a pull (Read-Only) permission request, which the Organization will respect, perfectly securing your workshop code!
☑️ Requirements
⚖️ License
MIT