Question: I would like to force an update of App Store applications from the command line. 

How can I do this?

Answer: 
Apple doesn't supply a command line helper or any scriptable cocoa classes you can latch on to for automation. Unlike the overall software update, which allows updates and installs out of the box, you can script the process of clicking buttons with a mouse using Automator.

However, the app store has been reverse engineered and released open source [as well as a binary form](https://github.com/argon/mas/blob/master/ghreleases):

* <https://github.com/argon/mas>

The install is quick and it appears to be quite reliable on the current version of OS X 10.11:

```
brew install argon/mas/mas 

```

With the source released, I would expect some other implementations of this tool to pop up, perhaps even one scripted with python.

If someone is logged into the mac (windowmanager is running), you can use Automator and the "watch me do" function to automate updates and storing your store password in the script fairly insecurely.

Here are two tutorials to get you started if this meets your needs.

<http://www.tuaw.com/2009/01/19/mac-automation-creating-watch-me-do-workflows/>

<http://automator.us/leopard/features/virtual-user.html>

Once you have a working script, you can use the command line `open` command to kick it off. 

If the App Store app ever exposes that function to scripting you will have more options from the command line. It would be easy to use `sdef`, `sdp` and `gen_bridge_metadata` to [dump the entire scriptable dictionary and script things using ruby](http://www.macruby.org/trac/wiki/MacRubyTutorial) from the command line, but at present the best option would be to use the `mas` command line tool.
You can use the `softwareupdate` tool.

```
sudo softwareupdate -l

```

Lists all available updates.

```
sudo softwareupdate -ia

```

Installs all available updates.