texliveonfly

Downloads missing TeX Live packages while compiling .tex files. More information: https://ctan.org/pkg/texliveonfly.

texliveonfly source.tex

texliveonfly --compiler=compiler source.tex

texliveonfly --texlive_bin=path/to/texlive_bin source.tex