add encoding to cli.rb