Skip to content
/ lec-cli Public

A CLI tool to manage lecture notes, using Python and Typst

Notifications You must be signed in to change notification settings

mkiene/lec-cli

Repository files navigation

lec

A command-line tool for managing lecture notes written in Typst. Disclaimer: built with Claude Code.

Features

  • 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

Requirements

  • Python 3.11+
  • Typst for PDF compilation
  • pdfunite (optional, for combining PDFs): brew install poppler

Installation

Add the lec script to your PATH or create an alias.

Quick Start

# 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

Commands

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

Configuration files are stored in ~/.config/lec/:

  • config.toml - Global settings (editor, commands, date formats)
  • courses.json - Course registry
  • structure.json - Directory structure defaults
  • uicfg.toml - UI column widths and labels

Course-specific config lives in {course_root}/config.toml.

License

MIT

About

A CLI tool to manage lecture notes, using Python and Typst

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published