# File lib/chef/knife/client_create.rb, line 43
      def run
        @client_name = @name_args[0]

        if @client_name.nil?
          show_usage
          ui.fatal("You must specify a client name")
          exit 1
        end

        client = Chef::ApiClient.new
        client.name(@client_name)
        client.admin(config[:admin])

        output = edit_data(client)

        key = output.save

        ui.info("Created #{output}")

        if config[:file]
          File.open(config[:file], "w") do |f|
            f.print(key['private_key'])
          end
        else
          puts key['private_key']
        end
      end