Add function for init command.