Skip to content

Repository Commands

Repository commands are the primary operational commands in the CLI. They create Git repositories for student teams, clone them locally for grading, and push template updates.

All repository commands require a course with a configured Git connection and organization. See Repository Setup for the full workflow including prerequisites and validation.

Creates one repository per active group in the assignment’s group set.

Terminal window
redu repo create --assignment "Project 1" --course seed-course

Options:

FlagDescription
--assignment <name>Assignment name (required, or use --all)
--allCreate repositories for all assignments
--groups <names>Comma-separated list of group names to include
--dry-runShow what would be created without making changes
--template-path <dir>Override the configured template with a local directory
--course <id>Course to operate on (defaults to active course)
Terminal window
redu repo create --assignment "Project 1" --dry-run --course seed-course
Planned repository operation for assignment 'Project 1' (a1)
- team-alpha-project-1 (create)
- team-beta-project-1 (create)
- team-gamma-project-1 (skip: repo exists)
3 planned, 2 to create, 1 existing

Clones repositories to a local directory for grading or review.

Terminal window
redu repo clone --assignment "Project 1" --target ./repos --course seed-course

Options:

FlagDescription
--assignment <name>Assignment name (required, or use --all)
--allClone repositories for all assignments
--target <dir>Local directory for cloned repos (defaults to current directory)
--layout <layout>Directory organization: flat, by-team, or by-task
--groups <names>Comma-separated list of group names to include
--course <id>Course to operate on
Terminal window
# Flat: all repos in one directory
redu repo clone --assignment "Project 1" --target ./repos --layout flat
# By team: repos/Team Alpha/project-1/
redu repo clone --assignment "Project 1" --target ./repos --layout by-team
# By task: repos/Project 1/team-alpha/
redu repo clone --all --target ./repos --layout by-task

Pushes template changes to existing repositories by creating a pull request in each one.

Terminal window
redu repo update --assignment "Project 1" --course seed-course

Options:

FlagDescription
--assignment <name>Assignment name (required)
--template-path <dir>Override the configured template with a local directory
--course <id>Course to operate on

Repositories that already have a pending update PR are skipped.