---
name: "chef-apply"
section: "8"
platform: "linux"
package: "chef"
version: "13.8.7-4"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/chef-apply"
---

# chef-apply(8)

The man page for the chef-apply command line tool. chef-apply allows a single recipe to be run from the command line.

## NAME

chef-apply - The man page for the chef-apply command line tool.

chef-apply allows a single recipe to be run from the command line.

## OPTIONS

This command has the following syntax:

```
chef-apply name_of_recipe.rb
```

This tool has the following options:

- **-e RECIPE\_TEXT, --execute RECIPE\_TEXT**

  Use to execute a resource using a string.

- **-l LEVEL, --log\_level LEVEL**

  The level of logging that will be stored in a log file.

- **-s, --stdin**

  Use to execute a resource using standard input.

- **-v, --version**

  The version of the chef-client.

- **-W, --why-run**

  Use to run the executable in why-run mode, which is a type of chef-client run that does everything except modify the system. Use why-run mode to understand why the chef-client makes the decisions that it makes and to learn more about the current and proposed state of the system.

- **-h, --help**

  Shows help for the command.

## EXAMPLES

To use chef-apply to run a recipe named **machinations.rb**, enter the following:

```
$ chef-apply machinations.rb
```

## AUTHOR

Chef
