Class | Chef::Knife
In: | lib/chef/knife/tag_delete.rb lib/chef/knife/cookbook_metadata_from_file.rb lib/chef/knife/role_bulk_delete.rb lib/chef/knife/data_bag_from_file.rb lib/chef/knife/configure_client.rb lib/chef/knife/search.rb lib/chef/knife/data_bag_show.rb lib/chef/knife/client_edit.rb lib/chef/knife/data_bag_list.rb lib/chef/knife/cookbook_delete.rb lib/chef/knife/cookbook_bulk_delete.rb lib/chef/knife/node_from_file.rb lib/chef/knife/cookbook_upload.rb lib/chef/knife/cookbook_site_unshare.rb lib/chef/knife/core/object_loader.rb lib/chef/knife/core/subcommand_loader.rb lib/chef/knife/core/cookbook_scm_repo.rb lib/chef/knife/core/node_presenter.rb lib/chef/knife/core/bootstrap_context.rb lib/chef/knife/core/ui.rb lib/chef/knife/core/text_formatter.rb lib/chef/knife/core/generic_presenter.rb lib/chef/knife/core/node_editor.rb lib/chef/knife/bootstrap.rb lib/chef/knife/cookbook_metadata.rb lib/chef/knife/node_show.rb lib/chef/knife/data_bag_create.rb lib/chef/knife/client_show.rb lib/chef/knife/role_from_file.rb lib/chef/knife/node_list.rb lib/chef/knife/role_show.rb lib/chef/knife/environment_show.rb lib/chef/knife/node_create.rb lib/chef/knife/cookbook_download.rb lib/chef/knife/role_edit.rb lib/chef/knife/environment_create.rb lib/chef/knife/configure.rb lib/chef/knife/status.rb lib/chef/knife/cookbook_test.rb lib/chef/knife/cookbook_show.rb lib/chef/knife/client_delete.rb lib/chef/knife/environment_list.rb lib/chef/knife/index_rebuild.rb lib/chef/knife/node_delete.rb lib/chef/knife/environment_from_file.rb lib/chef/knife/node_run_list_add.rb lib/chef/knife/cookbook_site_install.rb lib/chef/knife/data_bag_delete.rb lib/chef/knife/role_create.rb lib/chef/knife/cookbook_site_list.rb lib/chef/knife/client_bulk_delete.rb lib/chef/knife/data_bag_edit.rb lib/chef/knife/client_create.rb lib/chef/knife/node_run_list_remove.rb lib/chef/knife/cookbook_create.rb lib/chef/knife/node_edit.rb lib/chef/knife/cookbook_list.rb lib/chef/knife/client_list.rb lib/chef/knife/ssh.rb lib/chef/knife/help.rb lib/chef/knife/environment_edit.rb lib/chef/knife/environment_delete.rb lib/chef/knife/cookbook_site_show.rb lib/chef/knife/cookbook_site_download.rb lib/chef/knife/cookbook_site_share.rb lib/chef/knife/cookbook_site_search.rb lib/chef/knife/tag_list.rb lib/chef/knife/node_bulk_delete.rb lib/chef/knife/tag_create.rb lib/chef/knife/client_reregister.rb lib/chef/knife/role_list.rb lib/chef/knife/role_delete.rb lib/chef/knife.rb
Parent: | Object

### Methods

api_key category common_name configure_chef create_object delete_object deps format_rest_error guess_category highlight_config_error humanize_exception humanize_http_exception inherited list_commands load_commands load_deps msg new noauth_rest parse_options read_config_file reset_subcommands! rest run run_with_pretty_exceptions server_url show_usage snake_case_name subcommand_category subcommand_class_from subcommand_loader subcommands subcommands_by_category ui unnamed? username

### Included Modules

Mixlib::CLI

### Classes and Modules

