Class-Hub is a command-line tool that simplifies the management of student group repositories on GitHub. Using the GitHub API, it automates the creation and management of repositories for classroom assignments, making it easier for educators to organize and track student work.
The ch CLI tool provides features like:
- Creating repositories for student groups from a template
- Managing student access permissions automatically
- Bulk cloning/updating of assignment repositories
- Smart academic year handling
- Tab completion support
- Install the CLI tool (see Installation below)
- Authenticate with GitHub:
gh auth login- Create a CSV file with student groups (e.g.,
students.csv):
student1@email.com, 1
student2@email.com, 1
student3@email.com, 2
student4@email.com, 2- Create an assignment:
ch create-assignment classroom-org assignment-name students.csv [template-repo]You can install Class-Hub using the provided install script:
curl -fsSL https://raw.githubusercontent.com/eupedrosa/class-hub/main/install.sh | bash- GitHub CLI (
gh) - jq
If you prefer to install manually:
- Ensure
~/.local/binis in your PATH - Download the script:
curl -fsSL https://raw.githubusercontent.com/eupedrosa/class-hub/main/ch -o ~/.local/bin/ch
chmod +x ~/.local/bin/ch- Set up autocomplete (optional):
ch autocomplete > ~/.local/share/bash-completion/completions/chch create-assignment <classroom_name> <assignment_name> <students_file> [template_repo]NOTE: The lective year is automatically added to the assignment name.
ch list-assignments <classroom_name> [assignment_name]ch get-assignment <classroom_name> <assignment_name> [target_directory]ch updateUpdates the CLI tool to the latest version.
For more information, run:
ch --help