Skip to content

Installation

classroom50-sync[bot] edited this page Jul 23, 2026 · 7 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 <tag>:

gh extension install foundation50/gh-teacher --pin v1.0.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 / 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:

# Build provenance (gh 2.49+). Point --repo at the source monorepo, where the
# attestations are recorded (not the extension repo 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