Skip to content
This repository has been archived by the owner. It is now read-only.

Build your own Applets

Abdy Franco edited this page Apr 7, 2019 · 13 revisions

To create your own applets, it is highly recommended that you use IFTTT Platform as it allows you to create more versatile applets. You can sign up for IFTTT Platform in the following link:

Available Commands

macOS IFTTT Control works thanks to m-cli, so it's possible to use any m-cli command with IFTTT, plus some extra macOS IFTTT Control commands. The commands available at this moment are:


usage: bluetooth [ status | on | enable | off | disable | help ]

  bluetooth status    # bluetooth status
  bluetooth on        # turn on bluetooth
  bluetooth enable    # turn on bluetooth
  bluetooth off       # turn off bluetooth
  bluetooth disable   # turn off bluetooth


usage: disk [ ls | list | info | fs | filesystems | ejectall | verify | repair | help ]

  disk ls                                 # list disks
  disk list                               # list disks
  disk list /dev/disk0                    # list a specific disk

  disk fs                                 # list available filesystems for formatting
  disk filesystems                        # list available filesystems for formatting

  disk info /dev/disk0                    # display information

  disk ejectall                           # eject all mountable volumes

  disk verify volume /Volume/MyVol        # verify volume
  disk verify disk /dev/disk0             # verify disk

  disk repair volume /Volume/MyVol        # repair volume
  disk repair disk /dev/disk0             # repair disk

  disk format MS-DOS MYNAME /dev/disk2              # format the entire disk with a windows format (MS-DOS)
  disk format volume MS-DOS MYNAME /Volumes/myvol   # format the volume with a windows format (MS-DOS)

  disk reformat /Volumes/myvol            # reformat a volume
  disk rename CURRENTNAME NEWNAME         # rename a volume


usage: display [ status | help ]

  display status   # status of displays
  display help     # show usage


usage:  dns [ flush | help ]

  dns flush       # flushes local DNS


usage: dock [ showdelay | autohide | magnification | position | addblankspace | addrecentitems | prune | help ]

  dock showdelay x.x          # Changes how long the Dock takes to show up when auto-hide is enabled
  dock autohide YES           # Enable Dock's auto hide feature
  dock autohide NO            # Disable Dock's auto hide feature
  dock magnification YES      # Turn magnification on
  dock magnification NO       # Turn magnification off
  dock position BOTTOM        # Change Dock's position to the bottom of the screen
  dock position LEFT          # Change Dock's position to the left of the screen
  dock position RIGHT         # Change Dock's position to the right of the screen
  dock addblankspace          # Add a blank space (separator) to the Dock
  dock addrecentitems         # Add a stack containg your recent items to the Dock
                                #  (You can change the stack's type by right clicking on it)
  dock prune                  # Removes all apps from Dock


usage: dir [ tree | size | delete | help ]

  dir tree        # tree view of folders in the current path
  dir tree /path  # tree view of folders in a specific path

  dir delete empty          # delete empty folders recursively in the current path
  dir delete empty /path    # delete empty folders recursively in a specific path

  dir delete dsfiles        # delete .DS_Store files recursively in the current path
  dir delete dsfiles /path  # delete .DS_Store files recursively in a specific path

  dir size        # calculate current folder size
  dir size /path  # calculate folder size in a specific path


usage: finder [ showhiddenfiles | showfileextensions | showdesktop | showpath | help  ]

  finder showhiddenfiles           # get the current status
  finder showhiddenfiles YES       # show hidden files
  finder showhiddenfiles NO        # no show hidden files

  finder showextensions            # get the current status
  finder showextensions YES        # show all file extensions
  finder showextensions NO         # don't show all file extensions

  finder showdesktop               # get the current desktop status
  finder showdesktop YES           # enable the desktop
  finder showdesktop NO            # disable the desktop

  finder showpath YES              # show the current opened folder path on the top bar of the Finder window
  finder showpath NO               # show the current opened folder name on the top bar of the Finder window


usage: firewall [ status | enable | disable | list | add | remove | help ]

   firewall status                # Show status
   firewall enable                # Enable firewall
   firewall disable               # Disable firewall
   firewall list                  # List applications handled by firewall
   firewall add /path/to/file     # Add app to firewall
   firewall remove /path/to/file  # Remove app from firewall


