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 1.2.0

Automates installation of Mac App Store apps

cookbook 'mac-app-store', '= 1.2.0', :supermarket
cookbook 'mac-app-store', '= 1.2.0'
knife supermarket install mac-app-store
knife supermarket download mac-app-store
Quality 100%

Mac App Store Cookbook

Cookbook Version
Build Status
Code Climate
Coverage Status

A Chef cookbook for installation of Mac App Store apps.


Obviously, OS X is required. Some tempered expectations are as well--there is
no documented public API for installing App Store apps, so this cookbook works
by automating GUI window switches and button clicks.

Nothing in this cookbook will attempt to purchase an app for you--it can only
install ones that are already in your purchase history.


A new resource is defined as well as an attribute-driven default recipe, either
of which can be used.

Any reference to an application name means the name displayed in the App Store
(e.g. even though the app is named "Tweetbot" its App Store entry calls it
"Tweetbot for Twitter"). Any reference to the bundle or package ID means the
package's ID as shown in the output of the pkgutil command.

Some example app names and their corresponding bundle IDs, as of 2015-04-18
(some of them seem to change over time to correspond to their versions):

App Name Bundle ID
1Password - Password Manager and Secure Wallet com.agilebits.onepassword-osx
Airmail it.bloop.airmail
Dash - API Docs & Snippets com.kapeli.dash
Divvy - Window Manager com.mizage.Divvy
Evernote com.evernote.Evernote
Fantastical - Calendar and Reminders com.flexibits.fantastical
Fantastical 2 - Calendar and Reminders com.flexibits.fantastical2.mac
FaxFresh com.purplecover.faxfresh
GarageBand 6.0.5
GIF Brewery com.helloresolven.CineGIF
Growl com.Growl.GrowlHelperApp
iBooks Author
Lock Me Now com.bymaster.lockmenow
Mail Pilot co.mindsense.MailPilotMac
Markdown Pro com.radsense.markdown
Marked com.brettterpstra.marky
Microsoft OneNote
Microsoft Remote Desktop
MPlayerX org.niltsh.MPlayerX
OceanBar com.stylemac.OceanBar
Osfoora for Twitter osfoora.osfooramac
Reeder com.reederapp.mac
Slack com.tinyspeck.slackmacgap
SourceTree (Git/Hg) com.torusknot.SourceTree
Sunrise Calendar m.sunrise.mac
Textual com.codeux.irc.textual
The 7th Guest com.trilobytegames.the7thguestosx
Trillian com.ceruleanstudios.trillian.osx
Tweetbot for Twitter com.tapbots.TweetbotMac
Twitter com.twitter.twitter-mac
Visual JSON org.3rddev.VisualJSON
White Noise Lite com.tmsoft.mac.WhiteNoiseLite
WiFi Explorer wifiexplorer

Known Limitations

  • Your Chef run may be slow, especially if bundle IDs aren't provided for the apps being installed. This is due to all the page loads that have to be waited on while navigating the App Store.
  • A successful run requires Chef to have control over OS X's UI--moving your mouse or pressing Cmd+Tab during a run may result in undesirable behavior.
  • The UI actions performed by this cookbook require a running window server--a user must be logged into OS X.
  • OS X uses a permission system where individual apps are granted access to its Accessibility API. This cookbook will make a best effort to authorize the app running Chef, but any errors will result in a failed Chef run and a GUI warning popup asking for permission.
  • The Accessibility API, and the App Store in particular, are suceptible to assorted race conditions. Attempts have been made to catch most of these, but any errors and stack traces can be reported on the issues page.



  • Installs the OS X command line tools (via the build-essential cookbook)
  • Opens the Mac App Store
  • Signs into the App Store with a given Apple ID
  • Installs each of an attribute-derived list of apps



An attribute is supplied to represent a set of apps to install:

default['mac_app_store']['apps'] = nil

It can be overridden with an array of app names (as displayed in the App Store):

default['mac_app_store']['apps'] = ['Tweetbot for Twitter']

Optionally, the bundle IDs for the apps (as displayed in pkgutil) can also be
provided to speed up the Chef run:

default['mac_app_store']['apps'] = [
  { name: 'Tweetbot for Twitter', bundle_id: 'com.tapbots.TweetbotMac' }

By default, the main recipe assumes an Apple ID is already signed into the App
Store, but a set of credentials can be provided:

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



A singleton resource, there can be only one. Used to start and configure the
App Store application itself.


mac_app_store 'default' do
  username ''
  password 'abc123'
  action :open


Action Description
:open Default; starts the App Store
:quit Quits the App Store


Attribute Default Description
username nil An Apple ID username
password nil An Apple ID password
action :open Action(s) to perform


Used to install a single app from the App Store. Requires that the App Store
be running and an Apple ID signed into.


mac_app_store_app 'Some App' do
  app_name 'Some App'
  timeout 1200
  bundle_id 'com.example.someapp'
  action :install


Action Description
:install Default; installs the given app


Attribute Default Description
app_name resource name App name if it doesn't match resource name
timeout 600 Time to wait on a download + install
bundle_id nil Optionally specify the app ID (from pkgutil)
action :install Action(s) to perform



Provider for interactions with the App Store itself.


All the logic for app installs.


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add tests for the new feature; ensure they pass (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

License & Authors

Copyright 2015-2016, 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

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

Foodcritic Metric

1.2.0 passed this metric