Implement the "pack" subcommand