hopper
A git-like CLI for tutors on the hopper platform. It wraps git and the
hopper orchestration services to safely pull, grade, and push all of a
tutor's assigned student repositories.
Install
pipx install hopper-cli
To update later:
pipx upgrade hopper-cli
Getting started
hopper auth # set up an instance profile + API key
hopper init <course> # create a workspace directory bound to a course
cd <course-uid>
hopper pull # clone/update all your assigned student repos
Concepts
Profiles
A profile is a set of service URLs plus your API key — typically one per
university. They live in the global config at os.UserConfigDir()/hopper/config.yaml
(~/.config/hopper/ on Linux, ~/Library/Application Support/hopper/ on
macOS, %AppData%\hopper\ on Windows).
hopper auth interactively creates a profile, offering known presets (e.g.
alu for Albert-Ludwigs-Universität Freiburg) or custom URLs. You can hold
several profiles and pick which one a workspace uses at init time.
Workspaces
hopper init [profile/]<course> creates a ./<course-uid>/ directory with a
.hopper.yaml inside. <course> may be a UID (2025WS-EidP) or numeric ID.
With multiple profiles, prefix the profile: hopper init alu/2025WS-EidP.
All commands run inside that directory and never write outside it.
Commands
| Command | Description |
|---|---|
hopper auth |
Interactively set up a profile (preset or custom). |
hopper auth list / status / remove <id> |
Manage profiles. |
hopper init [profile/]<course> |
Bind a new directory to a course. |
hopper pull |
Clone or pull --rebase --autostash every assigned student repo. |
hopper push [msg] |
Commit README changes, validate point schema, push. |
hopper commit <msg> |
Commit without pushing (recovery path). |
hopper status |
Per-student branch, ahead/behind, dirty state. |
hopper students |
List students assigned to you. |
hopper info |
Course info, your role, exercises. |
hopper version |
Print version. |
pull flags
--prune/--no-prune— remove local repos of students no longer assigned (default: prune, with preview + confirm).--student <name>— pull a single student.--only a,b,c— pull only the listed usernames.--jobs N/-j— concurrent git operations (default 4).
Safety vs. the legacy CLI
- Per-repo error isolation — one failed clone/pull is reported and skipped, not fatal.
- No shell — git runs via
exec.Commandwith argument slicing; no string interpolation. - No
git reset --hard— push rebases and surfaces conflicts instead of destroying local work. - No README mutation during pull — the grader bot already injects build logs; pull is pure pull.
- Point-schema validation blocks invalid pushes (
--allow-invalidto override).
Minimum-version gate
On every command (except auth/version/help), hopper asks the active
profile's orchestration server for the minimum allowed CLI version
(GET /api/cli/version, returns { "minimum": "vX.Y.Z" }):
- running version < minimum → the CLI refuses to run (upgrade via pip);
- running version >= minimum → proceeds;
- server unreachable → proceeds silently (can't check offline).
Orchestration endpoints used
Existing (no server changes): GET /api/users/me, GET /api/users/me/courses,
GET /api/courses/:id, GET /api/courses/:id/exercises.
Required additions to orchestration:
GET /api/courses/:id/students/mine—RequireStaff, scoped totutors.user_id = caller(admins/owners get all). Returns students withUser.PreferredUsername(the Forgejo repo name). Used bypull.GET /api/cli/version— public, returns{ "minimum": "vX.Y.Z" }from a Setting. Used by the minimum-version gate.
Build (developers only)
go build -o hopper ./cmd/hopper/
The version is injected at build time:
go build -ldflags "-X codeberg.org/hopper/cli/internal/cmd.Version=v0.2.0" -o hopper ./cmd/hopper/
Metadata
Release files for hopper-cli 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| hopper_cli-0.1.9-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details |
| hopper_cli-0.1.9-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| hopper_cli-0.1.9-py3-none-manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| hopper_cli-0.1.9-py3-none-manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| hopper_cli-0.1.9-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| hopper_cli-0.1.9-py3-none-macosx_10_9_x86_64.whl | Python 3 | none | macOS 10.9+ x86-64 | Details |
Total release size: 74.8 MB
Release files / hopper_cli-0.1.9-py3-none-win_arm64.whl
| Download URL | hopper_cli-0.1.9-py3-none-win_arm64.whl |
|---|---|
| Size | 14.9 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
6ff69ebf96c0ca15d40996b6faf94388a6176cc9d9412161d0030c5464d8d680
|
|
BLAKE2b-256 checksum How to use checksums |
da54ac4f77b2d7176ca4fedb8a5eea13aa8ba721325dac68b7b413f5a33f61d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / hopper_cli-0.1.9-py3-none-win_amd64.whl
| Download URL | hopper_cli-0.1.9-py3-none-win_amd64.whl |
|---|---|
| Size | 15.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d9022ed4c5f23f167c4b72ff9da5266b3a7cc77197d6c1f5a23bcee9307ea852
|
|
BLAKE2b-256 checksum How to use checksums |
02cc8510f6ac7134f1dbad5f43b5c89719016843cb75a6f0bdff202bad48e9f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / hopper_cli-0.1.9-py3-none-manylinux2014_x86_64.whl
| Download URL | hopper_cli-0.1.9-py3-none-manylinux2014_x86_64.whl |
|---|---|
| Size | 7.7 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
7a6a0924230a0708376529418165f48382916dac25ddcb6b2a4a988f5a8a6ee1
|
|
BLAKE2b-256 checksum How to use checksums |
c079e122b940a17b750b5faa694df61bebf65b3132e22321528b2c58b948aa03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / hopper_cli-0.1.9-py3-none-manylinux2014_aarch64.whl
| Download URL | hopper_cli-0.1.9-py3-none-manylinux2014_aarch64.whl |
|---|---|
| Size | 14.2 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
5750bfce46e51c1b5c9bd46851b84e70196d123d3a0f798487b163e824040d62
|
|
BLAKE2b-256 checksum How to use checksums |
00889ab415a67c24353764b8fc420cf946b956f7ab90bccf1f8e6f340cdad78e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / hopper_cli-0.1.9-py3-none-macosx_11_0_arm64.whl
| Download URL | hopper_cli-0.1.9-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 14.5 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1c582266f83518e40c05b7a757674d65a97db8983e475fb00ab6d2a7f989bdeb
|
|
BLAKE2b-256 checksum How to use checksums |
e50f36296349b2a60876df88c0d405b6a7dd7c79e3ec3d77882f34b562c5bf7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / hopper_cli-0.1.9-py3-none-macosx_10_9_x86_64.whl
| Download URL | hopper_cli-0.1.9-py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 7.9 MB |
| Tags | Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
c6cfea827fccb2d63e46456971dc5fe6ee97ef62f450a6005c2cd1b9e9ca9256
|
|
BLAKE2b-256 checksum How to use checksums |
9f9b34460ca31bdac9f328b655141975460e967fd39e5e4690d8e27a6950e7e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|