Only import commandline libs when using commandline mode