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
):
- 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/bin
is 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/ch
ch 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 update
Updates the CLI tool to the latest version.
For more information, run:
ch --help