Skip to content

Installation

classroom50-sync[bot] edited this page Sep 3, 2026 · 8 revisions

Installation

gh teacher and gh student are extensions for the GitHub CLI (gh), written in Go. Install them from their published releases, or build from source if you're developing the extensions themselves.

Prerequisites

You don't need to run gh auth login first. The login commands below handle GitHub authentication with the right scopes.

Install (recommended)

gh extension install foundation50/gh-teacher
gh extension install foundation50/gh-student

Verify:

gh teacher --help
gh student --help

Update

gh extension upgrade gh-teacher
gh extension upgrade gh-student

Or update everything at once with gh extension upgrade --all. gh also checks for new releases in the background and tells you when an extension is out of date.

To pin a version, pass --pin with a release tag:

gh extension install foundation50/gh-teacher --pin v1.42.0

Log in

Each CLI has a login command that runs gh auth login with the extra OAuth scopes Classroom 50 needs:

gh teacher login
gh student login

If you skip this and run another command first, the CLI runs the login flow for you automatically. gh teacher logout and gh student logout mirror gh auth logout.

Next steps


Build from source (for development)

Install from a local checkout so your changes take effect:

git clone https://github.com/foundation50/classroom50
cd classroom50

(cd cli/gh-teacher && go build . && gh extension install .)
(cd cli/gh-student && go build . && gh extension install .)

After pulling new commits, rebuild. You don't need to reinstall:

(cd cli/gh-teacher && go build .)
(cd cli/gh-student && go build .)

Verify a download (optional)

Each release ships a checksums.txt and build provenance attestations. To confirm a binary came from the official release pipeline, replace PATH-TO-BINARY with the downloaded file:

# Build provenance (gh 2.49+). Point --repo at the source monorepo, where the
# attestations are recorded (not the extension repository the binary came from):
gh attestation verify PATH-TO-BINARY --repo foundation50/classroom50

# Or check the SHA-256 against the release's checksums.txt:
sha256sum PATH-TO-BINARY

Note

If gh attestation verify reports "no attestations found", confirm your gh is 2.49+ and that you passed --repo foundation50/classroom50.

Clone this wiki locally