Lokyr
Documentation

Plugins

Every feature that you see in Lokyr beyond the terminal itself comes from a plugin: some from other authors, installed from the registry at pkg.lokyr.dev, and the bundled ones, which come with the app. Both kinds run on the same plugin API.

Third-party plugins

A third-party plugin is a script in Luau that runs in a sandbox of its own, with a memory limit and a deadline for each call. It reaches only what its manifest declares, its capabilities: Lokyr asks you for them the first time the plugin starts, refusing unless you allow them, and keeps your answers in permissions.toml, beside your config, where you can take one back at any time, which stops the plugin at once.

Sleip, Lokyr's package manager, installs plugins from the registry, checking each one against the registry's signed index, and tells you the capabilities that a plugin asks for before it installs it:

sleip search                  # every plugin of the registry
sleip info sephiroth74/snap   # its versions, capabilities and the commands it runs
sleip add sephiroth74/snap    # installs it
sleip update                  # takes the new versions
sleip remove sephiroth74/snap

Lokyr loads a plugin as it is installed, updated or removed, without restarting. Lokyr › Plugins… lists them all, the bundled ones too, with their capabilities, disables, updates or removes one, and installs the registry's. The Homebrew cask puts sleip on your PATH; with the disk image, Lokyr › Install Command Line Tools does. Every command and its options are in Sleip and the registry.

Some of the registry's plugins:

PluginWhat it gives youCapabilities
sephiroth74/snapAn image of the terminal's text, of the selection or the screen, in a frame as a macOS window's, to copy or to saveclipboard-write, process-read, terminal-read
sephiroth74/awakeKeeps the Mac awake from a button beside the window's buttons: always, or while a tab runs a programkeep-awake, process-read
sephiroth74/font-pickerChooses the terminal's font from the system's monospaced families, each previewed as you move to itappearance-write

To write a plugin of your own and publish it on pkg.lokyr.dev, follow Writing a plugin, and look up the capabilities, the slots, the events and the limits in the plugin reference.

The bundled plugins

The plugins below come with the app. They are built into its binary, run on the same plugin API as third-party plugins, and each can be turned off in your config with enabled = false in its section, as [plugins.<namespace>] tells.

PluginWhat it gives you
keymap-macosThe default shortcuts of macOS's apps: ⌘N, ⌘C, ⌘V, ⌘T, ⌘F and the rest
core-actionsCopy and paste, select all, clear, scrolling, and the text's size
links⌘-click opens a link, a URL or a path
tabsThe tab bar, and the tabs' commands
splitsSplit panes, and the commands that move between them, resize and zoom them
searchThe find bar: a pane's search, its matches highlighted; and Find in All Tabs, a search of every pane · Since 1.6
command-paletteThe command palette: every command, ranked as you type
quick-terminalThe quick terminal: a window that a global key slides in over every app
progressThe programs' progress, in a thin bar across the window's top
command-headerThe command whose output you are looking at, at the pane's top, while Blocks is off
blocksOff by default: each command and its output a block, its prompt rows pinned at the pane's top, which takes you to the block's start, and its parts copied, its details shown or its command run again from the context menu · Since 1.4
copy-modeThe copy mode: a cursor that vi's keys move through the scrollback, to select and copy without the mouse
quick-tipsA tip at the start, once a week at most, in a card at the window's bottom right
settingsThe settings window's Settings page: every key of the config and of the plugins, by section, of its value in force
plugin-managerThe settings window's Plugins page: every plugin, its state and its capabilities, to disable, enable or remove
automationWhat scripts and shortcuts of other apps ask of Lokyr: windows, tabs and splits opened, text sent, commands run, and a pane's text once you allow the app · Since 1.6

The order of the table is the order in which they start, which matters for the keys alone: a later plugin's key wins over an earlier one's, and your own [keys] win over all of them.

Turning a plugin off takes away its commands, its keys, its bars and its panels at once, as you save the file; true turns it on again. Without tabs, no tab bar shows and no key opens a tab; without keymap-macos, the commands keep working from the menus and from your own [keys], but none has a key by default.