Clatter Labs
Console

Line CLI

Themes

Pick a colour theme for Line CLI, let it follow your terminal's light or dark background, or write your own.

Line draws everything with a theme: a set of named colour slots. Pick one with /theme in the agent (it previews live as you move through the list) or from the shell:

Terminal
line theme list          # all themes, the current one and where the choice came from
line theme set <name>    # save it in settings (theme = "<name>")
line theme show [name]   # the colours of a theme, slot by slot

Built-in themes

ThemeFor
clatter-darkClatter green on a dark terminal (the default)
clatter-lightLight terminal backgrounds
dark-colorblindDark, with blue/orange diffs instead of green/red
light-colorblindLight, with blue/orange diffs instead of green/red
high-contrastMaximum contrast on dark backgrounds
ansiYour terminal's own 16 colours (follows your terminal scheme, no 24-bit colour needed)
monoNo colour at all

How the theme is chosen

The first match wins:

  1. LINE_THEME in the environment.
  2. NO_COLOR set (to anything): mono.
  3. The theme setting, unless it is empty or auto.
  4. Auto:
    • Apple Terminal without 24-bit colour, and the Linux console, get ansi.
    • Otherwise Line asks the terminal for its background colour when it starts (it waits at most 200 ms and never blocks a terminal that doesn't answer). On a light background it uses clatter-light. When the terminal doesn't answer, COLORFGBG is used if it is set. The fallback is clatter-dark.
    • The Windows console keeps the dark default. Pick clatter-light with /theme if your Windows terminal is light.

Custom themes

A custom theme is a JSON file in ~/.line/themes/<name>.json. It can start from a built-in theme with extends and change only some slots:

~/.line/themes/teal.json
{
  "extends": "clatter-light",
  "colors": {
    "accent": "#0b7a75",
    "diff_add_bg": "#e6f4ea",
    "diff_del_bg": "#fde8e8",
    "warning": "yellow"
  }
}

A colour is #rrggbb or an ANSI colour name (black, red, green, yellow, blue, magenta, cyan, white, their bright- variants, gray, reset). Then use it with line theme set <name> or /theme.

Slots

SlotUsed for
accent, accent_dimThe Line accent: prompt marker, spinner, headings, success marks
text, text_strongBody text and emphasis
muted, dim, faintSecondary text, hints, borders and rules
error, warning, successMessages and tool states
codeInline code and code blocks
border, border_busyThe input box, idle and while Line works
planPlan mode
added, removed+/- counts in the status bar
diff_add_fg, diff_add_bg, diff_del_fg, diff_del_bgDiff lines

line theme show <name> prints every slot of a theme as a swatch, which is a quick way to check a custom theme.