Module Chef::Knife::Core
Class Chef::Knife::Bootstrap
Class Chef::Knife::ClientBulkDelete
Class Chef::Knife::ClientCreate
Class Chef::Knife::ClientDelete
Class Chef::Knife::ClientEdit
Class Chef::Knife::ClientList
Class Chef::Knife::ClientReregister
Class Chef::Knife::ClientShow
Class Chef::Knife::Configure
Class Chef::Knife::ConfigureClient
Class Chef::Knife::CookbookBulkDelete
Class Chef::Knife::CookbookCreate
Class Chef::Knife::CookbookDelete
Class Chef::Knife::CookbookDownload
Class Chef::Knife::CookbookList
Class Chef::Knife::CookbookMetadata
Class Chef::Knife::CookbookMetadataFromFile
Class Chef::Knife::CookbookSCMRepo
Class Chef::Knife::CookbookShow
Class Chef::Knife::CookbookSiteDownload
Class Chef::Knife::CookbookSiteInstall
Class Chef::Knife::CookbookSiteList
Class Chef::Knife::CookbookSiteSearch
Class Chef::Knife::CookbookSiteShare
Class Chef::Knife::CookbookSiteShow
Class Chef::Knife::CookbookSiteUnshare
Class Chef::Knife::CookbookSiteVendor
Class Chef::Knife::CookbookTest
Class Chef::Knife::CookbookUpload
Class Chef::Knife::DataBagCreate
Class Chef::Knife::DataBagDelete
Class Chef::Knife::DataBagEdit
Class Chef::Knife::DataBagFromFile
Class Chef::Knife::DataBagList
Class Chef::Knife::DataBagShow
Class Chef::Knife::EnvironmentCreate
Class Chef::Knife::EnvironmentDelete
Class Chef::Knife::EnvironmentEdit
Class Chef::Knife::EnvironmentFromFile
Class Chef::Knife::EnvironmentList
Class Chef::Knife::EnvironmentShow
Class Chef::Knife::Exec
Class Chef::Knife::Help
Class Chef::Knife::IndexRebuild
Class Chef::Knife::NodeBulkDelete
Class Chef::Knife::NodeCreate
Class Chef::Knife::NodeDelete
Class Chef::Knife::NodeEdit
Class Chef::Knife::NodeEditor
Class Chef::Knife::NodeFromFile
Class Chef::Knife::NodeList
Class Chef::Knife::NodeRunListAdd
Class Chef::Knife::NodeRunListRemove
Class Chef::Knife::NodeShow
Class Chef::Knife::RecipeList
Class Chef::Knife::RoleBulkDelete
Class Chef::Knife::RoleCreate
Class Chef::Knife::RoleDelete
Class Chef::Knife::RoleEdit
Class Chef::Knife::RoleFromFile
Class Chef::Knife::RoleList
Class Chef::Knife::RoleShow
Class Chef::Knife::Search
Class Chef::Knife::Ssh
Class Chef::Knife::Status
Class Chef::Knife::SubcommandLoader
Class Chef::Knife::TagCreate
Class Chef::Knife::TagDelete
Class Chef::Knife::TagList
Class Chef::Knife::UI

### Constants

OFFICIAL_PLUGINS | = | %w[ec2 rackspace windows openstack terremark bluebox]

### Attributes

name_args | [RW] |
ui | [RW] |

### Public Class methods

category(new_category)

Explicitly set the category for the current command to `new_category` The category is normally determined from the first word of the command name, but some commands make more sense using two or more words

### Arguments

new_category:: | A String to set the category to (see examples)

### Examples:

Data bag commands would be in the ‘data’ category by default. To put them in the ‘data bag’ category:

      category('data bag')

common_name()
deps(&block)
guess_category(args)
inherited(subclass)
list_commands(preferred_category=nil)

Print the list of subcommands knife knows about. If `preferred_category` is given, only subcommands in that category are shown

load_commands()
load_deps()
msg(msg="")
new(argv=[])

Create a new instance of the current class configured for the given arguments and options

reset_subcommands!()
run(args, options={})

Run knife for the given `args` (ARGV), adding `options` to the list of CLI options that the subcommand knows how to handle.

### Arguments

args:: | usually ARGV
options:: | A Mixlib::CLI option parser hash. These `options` are how

subcommands know about global knife CLI options

snake_case_name()
subcommand_category()
subcommand_class_from(args)
subcommand_loader()
subcommands()
subcommands_by_category()
ui()
unnamed?()

Does this class have a name? (Classes created via Class.new don‘t)

### Public Instance methods

api_key()
configure_chef()
create_object(object, pretty_name=nil, &block)
delete_object(klass, name, delete_name=nil, &block)
format_rest_error(response)

Parses JSON from the error response sent by Chef Server and returns the error message

highlight_config_error(file, line)
humanize_exception(e)
humanize_http_exception(e)
noauth_rest()
parse_options(args)
read_config_file(file)
rest()
run_with_pretty_exceptions()
server_url()
show_usage()
username()

[Validate]