A command-line tool for managing lecture notes written in Typst. Disclaimer: built with Claude Code.
- Create, edit, rename, and duplicate lectures from templates
- Build PDFs with Typst and combine into a single document
- Manage multiple courses with auto-detection
- Soft-delete with trash/restore functionality
- Tag lectures for organization
- Search lecture content with regex
- Track git and PDF build status
- Python 3.11+
- Typst for PDF compilation
- pdfunite (optional, for combining PDFs):
brew install poppler
Add the lec script to your PATH or create an alias.
# Initialize a new course in the current directory
lec course init
# Create a new lecture
lec new "Introduction to Linear Algebra"
# List all lectures
lec ls
# Build PDFs
lec build
# View status
lec status| Command | Description |
|---|---|
new |
Create a new lecture from template |
edit |
Open a lecture by partial name match |
last |
Open the most recently modified lecture |
list |
List lectures (supports --trash, --all, --tag) |
rm |
Soft-delete lectures to trash |
restore |
Restore lectures from trash |
rename |
Rename a lecture file |
duplicate |
Copy a lecture with new name and date |
search |
Search lecture content with regex |
build |
Compile lectures to PDF |
view |
Open PDF in viewer |
status |
Show git and PDF status |
tag |
Manage lecture tags |
pdfs |
List built PDFs |
course |
Manage courses |
help |
Show help for commands |
Run lec help <command> for detailed usage.
Configuration files are stored in ~/.config/lec/:
config.toml- Global settings (editor, commands, date formats)courses.json- Course registrystructure.json- Directory structure defaultsuicfg.toml- UI column widths and labels
Course-specific config lives in {course_root}/config.toml.
MIT