Back to blog

Make errors jump out of terminal output with keyword highlighting and custom rules

December 1, 2026 6 min read Kubexer Team
HighlightingTerminalRegexLogs

When you tail a log or watch a deploy, the important part is often a single word: ERROR, OOMKilled, timeout, the name of the one service you care about. Your eyes are good at many things, but scanning a fast-moving wall of grey text for one word is not one of them.

The usual fixes are grep --color, ccze or a pager with highlighting. They work for the command you remember to pipe through them. Kubexer Terminal's keyword highlighting works on everything the terminal prints, without changing the text and without piping anything.

The built-in rules

Highlighting is on by default with a set of built-in rules, which are free. In priority order:

  • Errors (red, on): error, failed, fatal, panic, exception, denied, refused, unauthorized, forbidden, timeout, timed out and their variants, as whole words, any case.
  • Warnings (yellow, on): warn, warning, deprecated.
  • Success (green, off by default): ok, success, succeeded, passed, done, ready.
  • IP addresses (cyan, off by default): IPv4 addresses with an optional /cidr or :port.
  • Kubernetes pod states (on, case-sensitive): failing states such as CrashLoopBackOff, ImagePullBackOff, OOMKilled and Evicted in red; Pending, ContainerCreating and Terminating in yellow; Running and Completed in green.

Success and IP addresses ship switched off because they match a lot of ordinary text; turn them on if they help you. For built-ins you can change the colour, the style and whether the rule is on, but not the pattern. Reset built-ins puts them back.

All of this is in Settings → Terminal → Highlighting. The master switch, Highlight keywords, is also in the terminal's right-click menu, which is handy when you want raw output for a moment.

How highlighting works

Highlighting is drawn as decorations over the terminal, not by rewriting the output. That has a few consequences worth knowing:

  • Copying text gives you exactly what the program printed, with no extra escape codes.
  • Search in the terminal sees the original text.
  • The line you are typing is not highlighted until it runs and becomes output.
  • Full-screen programs such as vim, htop and less are left alone by default, because they draw their own colours. Turn on Also in full-screen apps if you want rules applied there too.

Adding your own rules (Pro)

Custom rules are a Pro feature. Click Add rule and fill in:

  • Pattern, as Text or Regex (JavaScript regular expressions).
  • An optional label, so you remember why it exists.
  • Match case and Whole word.
  • A colour: one of the six theme colours (red, yellow, green, cyan, blue, magenta), which follow your terminal theme, or any #RRGGBB.
  • A style: Text colour or Background.

The Preview box at the bottom lets you paste sample output and see your rules apply before you use them for real.

Rules that earn their place

A few examples of rules that are worth having:

Text   payment-service            background, magenta   # the service you own
Regex  req-[0-9a-f]{8}            text, cyan            # request IDs to follow across hosts
Regex  \b5\d\d\b                 text, red             # HTTP 5xx status codes
Text   prod-db-primary            background, #b45309   # a host you should be careful on
Regex  \bp99=\d+ms                text, yellow          # latency lines in a load test

Background style is useful for the one thing you never want to miss, because it stands out more than a coloured word.

Priority

When two rules match the same text, the earlier rule wins. Your custom rules come before the built-ins, and you can reorder them in the list, so a specific rule (payment-service) can override a general one (error) where they overlap.

A regex that does not compile is marked Invalid and skipped, so a typo does not break highlighting for everything else.

Limits

  • Up to 100 custom rules, each pattern up to 500 characters.
  • At most 200 highlights per line, so a pathological regex on a very long line cannot freeze the terminal.
  • Rules are global. They apply to every terminal; there are no per-host rule sets.
  • Styles are text colour or background. No bold, underline or multi-colour rules.

Rules sync with your account settings, so they follow you to your other devices.

Without Pro

The built-in rules work fully on the free plan, including editing their colours. Custom rules you created during a trial or a paid plan are kept and synced but not applied while you are on the free plan; they show a Pro badge, and you can delete them.

Try it

Open Settings → Terminal → Highlighting in Kubexer Terminal, turn on the Success rule, and run kubectl get pods -A against a cluster with a few unhealthy pods. Then add a rule for the service you are on call for. If you repeat the same commands often, pair this with command snippets.