Add auto mode.

Signed-off-by: cyberzhg <cyberzhg@gmail.com>