Working with OpenSCAD for a few weeks, I quickly wished there was an easy dependency manager. None of the options appealed to me, so I made my own. It could actually be used with most any language, really, and is basically just a script that invokes Git to clone dependencies into a folder in your home directory, then creates a link to said folder. Behold
# OpenSCAD dependency management through Git.
# Probably works for other things, too.
# Edit dependencies, run, then in your scads do e.g.:
# use <deps.link/BOSL/joiners.scad>
# MIT License; do what you want. -Erhannis
while getopts hl:r: option
h) echo $'./get_deps.sh [-h] [-l LOCAL=deps.link] [-r REMOTE=~/.scad_deps]';;
if [ ! -e "$LOCAL" ]; then
mkdir -p "$REMOTE"
ln -s "$REMOTE" "$LOCAL"
#TODO Should recursively fetch dependencies
#TODO Should MAYBE update dependencies
git clone https://github.com/revarbat/BOSL
Just add any other dependencies at the bottom, and in your scad files, do e.g.
It’s worked quite well for me, so far, (aside from usually having to convert Thingiverse libraries into Github repos), though I expect a larger, longer term, or more complicated project would need features the script doesn’t currently offer. Better than a poke in the eye, at least, and I’m pleased with its simplicity.
Oh, do note that it’s a Linux script. You could make an equivalent Windows batch file. I haven’t.