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.

Language

Language, sentiment, entities

Runs on device. No permission, no network, fast enough to call from a widget.

Methods

Language.detect(text)Any

The dominant language, or null when the text is too short.

  • text String required

    The text to identify.

returns code is a language code like "it" or "en".

Language.sentiment(text)Number

-1 for negative, 1 for positive, 0 for neutral.

  • text String required

    The text to score.

returns 0 means neutral, and is also what a language with no sentiment model returns. The two cases are indistinguishable.

Language.tokenize(text, unit)[String]

Splits text into words, sentences or paragraphs.

  • text String required

    The text to split.

  • unit String required

    "word", "sentence" or "paragraph". Defaults to word.

Language.entities(text)[Any]

People, places and organisations, as { text, type }.

  • text String required

    The text to scan.

Language.lemmas(text)[Any]

Each word with its dictionary form, as { text, lemma }.

  • text String required

    The text to analyse.

Examples

Colour a headline by mood

var score = Language.sentiment(headline);
var colour = score > 0.2 ? Color.green() : score < -0.2 ? Color.red() : Color.gray();
Script.setWidget(new Widget({ child: Text(headline, { color: colour }) }));