Use this page as quick reference. For details, run help on each command.
glabs [command] [flags]
--config string: path to main config file-v, --verbose: enable verbose logging-h, --help: show help
Generate repositories for students or groups in an assignment.
glabs generate <course> <assignment> [groups...|students...]
Creates all project repositories based on config. If startercode is configured, it clones from the source repository.
Validate course and assignment configuration.
glabs check <course>
Validates all assignments and lists details. Run before generate to catch config errors.
Apply branch protection rules to existing repositories.
glabs protect <course> <assignment> [groups...|students...]
Useful after updating protection settings in config. Does not create repositories.
Clone repositories locally.
glabs clone <course> <assignment> [groups...|students...] [flags]
Flags:
-b, --branch string: checkout specific branch (default: main)-p, --path string: target directory (default: .)-f, --force: remove existing directory before cloning-s, --suppress: print only local path (useful with scripts)
Print repository URLs.
glabs urls <course> <assignment> [groups...|students...]
Useful with | xargs open to open all repos in browser.
Delete repositories permanently.
glabs delete <course> <assignment> [groups...|students...]
Update repositories with new code from startercode source.
glabs update <course> <assignment> [groups...|students...]
Generate activity or submission reports.
glabs report <course> <assignment> [flags]
Flags:
--html: generate HTML report--json: generate JSON report-t, --template string: custom template file
Default: plain text report
Export template:
glabs report <course> <assignment> -eSet or change access level for existing repositories.
glabs setaccess <course> <assignment> [groups...|students...] [flags]
Flags:
-l, --level string: override access level (guest, reporter, developer, maintainer)
Useful for adjusting permissions after repositories are created.
Archive or unarchive repositories.
glabs archive <course> <assignment> [groups...|students...] [flags]
Flags:
-u, --unarchive: unarchive instead of archive
Archived projects are hidden in GitLab UI but still accessible.
Display resolved assignment configuration.
glabs show <course> <assignment> [groups...|students...]
Shows how glabs interprets your config after merging course-level and assignment-level settings. Useful for debugging.
Print glabs version.
glabs version
You can push one deferred branch at a time to all student/group repositories using the push command. You can define more than one deferred branch.
deferredBranches:
solution:
url: # (optional) source repo, defaults to startercode URL
fromBranch: # (default: solution)
toBranch: # (default: solution)
orphan: # (default: true)
orphanMessage: # (default: Snapshot of solution)
anotherbranch:
url: # (optional) source repo, defaults to startercode URL
fromBranch: # (default: anotherbranch)
toBranch: # (default: anotherbranch)
orphan: # (default: true)
orphanMessage: # (default: Snapshot of anotherbranch)- If
orphan: true, a new orphan branch is created in each repo with a single commit from the deferred branch. - If
orphan: false, the deferred branch is pushed as a normal branch (with complete history). - deferred branches are always pushed with
--force
Usage:
glabs push <course> <assignment> <deferred-branch> [groups...|students...]e.g.
glabs push mpd ass1 solutionIf you are using orphan you might want to set the committer name and email in ~/.glabs.yaml like so
committer:
name: Example User
email: user@example.com
When specifying [groups...|students...], patterns are treated as regular expressions:
# Exact match
glabs generate mpd blatt01 alice
# Pattern match (all students with 'a' in name)
glabs generate mpd blatt01 'a.*'
# Multiple patterns
glabs generate mpd blatt01 'a.*' 'b.*'By course and assignment only:
glabs generate <course> <assignment>
Filter by name/pattern:
glabs generate <course> <assignment> <name-or-regex>
Multiple filters:
glabs generate <course> <assignment> <pattern1> <pattern2> ...
With flags:
glabs clone <course> <assignment> -p /tmp/work -b develop
glabs report <course> <assignment> --html -t template.tmpl
glabs --help # Show all commands
glabs generate --help # Show generate help with flags
glabs protect --help # Show protect help
glabs report --help # Show report help
glabs -v generate mpd blatt01 # Run with verbose logging