Definitions

Define aspects of your Shortcut, such as the color and glyph of the icon, and how it responds to no input, what types it accepts as input and outputs, etc.

Table of contents

  1. Definitions
    1. Icon
      1. Color
      2. Glyph
    2. Accepted Input & Output Types
    3. No Input
      1. Stop and Respond
      2. Get Clipboard Contents
      3. Ask for a content item type
    4. From (Workflows)
      1. Workflows
    5. Quick Action Types
      1. Quick Actions
    6. macOS only or non-macOS
    7. Name
    8. Version

Icon

Define the look of your Shortcut using one of the supported colors and glyphs.

Color

#define color red
  • red
  • darkorange
  • orange
  • yellow
  • green
  • teal
  • lightblue
  • blue
  • darkblue
  • violet
  • purple
  • pink
  • taupe
  • gray
  • darkgray

Glyph

#define glyph apple

You can find all of the identifiers for each Shortcut glyph at glyphs.cherrilang.org.

Accepted Input & Output Types

Inputs and outputs accept content item type.

Inputs will default to all types. Outputs will default to no types. This is done to be consistent with the Shortcuts file format.

#define inputs image, text
#define outputs app, file

alert(ShortcutInput)

Commas must separate these values.

No Input

This defines how your Shortcut responds to no input.

Stop and Respond

#define noinput stopwith "Response"

alert(ShortcutInput)

Get Clipboard Contents

#define noinput getclipboard

alert(ShortcutInput)

Ask for a content item type

#define noinput askfor text

alert(ShortcutInput)

From (Workflows)

This defines where your Shortcut appears.

#define from menubar, sleepmode, onscreen

alert(ShortcutInput)

Commas must separate these values.

Workflows

  • menubar - Menubar
  • quickactions - Quick Actions
  • sharesheet - Share Sheet
  • notifications - Notifications Center Widget
  • sleepmode - Sleep Mode
  • watch - Show on Apple Watch
  • onscreen - Receive On-Screen Content

Quick Action Types

To define quick action types, first add quickactions to a from definition (See above).

Then this defines which quick actions your Shortcut should be available in. Click on the info circle to view the result.

#define from quickactions
#define quickactions finder, services

Commas must separate these values.

Quick Actions

  • finder - Defines it as a Quick Action in Finder.
  • services - Defines it as an item in the Services menu.

macOS only or non-macOS

Define the mac definition with a value of true if your Shortcut is mainly meant to be a Mac shortcut, or false if it’s primarily meant to be used on iOS.

This will make it so an error is thrown if you use an action that is not supported on macOS or vice versa for non-macOS platforms.

#define mac true

Name

This will be used as the name of the resulting Shortcut file.

#define name My Shortcut

Cherri will ignore the file’s name and use the definition instead to create My Shortcut. shortcut.

Version

Defines the minimum version of iOS your Shortcut supports. Warnings will be printed if you use actions that are not supported in the targeted version.

#define version 18.4