Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


mac-app-store (13) Versions 3.1.0

Automates installation of Mac App Store apps

cookbook 'mac-app-store', '~> 3.1.0', :supermarket
cookbook 'mac-app-store', '~> 3.1.0'
knife supermarket install mac-app-store
knife supermarket download mac-app-store
Quality 33%

Mac App Store Cookbook

Cookbook Version
Build Status
Code Climate
Coverage Status

A Chef cookbook for installation of Mac App Store apps via the
Mas CLI tool.


Mas requires OS X 10.10+. As of v2.0, this cookbook requires Chef 12.5+ (or
Chef 12.x and the

A user must be logged into OS X for Mas to operate properly.


Apps can be installed by using the included custom resources in recipes of your
own, or with the predefined recipe and set of attributes.



Installs the Mas CLI tool and an attribute-derived set of App Store apps.



default['mac_app_store']['username'] = nil
default['mac_app_store']['password'] = nil

Set these two attributes with the Apple ID user and password you wish to log
into the App Store as.

default['mac_app_store']['apps'] = {}

Set apps as keys+values under this space, where the key is the full app name
and value is true to install it or false to not. For example:

default['mac_app_store']['apps']['Growl'] = true

Mas can be installed via Homebrew (:homebrew, the default) or GitHub
download (:direct).

default['mac_app_store']['mas']['source'] = nil

If desired, a specific version of Mas can be installed rather than the latest:

default['mac_app_store']['mas']['version'] = nil

In certain circumstances-e.g. Chef running as root-it may be necessary to run
Mas via the reattach-to-user-namespace utility:

default['mac_app_store']['mas']['use_rtun'] = nil



A custom resource to manage installation of the Mas CLI tool for interacting
with the App Store.


mac_app_store_mas 'default' do
  source :direct
  version: '1.2.3'
  username ''
  password 'abc123'
  use_rtun false
  action %i(install sign_in)


Action Description
:install Default; install the Mas CLI
:upgrade Upgrade Mas, if available
:remove Uninstall Mas
:sign_in Use Mas to sign into the App Store
:sign_out Sign out of the App Store
:upgrade_apps Install any upgrades for apps on the system


Property Default Description
source :homebrew Install from :homebrew or GitHub (:direct)
version nil The version of Mas to install
username nil An Apple ID username
password nil An Apple ID password
use_rtun false Use RtUN when shelling out to Mas
action %i(install sign_in) Action(s) to perform


Used to install a single App Store app via Mas. Requires that an Apple ID be
signed into.


mac_app_store_app 'Some App' do
  app_name 'Some App'
  use_rtun false
  action :install


Action Description
:install Default; installs the given app
:upgrade Upgrade or install the app


Property Default Description
app_name resource name App name if it doesn't match resource name
use_rtun false Use RtUN when shelling out to Mas
action :install Action(s) to perform


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add tests for the new feature; ensure they pass (bundle exec rake)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request
  7. Watch the pull request and ensure the build passes

License & Authors

Copyright 2015-2017, Jonathan Hartman

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Mac App Store Cookbook CHANGELOG

v3.1.0 (2017-04-20)

  • Update the homebrew cookbook dependency

v3.0.0 (2017-03-31)

  • Update the cookbook dependency pinned versions
  • Sign out of Mas before trying to sign in as another user
  • Remove all system_user attributes and properties
  • Respect a version property in mac_app_store_mas::install
  • Raise an error if trying to use Mas before it's installed
  • Make Homebrew the default Mas installation method

v2.1.0 (2016-06-08)

  • Add the option of using reattach-to-user-namespace

v2.0.3 (2016-06-02)

  • Shell out as the correct user in helper methods

v2.0.2 (2016-05-31)

  • Quote passwords passed to mas CLI in log_in action

v2.0.1 (2016-05-24)

  • Add a ChefSpec upgrade app matcher

v2.0.0 (2016-05-23)

  • Completely rewrite to use Mas CLI instead of mouse control
  • Update to use custom resources (breaking Chef 11 compatibility)

v1.2.0 (2016-03-25)

  • Update build-essential dep to v3.x

v1.1.1 (2016-02-24)

  • Fix issue with bundled apps not getting accessibility rights

v1.1.0 (2015-08-16)

  • Update to Chef 12-style provider mapping (drops compatibility with Chef 11).
  • Replace dependency on macosx_accessibility (deprecated) with privacy_services_manager.

v1.0.1 (2015-08-06)

  • Replace references to App Store "Purchases" tab (now named "Purchased").

v1.0.0 (2015-05-08)

  • Pin to a newer (albeit prerelease) version of the AXElements gem that doesn't error out under Yosemite.
  • Drop the mac_app_store_trusted_app resource--it doesn't belong here. Use the new osx_accessibility cookbook instead.
  • Refactor everything out of the compile stage--end the arms race.
  • Configure the App Store to open (and quit) on every Chef run--its guard was failing when installing apps inline inside other resources.

v0.1.0 (2015-04-20)

  • Initial release!

v0.0.1 (2015-01-04)

  • Development started

Collaborator Number Metric

3.1.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

3.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Foodcritic Metric

3.1.0 passed this metric

No Binaries Metric

3.1.0 passed this metric

Testing File Metric

3.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

3.1.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number