Rootless

Automate iOS, iPadOS, and macOS using plain JavaScript. Build custom widgets and interact directly with native APIs.

Download on the App Store
Rootless app interface

Plain JavaScript

Supports ES6. Scripts are stored as plain .js files on your disk.

Native APIs & Documentation

Integrate directly with iOS native APIs. Fully documented, available offline.

Siri Shortcuts

Trigger scripts via Siri. Present tables, websites, and custom HTML natively.

System Integration

Run from the Share Sheet, process inputs, and manage local files via Files.app.

x-callback-url

Communicate seamlessly and trigger workflows with other apps on your device.

Customizable & Ready

Tailor the code editor to your liking. Includes several example scripts to start immediately.

Documentation

Also inside the app, or as rootless.json.

Script

Entry point for widget rendering and Shortcuts integration

The entry point. Script.setWidget() registers the root widget; Script.return() passes a value back to Shortcuts.

Properties

inputAny

What was handed to this run, or null when nothing was.

actions[Any]

Actions queued since the last run, oldest first.

Methods

Script.setWidget(widget)

Set the widget to be rendered.

  • widget WidgetNode required
Script.return(value)

Set the return value for headless script execution.

  • value Any required

    Anything JSON can represent. A headless run hands it back to whatever started the script.

Script.onAction(handler)

Runs the handler once for every action in Script.actions, in order. Call it before you build your widget.

  • handler fn(action: ?) required

    Called once for every queued action, in order. It receives the action:

    • name String

      The action string set on the Button or Toggle that was tapped.

    • payload Any

      Whatever that component attached to it, or null.

Examples

Basic widget script

const widget = new Widget({
  child: Text("Hello, World!")
});
Script.setWidget(widget);

Shortcuts integration

// Receive input from Shortcuts via Widget.parameter
const input = Number(Widget.parameter) || 0;
const result = input * 2;

// Return the result to Shortcuts
Script.return(result);