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.
Add all students as guests to the course subgroup for Dependency-Proxy access.
glabs addgroupguests <course>
Adds all students (from both individual students and groups sections) as guests to the course subgroup
(coursepath/semesterpath). This enables students to access and use the GitLab Dependency-Proxy feature.
Newly created memberships or invitations get an expiration date of 1 year.
Use case: After configuring a course and before students need container registry access:
glabs addgroupguests vss # Adds all VSS students to vss/semester/ob-26ss subgroupAccess level: Students are added with guest permissions, which is sufficient for Dependency-Proxy access and follows the principle of least privilege.
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.
Inspect and maintain course configuration files. These subcommands read the course file as written, without resolving it — they never talk to GitLab and never need a token.
glabs config lint [course...]
Reports configuration that does not do what it looks like it does. With no
arguments, lints every course in the courses: list.
This matters because glabs ignores unknown keys silently: a typo is indistinguishable from a setting that works. Two real examples it catches:
problem vss.blatt2.release.mergeRequest.dockerImages
no such configuration key; it is silently ignored (dockerImages belongs
under `release:`, not under `release.mergeRequest:`)
problem vss.blatt0.clone.clone
no such configuration key; it is silently ignored (the clone command has no
such option; configuring `clone:` at all is what enables it)
Findings come in two severities:
| Severity | Meaning |
|---|---|
problem |
The setting is present and has no effect — a typo, or a key superseded by a newer block. |
deprecated |
It still works, but the spelling or shape is obsolete. glabs config migrate fixes these. |
Exits non-zero if any problem was found, so it can gate a pre-commit hook or CI.
glabs config fmt <course> [course...] [-w|--write]
Rewrites a course file in canonical form. Prints to stdout by default; -w
writes back in place.
glabs config migrate <course> [course...] [-w|--write]
Rewrites a course file, upgrading deprecated key spellings (required_approvals
→ requiredApprovals) and polymorphic blocks (a bare approvals: list →
approvals.rules:).
It does not resolve superseded settings. If a file has both
startercode.devBranch and a branches: block, migrate keeps both and lint
tells you which one wins — deciding that is a judgement call, not a rewrite.
Both
fmtandmigraterebuild the file from the parsed configuration, so comments and key order are not preserved. The meaning is preserved (verified against every course file), but the diff will be large. Review it before committing, and keep your course files in version control.
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