SpringCuts (Rootless)

AnthoPak

Compatibility: This package is compatible with iOS 14.0 to 16.7.

This package has been downloaded 264 times.

Run Shortcuts from SpringBoard (Support library, Activator actions, CLI command)

SpringCuts allows you to run iOS Shortcuts (aka Siri Shortcuts) from command line (NewTerm, MobileTerminal…), Activator, or SSH. It also serves as a lightweight support library for tweaks that need to run Shortcuts.

Running Shortcuts using SpringCuts can be useful for plenty of reasons, but in my case the main purpose is to improve Activator and HomeKit capabilities.

The reason of SpringCuts existence is that other solutions require to open Shortcuts app, which really isn't ideal (it takes time, and can't be done if your device is locked). SpringCuts runs Shortcuts in full background, without you even noticing it, and can run Shortcuts even if the device is sleeping.

Starting from SpringCuts 1.1, you can now pass input parameter to your shortcut execution! This might give even more possibilities.

Here are the available commands:

Usage: springcuts [arguments...]

  • -r [SHORTCUT_NAME]: run shortcut named [SHORTCUT_NAME]
  • -l: list all shortcut names
  • -s: stop currently running shortcuts
  • -p [INPUT_PARAMETER]: when running a shortcut, use this option to pass text input to the shortcut. Don't forget to add quotes if you want to use text with spaces.
  • -w: when running a shortcut, use this option to wait until the end of shortcut execution before returning. Using this option also logs error message when something goes wrong in shortcut execution.
  • -h: This help message

Examples:

  • springcuts -r "Turn off the lights" -> Execute said shortcut.
  • springcuts -r "Turn off the lights" -w -> Execute said shortcut and wait until it has finished running. Any error will be logged.
  • springcuts -r "Send notification with parameter" -p "This is a test notification!" -> Execute said shortcut by passing it a text parameter.
  • springcuts -l -> List all shortcuts available on this device.
  • springcuts -s -> Stop execution of currently running shortcuts.

Run Shortcuts from Activator:

  • Choose any trigger of your choice
  • Search for the SpringCuts section and select the shortcut of your choice
  • You can also use custom Run Command actions to run shortcuts with parameters springcuts -r "Send notification with parameter" -p "A text parameter"

Run Shortcuts from Home Automation:

For those using HomeKit extensively, you may have noticed that Automations in the Home app provide a very tiny list of Shortcuts actions. But thanksfully, it provides an SSH action! Using this and SpringCuts, you'll be able to run complex Shortcuts from Home Automation!

  • Create any new Automation in the Home app
  • When it asks you to select devices, scroll to the bottom and click "Convert to Shortcut"
  • Delete default action and create a new SSH one
  • Add the local IP address of your iPhone
  • Add 22 as the port (warning: SSHing yourself isn't possible on default 22 port, so you'll need either to try this automation on the real life (not using the Play button), or change for a custom port (check r/jailbreak for this).)
  • Add root as the user
  • Add your SSH password (default is alpine but if it's not done yet you should change it to something else)
  • Add a command like springcuts "Next track"

If you're interested in Home Automation and also depend on other apps than Home app, you should also check NotiCut tweak on my repo, which uses Push Notifications to run Shortcuts. It can be extremely useful since most Automation apps allows to send Push Notifications, but most often not allow running Shortcuts.

As a developer, you can use SpringCuts to run Shortcuts from SpringBoard or from any process in your tweaks. Documentation will come later, you can contact me if you want some information now :)

No settings to configure. Just install and enjoy.

Check out my Twitter @AnthoPak to get live updates about my tweaks :)

Feel free to make a small donation or check out my paid tweaks if you want to support my work!


Downloads

This version
264


Total
264


Information

Developer
AnthoPak


Version
1.4


Compatibility
iOS 14.0 to 16.7


Section
Tweaks


1.4

  • Add support for iOS 16
  • Add a new -i option to run the shortcut silently (no visual feedback)
  • Remove libmryipc dependency, replaced with own methods

1.3.1

  • Fix some devices failing to load Shortcuts list (and thus not being able to run Shortcuts)

1.3

  • Add support for iOS 15

1.2

  • Improve Activator support by providing native Activator actions (listed in a SpringCuts section). You don't need to create custom Run Commands for each Shortcut anymore!

1.1

  • Add support for input parameter by using -p [INPUT_PARAMETER] option
  • Add -w option parameter that allows CLI to wait until shortcut execution ends before returning. This also allows CLI to report potential errors that happened during shortcut execution.
  • Allow multiple shortcuts being run at the same time (concurrently)
  • Several fixes and improvements
  • Improve help message with command examples

1.0

  • Initial release