Skip to main content

gh-class-sak

Manage a whole course's GitHub repos from the command line — now that GitHub Classroom is gone.

CI PyPI Python License Discord

Terminal demo: gh-class-sak listing classrooms, showing an assignment's teams and members, and previewing a bulk clone for grading

A GitHub org hosts your classrooms, described by one small versioned state repo: classroom-meta — a directory per classroom, a hand-editable tsv file per assignment, a row per team. Everything else is derived from it and the repo names:

$ gh-class-sak classrooms cs101-fall
scanning cs101-fall ...
cs101_fall: hw1
cs101_fall: project

List the teams on an assignment, with their members and real names:

$ gh-class-sak repos list cs101-fall project --members --name
TEAM       MEMBERS
team-1     jdoe(Jane Doe),msmith(Marcus Smith)
nightowls  rpatel(Riya Patel),tk-codes
team-3     lchen(Lin Chen)

Pull every team's repo down for grading — safe by default, so this only previews:

$ gh-class-sak repos clone cs101-fall project --dest grading
⚠️  dry run: no changes will be made. add --no-dryrun to apply
⚠️  would clone cs101-fall/project-team-1 -> grading/team-1
⚠️  would clone cs101-fall/project-nightowls -> grading/nightowls
⚠️  would clone cs101-fall/project-team-3 -> grading/team-3

Add --no-dryrun and it actually clones, fast-forwarding any repo you already have.

What it does

  • One versioned state repo per org — classrooms are directories, assignments are tsv files you can hand-edit, diff, and review; an org hosts as many classrooms as you need
  • Roster tables built for the shell — teams, members, instructors, real names, and the emails students actually commit with, in columns that cut and awk parse
  • Bulk clone for grading — clone or fast-forward every team's repo into one directory, named by team
  • Canvas integration — map orgs to Canvas courses: build an assignment's repos straight from the enrollment roster or a Canvas group set (one repo per person or per group), resolve emails to GitHub ids via Canvas profile links, match groups, add per-section instructor columns, and report who has no repo yet
  • Message the stragglers — canvas message-missing finds every student stranded on the way to their repo — no GitHub link on their Canvas profile, a broken one, or a repo invitation they never accepted — and sends each a Canvas message saying exactly what to fix; a dry run shows every message before anything goes out
  • Managed classrooms — meta apply reconciles the org to the classroom-meta repo: creates private repos (optionally from a template), grants student, TA, and branch-protection state exactly as recorded — removing people is opt-in — and tracks repos by permanent id so renames can't hide them
  • Safe by default — every mutating command previews with a ⚠️ until you pass --no-dryrun, and your token never appears in ps output, clone URLs, or .git/config

Installation

pip install gh-class-sak

Or, to keep it out of your project environments:

pipx install gh-class-sak      # or: uv tool install gh-class-sak

Requires Python 3.9+.

Documentation

  • Getting started — install, tokens, the Canvas config, and a first walk through a course
  • Migrating from GitHub Classroom — where Classroom's bookkeeping lives now, and the one-command import
  • Canvas integration — how GitHub ids map to Canvas accounts, assignments built from enrollments or group sets, and messaging the students whose setup is stuck
  • The classroom-meta files — the file layouts and formats, and how TA teams manage the TAs
  • Commands — the full reference: every command, every flag, and the classroom-meta repo

Every example on those pages — and above — is replayed against an invented demo course by the test suite, so the output you see is the output you get.

Contributing

Questions, war stories, and quick help live on the Discord server — running a course with this, or thinking about it? Come say hi.

See CONTRIBUTING.md. The test suite stubs out GitHub and Canvas, so you can contribute without a course, a token, or a Canvas account:

python -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest

Security policy: SECURITY.md. Please report vulnerabilities privately.

Metadata

Release files for gh-class-sak 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gh-class-sak 1.3.0
File Size Uploaded
gh_class_sak-1.3.0.tar.gz 77.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gh-class-sak 1.3.0
File Interpreter ABI Platform
gh_class_sak-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 126.6 kB

Release files / gh_class_sak-1.3.0.tar.gz

Download URL gh_class_sak-1.3.0.tar.gz
Size 77.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6cba36f6c46bf6bff2d12edcc3b8d8612883f094b05cc75de0954c78d4658793
BLAKE2b-256 checksum
How to use checksums
f788919471d49cfaa29df679eff18c916559386024a5cdb09257c2d1f1d14505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / gh_class_sak-1.3.0-py3-none-any.whl

Download URL gh_class_sak-1.3.0-py3-none-any.whl
Size 49.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dec1d53dd5479b8275bd06705fa5a70a51562caaf85a6c70915e1caf60c44772
BLAKE2b-256 checksum
How to use checksums
5491c267c62b0d3f8df0a8cc39baa27ce6609cc2cd22e1229af97025f1479e53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

1.5.0

2 release files

1.4.0

2 release files

This release

1.3.0 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page