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.

Widget

Root widget container

The root of the widget tree. Build one with new Widget({...}) and hand it to Script.setWidget(). Widget.currentFamily and Widget.parameter let the layout adapt. The tap action is configured on the Home Screen, not here. A Link node takes priority inside its own area; tapping anywhere else runs the configured action.

Properties

currentFamilyWidgetFamily ›

The current widget family: 'small', 'medium', 'large', etc.

parameterString

The text typed into the widget's Parameter field, or passed as Parameter from Shortcuts. One free-text value per widget instance, so the same script on three widgets can show three different things. Null when unset. From Shortcuts this is the same string as Script.input.text.

sizeAny

The widget's real point size.

Methods

Widget(config?)WidgetNode

The root of the widget tree.

  • config Any
    • child WidgetNode

      What the widget draws.

    • supportedFamilies [WidgetFamily]

      Which sizes this script offers. Every family by default.

    • refreshInterval Duration

      How often to ask for a redraw. iOS decides whether to grant it; five minutes is the floor.

    • backgroundColor Color

      A flat background.

    • backgroundGradient LinearGradient

      A gradient background. Wins over backgroundColor.

    • padding EdgeInsets

      Space between the edge and the child.

Widget.requestReload()

Request a widget timeline reload. Tells WidgetKit to re-run the script and refresh the widget display.

Examples

Adaptive widget

const family = Widget.currentFamily;
const isSmall = family === "small";

const content = isSmall
  ? Text("Compact")
  : Column({ children: [
      Text("Expanded"),
      Text("More details here")
    ]});

const widget = new Widget({
  backgroundColor: Color.hex("#1a1a2e"),
  padding: EdgeInsets.all(16),
  child: content
});
Script.setWidget(widget);