Repository navigation
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.
- GitHub CLI (
gh) - Go, only for the build-from-source path.
You don't need to run gh auth login first. The login commands below handle
GitHub authentication with the right scopes.
gh extension install foundation50/gh-teacher
gh extension install foundation50/gh-studentVerify:
gh teacher --help
gh student --helpgh extension upgrade gh-teacher
gh extension upgrade gh-studentOr 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.
Teachers who share an organization should upgrade together. gh teacher init
reinstalls the organization rulesets to whatever the running version expects,
so an older release re-running init undoes protections a newer one installed
(for example, the staff exemption on the feedback branch lock) until someone
runs the newer init or clicks Fix it in the web app's organization
settings.
To pin a version, pass --pin with a release tag:
gh extension install foundation50/gh-teacher --pin v1.42.0Each CLI has a login command that runs gh auth login with the extra OAuth
scopes Classroom 50 needs:
gh teacher login
gh student loginIf 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.
Tab completion for gh teacher and gh student commands and flags works in
bash, zsh, and fish. gh completes the names of installed extensions but not
what follows them, so each extension ships a script that extends gh's own
completion. Set up gh's completion
first, then add the extension's script after it.
zsh (~/.zshrc, after compinit):
eval "$(gh teacher completion zsh)"
eval "$(gh student completion zsh)"bash (~/.bashrc, or ~/.bash_profile on macOS). bash needs the
bash-completion package, which
macOS does not ship (brew install bash-completion@2); without it the script
does nothing:
eval "$(gh teacher completion bash)"
eval "$(gh student completion bash)"fish:
gh teacher completion fish > ~/.config/fish/conf.d/gh-teacher.fish
gh student completion fish > ~/.config/fish/conf.d/gh-student.fishStart a new shell afterwards. Add only the lines for the extensions you have installed. PowerShell is not supported: gh's completion there cannot be extended without replacing it.
- Teachers: CLI Teacher Guide.
- Students: CLI Student Guide.
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 .)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-BINARYNote
If gh attestation verify reports "no attestations found", confirm your gh
is 2.49+ and that you passed --repo foundation50/classroom50.
- Start here
- Teacher guides
- Autograding
- Students
- Reference