CLI tools for setting up and retiring GitHub-backed course repositories
Project description
course-setup
CLI tools for setting up and retiring GitHub-backed course repositories.
Installation
Because course-setup is a standalone CLI tool (not a library you import into
projects), the recommended way to install it is as a
uv tool:
uv tool install course-setup
This installs it in an isolated environment and makes setup-course,
retire-course, and setup-course-config available globally on your PATH.
To upgrade later:
uv tool upgrade course-setup
Alternatively, you can install with pip:
pip install course-setup
Configuration
Run the config generator to create a starter config file:
setup-course-config
This creates ~/.config/course-setup/config.toml:
[github]
token = "ghp_YOUR_TOKEN_HERE"
[paths]
archive = "/path/to/your/archive"
[defaults]
notebook_type = "jupyter" # or "marimo"
Edit the file to fill in your GitHub personal access token and archive path.
Alternatively, you can set the GITHUB_TOKEN environment variable instead of putting the token in the config file.
Use --force to overwrite an existing config:
setup-course-config --force
Usage
setup-course — Create a new course repo
setup-course -d 2026-03-18 -c Acme -r acme-python-2026
Options:
| Flag | Description |
|---|---|
-d, --date |
Course date (required) |
-c, --client |
Client name (required) |
-r, --repo |
GitHub repo name to create (required) |
-n, --name |
Optional name suffix (e.g. advanced) |
--notebook-type |
jupyter or marimo (overrides config default) |
This will:
- Copy the bundled course template to a new directory named
{client}-{date}[-{name}] - Create a Jupyter notebook (
.ipynb) or Marimo notebook (.py) based on the notebook type - Generate a
pyproject.tomlwith the appropriate notebook dependency andgitautopush - Create a public GitHub repo and configure the local
.git/configremote
retire-course — Archive a course repo
retire-course -d ./Acme-2026-03-18
Options:
| Flag | Description |
|---|---|
-d, --dirname |
Path to the course directory to retire (required) |
This will:
- Make the GitHub repo private
- Move the local directory to your configured archive path under the current year
Development
git clone https://github.com/reuven/course-setup.git
cd course-setup
uv sync --dev
Run tests:
uv run pytest
Format and lint:
uv run black src/ tests/
uv run ruff check src/ tests/
uv run mypy --strict src/
License
MIT — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file course_setup-1.2.0.tar.gz.
File metadata
- Download URL: course_setup-1.2.0.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e44681262b5ac6135024ddc1db06699f1810717bffe5307734b66734fe4b1e19
|
|
| MD5 |
00853e98d5c225a9d24b584b36c62cde
|
|
| BLAKE2b-256 |
2840c90bc8c2a96d31d4106b71d1a537e1860dbfd4c7f37ef97aa05394cfdbb7
|
File details
Details for the file course_setup-1.2.0-py3-none-any.whl.
File metadata
- Download URL: course_setup-1.2.0-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a80c51148eae33fef310555f10361e38df22786922678f2b78e3a6dee150211f
|
|
| MD5 |
9b555b6d3d40ee32ed73082554a46829
|
|
| BLAKE2b-256 |
94319bb49c59bffc6e850f78d542be0f505771fae76d7e9d1cfe835e873cec1d
|