For a project of mine I want to sign into the Mac App Store with my Apple ID using the Terminal. I'm currently using Mojave so I cannot use inbuilt sign in functions for libraries like mas

  • 3
    You need to add some details to your question - most importantly: What is it you want to sign in to? ... Also, why do you think you cannot use mas because you're running Mojave?
    – jksoegaard
    Jan 21 '19 at 18:20
  • Apologies for the lack of info! I wrote this after a very long day of debugging! Essentially I want to set up some macOS nodes in a cloud and each one needs Xcode on them. Being able to sign into the app store and download via terminal would streamline the process considerably! Unfortunately, mas does not support signin on mojave at the moment so I would need another way to signin
    – Berry
    Jan 22 '19 at 14:39

Currently mas does not support the signin command on Mojave.

No other purely Terminal-based method exists at the moment. There is none delivered with Mojave from Apple, nor does one exist currently as a third-party program.

However, you can use the following workaround:


In lines 162-201 it uses Apple Script to open the Mac App Store GUI application, and automatizes entering the Apple ID credentials. Essentially this makes it possible to sign in using the command line, in scripts and similar.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .