---
title: "The MAS, updates and the CLI"
slug: the-mas-updates-and-the-cli
section: tech
date: 2016-03-22T19:02:00.000Z
canonical: https://roland.leth.ro/blog/tech/the-mas-updates-and-the-cli
---

I've had problems with stuck updates, or slow downloads with the MAS for as far as I can remember. `softwareupdate` never really was of much help, using MAS' `Debug` menu neither, nor killing `softwareupdate` related processes.

Yesterday I found the answer to all of this: [a gem](https://github.com/argon/mas) for manipulating the MAS from the CLI. It uses native APIs, from login (the MAS login pops up), to downloading files (you can even start an update with the MAS and finish it on the CLI - the download files are the same). And you also get a nice, little progress bar.

A few commands available:

```bash
$ mas list
446107677 Screens
407963104 Pixelmator
497799835 Xcode

$ mas install 497799835
==> Downloading Xcode
==> Installed Xcode

$ mas upgrade
Upgrading 2 outdated applications:
Xcode (7.0), Screens VNC - Access Your Computer From Anywhere (3.6.7)
==> Downloading Xcode
==> Installed Xcode    
==> Downloading Screens
==> Installed Screens  
```

*I'm quite happy.*
