It seems that Sourceror has an example for this: https://github.com/doorgan/sourceror/blob/main/examples/add_dependency.exs