How do I set up my terminal for LumiCode?

Prev Next

LumiCode runs in any terminal, but a good one makes a real difference: links you can click, charts that draw cleanly, and keys that do what you expect. A few minutes spent on the terminal and a couple of settings means LumiCode feels like a proper application rather than a command line.

Prerequisites

Method

Step 1: Choose a terminal

On

Use

Install it with

macOS

iTerm2

brew install --cask iterm2, or from iterm2.com

Windows

Windows Terminal

winget install Microsoft.WindowsTerminal, or from aka.ms/terminal

Linux

Any modern terminal

Your distribution's package manager

kitty, Ghostty, WezTerm and Alacritty also do everything LumiCode needs, on any system they run on.

Two terminals hold LumiCode back, and LumiCode shows a tip when it starts in either of them:

  • Terminal.app on macOS can't open LumiCode's links, such as those in /diagnose reports and query results.

  • The old Windows console, the window that opens for cmd.exe or PowerShell when Windows Terminal isn't installed, can't open links and can't draw some of LumiCode's symbols.

Step 2: Make Shift+Enter start a new line

In LumiCode, Enter runs the query and Shift+Enter starts a new line. Most macOS terminals send Shift+Enter as a plain Enter, though, so it runs the query instead. Choose one of the following:

  • Use Ctrl+J for a new line. It works in every terminal, with no set-up.

  • Teach your terminal to send a new line for Shift+Enter. In iTerm2, open Settings > Profiles > Keys > Key Mappings, add a mapping for Shift+Return, and set it to Send Text with the text \n. Terminals that support the kitty keyboard protocol, such as kitty, need no set-up.

  • Swap the two keys over. Run /set enter newline in LumiCode, so Enter starts a new line and Ctrl+J runs the query.

Commands that start with / always run on Enter, whichever way round you set it.

Step 3: Decide who handles the mouse

By default, LumiCode handles the mouse itself. You can click in the editor to move the cursor, scroll the transcript with the wheel, and drag across the transcript to copy, while the banner and the editor stay in place.

Your terminal's own selection still works when you hold a modifier key while you drag: Option in iTerm2 and Terminal.app, or Shift in kitty, WezTerm, Ghostty and xterm. Use it to copy from the banner, the editor, or screens such as /rows.

If you'd rather the transcript behaved like ordinary terminal output, so your terminal's scrollback and find work on it, run /set mouse off. The banner and editor then scroll away with everything else, and the editor stays a fixed size. For more about selecting and copying, type /help selection in LumiCode.

Step 4: Check symbols and charts

Type /set on its own. As well as listing your settings, LumiCode draws a sample of the dots it uses for line and scatter charts.

  • If the dots show as blanks or boxes, your font can't draw them. Run /set chart-dots blocks to draw charts with blocks instead.

  • If other symbols in lists and headings show as boxes, switch your terminal to a font with wider symbol coverage, or move to one of the terminals in Step 1.

Step 5 (optional): Finishing touches

  • Your own editor. Ctrl+X opens the query in a text editor. LumiCode uses $VISUAL, then $EDITOR, then VS Code. To choose another, run /set editor <command>, for example /set editor code.

  • Tab names. LumiCode names your terminal's tab ⬢ lumi, and shows whether a query is running or how it ended. To leave the tab name alone, run /set title off.

  • The banner. On a small screen, /set banner compact shrinks the banner to one row, and /set banner off hides it.

Troubleshooting

Terminal.app and the old Windows console can't open links. Use one of the terminals in Step 1.

LumiCode shows the Windows console tip in Windows Terminal

When Windows starts LumiCode in Windows Terminal on its own, for example from a shortcut, LumiCode can't always tell which terminal it's in. If links open and symbols look right, you can ignore the tip.

Ctrl+Space doesn't open completions on a Mac

macOS may use Ctrl+Space to switch input sources. Press Tab instead.

Option+arrow doesn't move a word at a time

Some terminals keep Option+arrow for themselves. Use Ctrl+← and Ctrl+→ instead.

Cmd+C doesn't copy in the editor

On macOS, your terminal keeps Cmd+C for itself. In the editor, select with Shift and the arrow keys, then press Ctrl+C. In the transcript, drag across the text: LumiCode copies it when you let go.