PHPackages                             jenssegers/chef - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. jenssegers/chef

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

jenssegers/chef
===============

Opscode Chef API library

2043.0k—8.9%18[6 issues](https://github.com/jenssegers/php-chef/issues)[3 PRs](https://github.com/jenssegers/php-chef/pulls)PHP

Since Feb 26Pushed 8y ago4 watchersCompare

[ Source](https://github.com/jenssegers/php-chef)[ Packagist](https://packagist.org/packages/jenssegers/chef)[ RSS](/packages/jenssegers-chef/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Chef
====

[](#chef)

The Chef Server API is used to provide access to objects on the Chef Server, including nodes, environments, roles, cookbooks (and cookbook versions), and to manage an API client list and the associated RSA public key-pairs.

*This is a generic library and has additional support for the Laravel framework.*

Installation
------------

[](#installation)

Add `jenssegers/chef` as a requirement to composer.json:

```
{
    "require": {
        "jenssegers/chef": "dev-master"
    }
}

```

Update your packages with `composer update` or install with `composer install`.

Usage
-----

[](#usage)

Create a chef object like this:

```
// composer
require_once 'vendor/autoload.php';
use Jenssegers\Chef\Chef;

// create chef object
$chef = new Chef($server, $client, $key, $version);

// API request
$response = $chef->api($endpoint, $method, $data);

```

See [http://docs.opscode.com/api\_chef\_server.html](http://docs.opscode.com/api_chef_server.html) for all available endpoints.

Examples
--------

[](#examples)

Get nodes:

```
$nodes = $chef->get('/nodes');

```

Create a data bag:

```
$bag = new stdClass;
$bag->name = "test";

$resp = $chef->post('/data', $bag);

```

Update a node:

```
$node = $chef->get('/nodes/webserver1');
$node->attributes->type = "webserver";

$chef->put('/nodes/webserver1', $node);

```

Delete a data bag:

```
$chef->delete('/data/test/item');

```

Laravel
-------

[](#laravel)

Register the Chef package with Laravel in `app/config/app.php`, add the following provider:

```
'Jenssegers\Chef\ChefServiceProvider',

```

And this alias:

```
'Chef'            => 'Jenssegers\Chef\Facades\Chef'

```

Create a copy of the configuration file using Artisan:

```
php artisan config:publish jenssegers/chef

```

Edit the created configuration file in `app/config/packages/jenssegers/chef/config.php` to match your environment:

```
'server'  = the URL for the Chef Server
'client'  = the name used when authenticating to a Chef Server
'key'     = the location of the file which contains the client key
'version' = the version of the Chef Server API that is being used

```

###  Health Score

30

—

LowBetter than 61% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/91980fbd02c3e65e0b2ec1c65e4ca0131f1bbc3929a0a11a7f4f12db5f2036e3?d=identicon)[jenssegers](/maintainers/jenssegers)

---

Top Contributors

[![jenssegers](https://avatars.githubusercontent.com/u/194377?v=4)](https://github.com/jenssegers "jenssegers (29 commits)")[![warroyo](https://avatars.githubusercontent.com/u/616621?v=4)](https://github.com/warroyo "warroyo (4 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (2 commits)")[![jeichorn](https://avatars.githubusercontent.com/u/122486?v=4)](https://github.com/jeichorn "jeichorn (1 commits)")[![ROunofF](https://avatars.githubusercontent.com/u/5734058?v=4)](https://github.com/ROunofF "ROunofF (1 commits)")[![viktors](https://avatars.githubusercontent.com/u/3460?v=4)](https://github.com/viktors "viktors (1 commits)")

### Embed Badge

![Health badge](/badges/jenssegers-chef/health.svg)

```
[![Health](https://phpackages.com/badges/jenssegers-chef/health.svg)](https://phpackages.com/packages/jenssegers-chef)
```

###  Alternatives

[pomander/pomander

Deployment for PHP

19615.7k2](/packages/pomander-pomander)[symfony-tools/docs-builder

The build system for Symfony's documentation

3668.5k1](/packages/symfony-tools-docs-builder)[enygma/composerclean

An additional command for Composer that removes configured files/directory

171.8k](/packages/enygma-composerclean)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
