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 slotBuilt-in themes
| Theme | For |
|---|---|
clatter-dark | Clatter green on a dark terminal (the default) |
clatter-light | Light terminal backgrounds |
dark-colorblind | Dark, with blue/orange diffs instead of green/red |
light-colorblind | Light, with blue/orange diffs instead of green/red |
high-contrast | Maximum contrast on dark backgrounds |
ansi | Your terminal's own 16 colours (follows your terminal scheme, no 24-bit colour needed) |
mono | No colour at all |
How the theme is chosen
The first match wins:
LINE_THEMEin the environment.NO_COLORset (to anything):mono.- The
themesetting, unless it is empty orauto. - 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,COLORFGBGis used if it is set. The fallback isclatter-dark. - The Windows console keeps the dark default. Pick
clatter-lightwith/themeif your Windows terminal is light.
- Apple Terminal without 24-bit colour, and the Linux console, get
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
| Slot | Used for |
|---|---|
accent, accent_dim | The Line accent: prompt marker, spinner, headings, success marks |
text, text_strong | Body text and emphasis |
muted, dim, faint | Secondary text, hints, borders and rules |
error, warning, success | Messages and tool states |
code | Inline code and code blocks |
border, border_busy | The input box, idle and while Line works |
plan | Plan mode |
added, removed | +/- counts in the status bar |
diff_add_fg, diff_add_bg, diff_del_fg, diff_del_bg | Diff lines |
line theme show <name> prints every slot of a theme as a swatch, which is a quick way to check a custom theme.
Was this page helpful?