CLI

Convert script to CLI