Launchlet Guide

This document is a work-in-progress. Feel free to reach out on Mastodon or Twitter.

Launchlet is a simple way to run customize web sites with JavaScript and CSS.

Inspired by Quicksilver, it lets you run commands via the keyboard.

Recipes: A Thinking Tutorial

A Recipe is a format for expressing how functions will run in Launchlet.

Command

A Command is the simplest kind of Recipe. It has a Name and Callback:

Name
Say Hello
Callback
alert('Hello')

This can be run by Launchlet directly as it has no input.

Procedure

A Procedure has a Signature and Callback, and optionally Arguments:

Signature
Greet
Arguments
message
Callback
alert(message)

This can be called from any other Recipe using the API this.api['Greet'] or this.api.Greet. In this way, the previous example could be changed to:

Name
Say Hello
Callback
this.api.Greet('Hello')

Pipe mode: Subject

A Subject has a Name, Output Type and Callback:

Name
Salutation
Output Type
String
Callback
return 'Yo'

In Pipe mode, this can be used as input for any Action that takes a String.

Pipe mode: Action

An Action has a Name, Input Types and Callback:

Name
Shout
Input Types
String
Arguments
message
Callback
alert(message.toUpperCase())

In Pipe mode, this can be used on any Subject that returns a String. Although a Recipe can have multiple inputs, an Action will generally have only one.

Safety

Running arbitrary JavaScript can be dangerous, and this project comes with no guarantees of safety from malicious code, but there are a few things that the composer will try to flag and ignore:

Anyone with security expertise and ideas on how to improve safety in the project is welcome to add a GitHub Issue.

It is best to run code that is concise and easy to read.

Recipes from the current page

Optionally, Launchlet can include Recipes from any page that sets LCHPageRecipes on the window object to an Array. This allows pages to expose their functionality in a way that is accessible to 3rd parties:

window.LCHPageRecipes = [{
 LCHRecipeName: "Say Hello",
 LCHRecipeCallback: function () {
  alert('Hello');
 }
}];

For example, when running Launchlet on rosano.ca, it is possible to choose a 'Send a message' Command that originates from the page.

Built-in Recipes

LCHCopyToClipboard(text)

Copy input to clipboard.

Returns promise.

Shortcuts

AccessKey refers to a one or more shortcut keys followed by a single character. Usually it's Alt on Windows or Control+Alt on macOS, but it changes based on your browser and operating system.

Launcher refers to the app's command runner: press Alt+Space, type the command, then press Enter to run.

Item catalog
Create new item AccessKey+n
Select previous or next item, if filter field is focused Up or Down
Clear filter text and selected item, focus filter field Escape
Close, if filter field is focused Escape
Clone recipe Launcher
Import JSON (beta) Launcher
Export JSON (beta) Launcher
Global
Open access link Launcher
Reload Launcher
Force update Launcher
Launcher Alt+Space
Global (when cloud is connected)
Copy private access link Launcher
Flush data Launcher

What are remoteStorage and Fission?

remoteStorage and Fission are open protocols for synchronizing data between multiple devices. Both take the level of control and flexibility of something like email and bring it to your personal data. You could think of it as a USB key for your documents that you can plug into websites to work on your stuff.

You can get a remoteStorage account for free from 5apps or host your own.

You can get a Fission account for free from Fission Auth or setup your own server.