Skip to main content

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"
# readme_source = "/path/to/custom/README.md"   # or a URL

[defaults]
notebook_type = "jupyter"   # or "marimo"

Edit the file to fill in your GitHub personal access token and archive path.

You can optionally set readme_source under [paths] to a local file path or URL. When set, setup-course uses that as the README for new courses instead of the bundled default.

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 -c Acme -t python-intro

Options:

Flag Description
-c, --client Client name (required)
-t, --topic Course topic (required)
-d, --date YYYY-MM override (defaults to current month)
-n, --num-sessions Number of sessions (creates one notebook per session)
--freq Session frequency: daily or weekly (requires -n, defaults to daily)
--notebook-type jupyter or marimo (overrides config default)

This will:

  1. Copy the bundled course template to a new directory named {client}-{topic}-{YYYY-MM}
  2. Create one or more Jupyter notebooks (.ipynb) or Marimo notebooks (.py) named {client}-{topic}-{YYYY-MM-DD} for each session date
  3. Generate a pyproject.toml with the appropriate notebook dependency and gitautopush
  4. Create a public GitHub repo and configure the local .git/config remote

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:

  1. Make the GitHub repo private
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

course_setup-2.1.1.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

course_setup-2.1.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file course_setup-2.1.1.tar.gz.

File metadata

  • Download URL: course_setup-2.1.1.tar.gz
  • Upload date:
  • Size: 14.6 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

Hashes for course_setup-2.1.1.tar.gz
Algorithm Hash digest
SHA256 7b8ffd3f328e841b6947494787cd2a1d0b37fbcabf25c0fb67bbbe43f66528d7
MD5 66b9c30e159b7e95a890a7ecbd850821
BLAKE2b-256 7c5f1e69ce5c4716b2640916b1751d3d876b16e14400a56b610ec295080ea463

See more details on using hashes here.

File details

Details for the file course_setup-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: course_setup-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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

Hashes for course_setup-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d37003dd2f19f87e21d83055ff1da11a2ce87aedb67752126997d81c02c80596
MD5 a51ba1fdaaf023e9f4067777e22ea7be
BLAKE2b-256 da20d4cf6c07b2e0dbbb5d270775492f49864c60d950e19e3c885c12fb34e443

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page