~/docs $ grep
~/docs $ cat commands.md

Commands

Everything Lights Out does can be done from any terminal, a script or an agent, with the lightsout command. Inside Lights Out it reaches the Lights Out you're in; elsewhere, your usual one (--session NAME picks another).

The app

CommandDoes
lightsoutRuns Lights Out in this terminal (or brings back the one running in the background)
lightsout --windowOpens it in its own window
lightsout --session NAMEA separate set of tabs and rooms
lightsout --plainStarts with plugins off (the way back if one breaks the screen)
lightsout open USER@HOSTLights Out on a server, over SSH; its agents live there
lightsout updateInstalls the newest version; settings, tabs, logins and programs stay (Update)
lightsout uninstallRemoves Lights Out (Uninstall)
lightsout --versionThe installed version
lightsout skillPrints the skill: every command, written for agents

Panes

CommandDoes
lightsout list [--json]Every pane: id, room, tab, state, title, folder (--json: everything, a floating pane's place and size too)
lightsout new [--right|--down] [--cwd DIR] [-- COMMAND...]Opens a pane (a new tab unless --right/--down) and prints its id; the command runs at once
lightsout send PANE TEXT... [--no-enter]Types into a pane, and presses Enter unless --no-enter
lightsout read PANE [--lines N]Prints what a pane shows (the last 60 lines unless --lines)
lightsout wait PANE [--until idle|done|needs-you] [--timeout S]Waits until the pane gets there (default: done or idle; 600 s)
lightsout explain PANEWhy Lights Out thinks a pane is in its state
lightsout focus PANEBrings a pane to the front
lightsout close PANECloses a pane and stops its program

PANE is a number from lightsout list, or self for the pane the command runs in.

Rooms

CommandDoes
lightsout room add [NAME]A new room on this computer
lightsout room add USER@HOST [NAME]A room that lives on a server (Lights Out must be installed there)
lightsout room add NAME --on SSH-NAMEThe same, with a name from ~/.ssh/config
lightsout room listRooms here, and the server of each server room
lightsout room remove NAMEHere: closes it and stops its agents. A server room: leaves it running there

Other

CommandDoes
lightsout notify TEXT...A popup in Lights Out
lightsout screen off|onThe screen off (saves battery) or on
lightsout powerBattery, time left and power draw
lightsout switchLights Out, or Lights On inside Lights Out, at once (no question)
lightsout quitSaves the tabs and stops everything
lightsout report-session IDFor an agent: its conversation in this tab (Add Lights Out support)
lightsout plugin ...Install, link, list, update, remove, switch on or off plugins (Plugins)
lightsout part listWhere every part of the screen is (sidebar, tabs, plugins' parts, the panes) and what it shows
lightsout part set ID [CONTENT]What a plugin's part shows: text, or rows of pieces as JSON (also on stdin) (Parts)
lightsout part image ID FILEA picture for a plugin's part: PNG or PPM (Frames)
lightsout part clear IDThe part shows nothing

Every action: lightsout do

Every action in the menu, every key and every button is a named command. lightsout do NAME does it exactly as its key would; lightsout commands lists them all, with your current keys and your plugins' commands.

sh
lightsout do room.rename
lightsout do tab.go 2
lightsout do run.split npm test
lightsout do pane.move 10 20
CommandDoesKey
actions.openThe actions menuCtrl+Shift+P
tab.newNew tabCtrl+Shift+T
agent.startPick an agent to start in a new tabCtrl+Shift+A
command.askAsk for a command to run in a new tab
pane.split-rightSplit rightCtrl+Shift+Right
pane.split-downSplit downCtrl+Shift+Down
pane.focus-left / -right / -up / -downMove to the pane on that sideAlt+arrows
pane.closeClose paneCtrl+Shift+W
agent.jumpJump to the agent that needs youCtrl+Shift+J
tab.next / tab.previousNext / previous tabCtrl+Tab / Ctrl+Shift+Tab
tab.go NUMBERGo to a tab (1 = the first)Alt+1 … Alt+9
pane.output-in-editorOpen a pane's output in an editorCtrl+Shift+E
edit.copy / edit.pasteCopy the selection / pasteCtrl+Shift+C / Ctrl+Shift+V, Shift+Insert
pane.scroll-up / pane.scroll-downScroll half a screenShift+PageUp / Shift+PageDown
font.bigger / font.smallerBigger / smaller text (window only)Ctrl+= / Ctrl+-
room.newNew roomCtrl+Shift+N
room.renameRename this room
room.closeDelete this room (a server room: remove it here)
room.new-on-serverNew room on a server...
room.go NUMBERGo to a room (1 = the first)
sidebar.toggleShow / hide the sidebarCtrl+Shift+B
settings.openSettingsCtrl+,
wifi.chooseWi-Fi networks
wifi.join NUMBER / wifi.otherJoin a network from the list / by its name
screen.offScreen offCtrl+Shift+O
lights.switchLights Out, or Lights On inside Lights Out (asks first)Ctrl+Shift+L
app.detachClose this view, agents keep running (inside a terminal)Ctrl+B D
app.quitQuit, stops all agents (in Lights Out: Lights On)Ctrl+Shift+Q
app.plainPlugins off, or on again (this key can't be taken)Ctrl+Shift+F12
run.popup COMMANDA command line in a popup that closes when it ends
run.tab COMMANDA command line in a new tab
run.split COMMANDA command line in a split
PLUGIN.COMMAND [ARG]A plugin's commandits own

Floating panes

PANE is optional: without it, the pane you're in.

CommandDoes
pane.float [PANE]The pane floats over the others (actions: Float this pane)
pane.tile [PANE]Back into the layout
pane.move X Y [PANE]Floats it with its top left corner at X, Y (% of the area, 0–100)
pane.resize W H [PANE]Floats it at that size (% of the area, 5–100)
pane.minimize [PANE]Out of sight until it is focused or raised
pane.raise [PANE]To the front, and back from minimised

With these and lightsout list --json, a script or a plugin can arrange panes any way it likes, like a window manager.

edit this page on github