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

        if @client_name.nil?
          show_usage
          Chef::Log.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

        Chef::Log.info("Created (or updated) #{output}")
        
        if config[:file]
          File.open(config[:file], "w") do |f|
            f.print(key['private_key'])
          end
        else
          puts key['private_key']
        end
      end