Back to Cs249r Book

Binder: Native vs script delegation

book/cli/BINDER_NATIVE_AUDIT.md

latest2.1 KB
Original Source

Binder: Native vs script delegation

Binder is the canonical CLI. This doc lists which commands are fully self-contained (no dependency on book/tools/scripts/) and which still delegate to scripts.

Fully native (no tools/scripts)

CommandImplementation
validate referencesbook/cli/commands/reference_check.py — all logic in CLI
Build, preview, doctor, bib (betterbib), render, infoUse Quarto, system tools, or in-process logic only
maintain images compressUses ImageMagick via subprocess; no scripts
maintain repo-healthUses git commands; no scripts
Unit-tests checkRuns book/quarto/mlsys/test_units.py (book package, not tools/scripts)

Still delegate to book/tools/scripts

Command / checkScript path
validate table-contenttools/scripts/content/validate_tables.py
validate spelling-prosetools/scripts/content/check_prose_spelling.py
validate spelling-tikztools/scripts/content/check_tikz_spelling.py
validate epubtools/scripts/utilities/validate_epub.py
validate sourcestools/scripts/utilities/manage_sources.py
validate grid-tablestools/scripts/utilities/convert_grid_to_pipe_tables.py
validate image-formatstools/scripts/images/manage_images.py
validate external imagestools/scripts/images/manage_external_images.py
clean (build artifacts)tools/scripts/maintenance/cleanup_build_artifacts.py
format pythontools/scripts/content/format_python_in_qmd.py
format tablestools/scripts/content/format_tables.py
format divstools/scripts/content/format_div_spacing.py
format prettifytools/scripts/utilities/prettify_pipe_tables.py
debug (section splitter)Imports tools/scripts/content/section_splitter.py

Goal

Over time, these should be migrated into native CLI modules (under book/cli/commands/) so Binder is fully self-contained and does not depend on book/tools/scripts/.