Skip to content
프로젝트

소개

Apple Shortcuts 프로그래밍 언어 🍒

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

What you can do

  • 🎓 Easy to learn and syntax similar to other languages
  • ➗ Inline expressions, variables, action and function calls anywhere you can add a value
  • 🔢 Type system and type inference
  • 🥾 Half-bootstrapped: Most standard actions and types are written in the language

측정된 스타 증가

in 24h
+2
in 7 days
+9
in 15 days
+26
in 1 month
+60

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original
Cherri Icon

Cherri

Build & Test Releases Go License Platform GoDoc

Cherri (pronounced cherry) is a Shortcuts programming language that compiles directly to a valid runnable Shortcut.

The primary goal is to make it practical to create large Shortcut projects (within the limitations of Shortcuts) and maintain them long term.

Hello World Example

🌟 Top Features

  • 🎓 Easy to learn and syntax similar to other languages
  • ➗ Inline expressions, variables, action and function calls anywhere you can add a value
  • 🔢 Type system and type inference
  • 🥾 Half-bootstrapped: Most standard actions and types are written in the language
  • 💻 Import actions from your Mac
  • 🪄 No magic variables syntax, they're constants instead
  • 🪶 Optimized to create as small as possible Shortcuts and reduce memory usage at runtime
  • ❓ Define import questions
  • 🔀 Convert Shortcuts from an iCloud link or file with the --import= option
  • 🔏 Signs using macOS, falls back on HubSign (requires a RoutineHub API key, --routinehub-api-key=) or another server that uses scaxyz/shortcut-signing-server

Maintainability

  • 🖥️ Laptop/Desktop-based development (CLI, VSCode extension, macOS app)
  • 🐞 Natural translation to Shortcut actions as much as possible to make debugging easier
  • #️⃣ Include files within others for large Shortcut projects
  • 🔄 Define functions to run within their own scope at the top of your Shortcut to reduce duplicate actions
  • 📋 Copy-paste actions automatically
  • 📇 Built-in action that generates VCards for menus
  • 📄 Embed local files in base64

3rd Party support

  • 🔧 Define actions with type checking, enums, optionals, default values, identifiers, intents, and parameter keys
  • 📦 Package manager: Remote Git repo-based package manager built in, allowing for automatic inclusion and updates
  • 🥩 Enter action identifier and parameters manually using Raw Actions.

Resources

Installation

You can install Cherri by downloading the latest release or via the Homebrew or Nix package managers:

Install via Homebrew

If you have Homebrew installed, you can run:

Add Tap:

brew tap electrikmilk/cherri

Install:

brew install electrikmilk/cherri/cherri

Install via Nix

If you have Nix installed, you can run:

nix profile install github:electrikmilk/cherri

Alternatively, you can use nix-direnv to get an isolated, effortless dev environment where cherri is available based on which directory you're in. Then you would use_flake and add Cherri to flake.nix:

{
  inputs.cherri.url = "github:electrikmilk/cherri";


  { # outputs.packages.${system}.default = pkgs.mkShell etc - omitted for brevity
    buildInputs = [
      inputs.cherri.packages.${system}.cherri
    ]
  }
}

Then run direnv allow in the directory with the flake.nix file.

Usage

cherri file.cherri

Run cherri without any arguments to see all options and usage. For development, use the --debug (or -d) option to print stack traces, debug information, and output a .plist file.

Why another Shortcuts language?

Because it's fun :)

Some languages have been abandoned, don't work well, or no longer work. I don't want Shortcuts languages to die. There should be more, not less.

Plus, some stability comes with this project being on macOS and not iOS, and I'm not aware of another Shortcuts language with macOS as its platform other than Buttermilk.

Community

Credits

Reference

Inspiration


The original Workflow app assigned a code name to each release. Cherri is named after the second-to-last update "Cherries" (also cherry is one of my favorite flavors).

This project started on October 5, 2022.

관련 프로젝트 살펴보기

불러오는 중…