usage:  flightmode [ on | off | help ]

  flightmode on                      # turn flightmode on
  flightmode off                     # turn flightmode off


usage: gatekeeper [ status | list | ls | enable | disable | create | help ]

  gatekeeper status                               # gatekeeper status
  gatekeeper list                                 # list rules

  gatekeeper enable                               # enable gatekeeper
  gatekeeper disable                              # disable gatekeeper

  gatekeeper enable MYRULE                        # enable rule
  gatekeeper disable MYRULE                       # disable rule

  gatekeeper create  RULENAME /path/to/program    #  Create a rule for the application


usage: group [ list | ls | info | adduser | removeuser | ismember | help ]

  group list                          # get list of groups
  group info mygroup                  # display group information

  group adduser myuser mygroup        # add an user to a specific group
  group removeuser myuser mygroup     # remove an user from a specific group

  group ismember myuser mygroup       # show if the user is a member of a specific group


usage: hostname [ help ]

  hostname                # get the current hostname information (computername, hostname, localhostname and netbiosname)
  hostname newhostname    # set a new hostname (computername, hostname, localhostname, netbiosname)

  hostname help           # only shows this help


usage: info [ help ]

  info        #  print macOS operating system version information


usage: itunes [ status | play | pause | next | prev | mute | unmute | vol up | vol down | vol #| stop | quit | help ]

  itunes status       # Show status
  itunes play         # Play track
  itunes pause        # Pause track
  itunes next         # Play next track
  itunes prev         # Play previous track
  itunes mute         # Mute iTunes
  itunes unmute       # Unmute iTunes
  itunes vol up       # Volume Up
  itunes vol down     # Volume Down
  itunes vol #        # Set volume level
  itunes stop         # Stop track
  itunes quit         # Quit iTunes


usage:  lock [ help ]

  lock      # lock session


usage: ntp [ status | enable | disable | set | help ]

  ntp status                          # status of the network time service
  ntp enable                          # enable clock to use network time
  ntp disable                         # disable clock to use network time
  ntp set      # set network time server


usage: printer [ settings | name | queue | drivers | web | help ]

  printer settings    # Printer settings
  printer name        # Display printer names on system
  printer queue       # Display items in printer queue on system
  printer drivers     # Display all printer drivers
  printer web         # Enable and show web interface


usage:  network [ ls | list | location | help ]

  network ls                          # list network interfaces
  network location                    # get current location
  network location ls                 # list locations
  network location create XYZ         # create a location
  network location delete XYZ         # delete a location
  network location switch XYZ         # switch location


usage: nosleep [ until | help ]

  nosleep until 3600            # no sleep until 3600 seconds
  nosleep until    # no sleep until the script ends

  nosleep until pid 64377       # no sleep until the process id ends


usage: notification [ showcenter | help  ]

  notification showcenter      # get the current status
  notification showcenter YES  # enable the notification center
  notification showcenter NO   # disable the notification center


usage:  restart [ -f | --force | help ]

  restart     # restart computer (needs confirmation)
  restart -f  # restart computer (without confirmation)


usage: safeboot [ status | enable | disable | help ]

  safeboot status     # get the boot args
  safeboot enable     # enable safe boot
  safeboot disable    # disable safeboot


usage: screensaver [ status | askforpassword | help ]

  screensaver                         # launch screensaver

  screensaver status                  #  get the current status
  screensaver askforpassword          #  get password requirement to unlock
  screensaver askforpassword YES      #  enable password requirement to unlock
  screensaver askforpassword NO       #  disable password requirement to unlock


usage: service [ --status-all | --list |  --ls | start | stop | load | unload | help ]

  service --status-all                        # list all services

  service --list                              # list all services
  service --ls                                # list all services
  service --ls       # show information about a specific service

  service start      # start a service
  service stop       # stop a service

  service load       # load a service
  service unload     # unload a service


usage:   shutdown [-f | --force | help ]

  shutdown     # shutdown computer (needs confirmation)
  shutdown -f  # shutdown computer (without confirmation)


usage: sleep [ help ]

  sleep       #  put the mac to sleep


usage: timezone [ list | ls | set | help ]

  timezone                    # get current timezone
  timezone ls                 # list available timezones
  timezone set Europe/Berlin  # set timezone


usage: trash [ status | clean | help ]

  trash status    # get trash info
  trash clean     # clean trash


usage: update [ list | install | help ]

  update list                                                 # list available updates
  update install all                                          # install all the available updates
  update install iTunesX-12.4.1 RAWCameraUpdate6.20-6.20      # install specific updates


usage: user [ list | ls | info | create | delete | help ]

  user ls                # list users
  user info demouser     # display user information

  user create            # create a user, it will ask you the below information
                                Full name:
                                Shell [/bin/bash]:

  user delete demouser   # delete user


usage:  volume [ level(0-100) | change(-n|+n) | up | down | mute | unmute | ismute ]

  volume 70     # set the volume to 70 %
  volume +5     # increase the volume by 5 (up to 100)
  volume -10    # decrease the volume by 5 (down to 0)
  volume up     # increase the volume by 6.25
  volume down   # decrease the volume by 6.25
  volume        # get the volume level
  volume mute   # set mute
  volume unmute # unset mute
  volume ismute # check the volume status


usage:  vpn [ ls | list | start | stop | status | help ]

  vpn ls                              # list VPN connections

  vpn start                           # interactive mode
  vpn start VPN                       # start vpn connection named VPN
  vpn start VPN USER                  # start a vpn connection with a given user
  vpn start VPN USER PASS             # start a vpn connection with a given user and password
  vpn start VPN USER PASS SECRET      # start a vpn connection with a given user, password, and secret

  vpn stop VPN                        # stop vpn connection named VPN
  vpn status VPN                      # status vpn connection named VPN


usage: wallpaper [ /path/to/file.jpg | help ]

  wallpaper ./wallpapers/tree.jpg  # set wallpaper


usage:  wifi [ scan | off | on | connect | help ]

  wifi status                  # wifi status
  wifi scan                    # scan wifi
  wifi showpassword [ESSID]    # show wifi network password (default: current)
  wifi ls                      # list known wifi networks
  wifi list                    # list known wifi networks
  wifi forget ESSID            # forget a wifi network
  wifi history                 # wifi connection history
  wifi off                     # turn off your wifi
  wifi on                      # turn on your wifi
  wifi connect ESSID PASSWORD  # join a wifi network
  wifi connect ESSID           # join a wifi network (prompt for password)


usage:  download [ url ]

  open ""    # downloads a file

Notification Center:

usage:  notificationcenter [ title | message ]

  notificationcenter "hello" "world" # shows a notification on the notification center


usage:  open [ file | application | url ]

  open ""                   # opens a website
  open /Volumes/Archive/Documents/file.txt   # opens a file
  open /Applications/            # opens an application


usage:  say [ message ]

  say "hello"    # says hello

Making your own Applet

For the trigger of your Applet, you can choose almost any IFTTT service since the triggers are independent to macOS IFTTT Control, For this tutorial we will use the service "Button Widget" as trigger.

For this example, we will create a button that turns off the Bluetooth on our Mac.

1. Selecting the Trigger

As I said before, you can choose almost any service from IFTTT, The only condition is that the service that will be used as a trigger has a unique ingredient, such as the date on which it was triggered. For this example I will use the Button Widget as a trigger.

Button Widget

2. Selecting the Action

For the action, the "Dropbox" service must always be used. Once the Dropbox service has been selected, the "Append to a text file" option must be selected.

Dropbox Options

3. Building the Action Command

Now is the time to build the command that will run on our Mac, in this case we want to turn off the Bluetooth. For that we must fill the following data inside the applet:

  • File name: Your Mac Hash
  • Content: The command to execute
  • Dropbox folder path: macOSIFTTTControl/

The commands should be written in the following format: unique id|command parameters, You can use the trigger date as unique id. In this case our command will be {{OccurredAt}}|bluetooth off

Dropbox Settings

4. Done

And that's it! Your applet is ready, now you can try it or port it to IFTTT Platform to share it with more users.

Applet Preview

Publishing Applets

If you want to create an applet in order to publish it later, you must follow all the steps above but using the IFTTT Platform interface which is intended for developers rather than the end user interface.

If the purpose of the applet is to be published in the Marketplace we recommend you to read this article.