REF: move dependency stuff into separate module.
FEAT: add list_libraries sub_command.