reimplement AMF import for CLI without jquery