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

Install as a uv tool (recommended):

uv tool install course-setup

This makes setup-course, retire-course, and setup-course-config available on your PATH. To upgrade:

uv tool upgrade course-setup

You can also install with pip (pip install course-setup).

Configuration

Generate a starter config file:

setup-course-config

This creates ~/.config/course-setup/config.toml. Open it and fill in your settings:

[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"
Setting Required Description
[github] token Yes GitHub personal access token. Alternatively, set the GITHUB_TOKEN environment variable.
[paths] archive Yes Directory where retired courses are archived.
[paths] readme_source No Local path or URL to a custom README for new courses. Omit to use the bundled default.
[defaults] notebook_type No "jupyter" (default) or "marimo".

To regenerate the config file, use setup-course-config --force.

Usage

setup-course — Create a new course repo

setup-course -c Acme -t python-intro
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. Create a directory and GitHub repo named {client}-{topic}-{YYYY-MM}
  2. Create a notebook per session, named {client}-{topic}-{YYYY-MM-DD} (.ipynb for Jupyter, .py for Marimo)
  3. Generate a pyproject.toml with the notebook dependency and gitautopush
  4. Configure the local .git/config with the GitHub SSH remote

By default, a single notebook is created for today's date. Use -n to create multiple notebooks for multi-day or multi-week courses:

setup-course -c Acme -t python-intro -n 5              # 5 daily sessions
setup-course -c Acme -t python-intro -n 5 --freq weekly # 5 weekly sessions

retire-course — Archive a course repo

retire-course -d ./Acme-python-intro-2026-03
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, format, and lint:

uv run pytest
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.2.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.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: course_setup-2.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 3227341b393cc6fba8e6f366274b7a0d51b7c8c029b851a1cecfd322e5b01849
MD5 74799cc5bee914d896a618a236faa24f
BLAKE2b-256 27c0ab6a539393763920d274d2f4fe18c38918f8c405593be5ddcbefd19a735b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: course_setup-2.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 439e3977817d3267c5f5d3a3f6d63cd4b31dc3d5df32a1e1510161ef22f904c3
MD5 ae591114e2d95c7d4d652bd444734ef2
BLAKE2b-256 15e6dfba344175e1f99aa31021d76c6ba9a88a0e5e059c7e34b4c8d3e6df5018

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