add cmdline support