Show TOVIO state in your shell prompt

status --prompt, and how to wire it in safely.

Written By Dustin

Last updated 19 minutes ago

tovio status --prompt

Emits a compact one-line segment designed to be embedded in a shell prompt — Starship, Powerlevel10k, or a hand-rolled one.

The format

Lane, then the first six characters of the current change id, then whichever of these apply:

MarkerMeaning
✚nn changed files in the current change
⇣nn commits behind the target lane
✖nn open conflicts
🔒nn isolated paths
an agent capability token is expiring or has expired

A clean lane with no commits yet is just the lane name.

It fails outside a repository

This is the detail that breaks prompts. Outside a TOVIO repository the command errors — it prints TVO-CLI-003 to stderr and exits 2. It does not print an empty line and exit zero.

So guard it. Redirect stderr and let a non-zero exit produce nothing:

tovio_prompt() {  tovio status --prompt 2>/dev/null}

In a prompt framework that runs a command per redraw, make sure a failure renders as an empty segment rather than an error string.

Keep it cheap

Prompt commands run on every command you type. --prompt asks the engine for the reduced set of counts rather than a full status report, and it takes no repository write lock, so it does not queue behind a commit. On a very large repository over a slow filesystem it is still real work — if your prompt feels sluggish, that is the thing to measure.

The machine form

tovio status --prompt --json

Gives the same information as fields — branch, change, changed, conflicts, isolated, behind, token_warning — so a prompt written in a real language can render it however it likes.

If the glyphs do not render

The human segment emits its markers as literal Unicode. It is not styled, so neither NO_COLOR nor TOVIO_ASCII changes it — those affect the CLI's decorated output, not this one line. On a terminal or font that cannot draw ✚ ⇣ ✖ 🔒 ⏳, use --prompt --json and render the fields yourself with whatever characters your terminal has.

The fuller versions

tovio statustovio status --conflictstovio status --json

The last is a stable contract, and the one the editor extensions consume.