Verboo Code: how to set up the status line with /statusline (model, folder, branch and context)
Back to the blog
Articleverboo codetutorialagente de programaçãodev toolsprodutividade

Verboo Code: how to set up the status line with /statusline (model, folder, branch and context)

MafraOctober 28, 20267 min read

You switch models with /model, change branches, open another folder, and half an hour later you no longer remember which model you are on or how much of the context is used. The status line fixes that: a fixed line under the Verboo Code prompt that shows whatever you want, refreshed after every agent reply. The /statusline command builds that line for you.

What is the Verboo Code status line?

It is a line of text under the prompt box, produced by a shell command of yours. Verboo Code runs that command, sends it a JSON with the session state on standard input, and shows whatever the command prints.

In the source code, it only appears when the statusLine key exists in settings. Without that key there is no line at all. The text is shown in dimmed color and accepts ANSI color codes, so you can color it with printf.

Flowchart of the Verboo Code status line: /statusline generates the command, the statusLine key is saved in ~/.verboo/settings.json with type command, and the script reads JSON on stdin and prints the line, refreshed on each reply. If the line does not show, check that the script exits with 0, that the folder is trusted and that disableAllHooks is off
From /statusline to the line on screen, and the 3 checks when it does not show. Verified in the v0.15.38 source code on 2026-10-28.

How do you set up the status line with /statusline?

Type /statusline in the session. With no argument, it tries to copy your terminal prompt. With an argument, it does what you ask.

/statusline

With no argument, the default request is Configure my statusLine from my shell PS1 configuration. A subagent called statusline-setup, which only has the Read and Edit tools, looks for the PS1 variable in this order: ~/.zshrc, ~/.bashrc, ~/.bash_profile and ~/.profile. It converts the PS1 escapes into commands (\u becomes $(whoami), \w becomes $(pwd), \W becomes $(basename "$(pwd)")) and strips a trailing $ or >.

If you have no custom PS1, or want something else, describe it:

/statusline show the model, the folder name, the git branch and the percentage of context used

The subagent writes the result to your settings.json, keeping the rest of the file. If the command gets long, it saves a separate script and points settings to it. If the CLI asks for permission to edit the file, approve it. For later tweaks, just run /statusline again with the new request.

Gotcha: /statusline is disabled in non-interactive mode. In scripts or CI, set it up by hand, as in the next section.

How do you set up the status line by hand?

Create a script, make it executable and point the statusLine key to it. Three steps.

1. The script. Save it as ~/.verboo/statusline.sh. It uses jq to read the JSON:

#!/usr/bin/env bash
input=$(cat)
model=$(echo "$input" | jq -r '.model.display_name')
dir=$(echo "$input" | jq -r '.workspace.current_dir')
used=$(echo "$input" | jq -r '.context_window.used_percentage // empty')
branch=$(git -C "$dir" --no-optional-locks branch --show-current 2>/dev/null)

out="$model · $(basename "$dir")"
[ -n "$branch" ] && out="$out · $branch"
[ -n "$used" ] && out="$out · ctx $(printf '%.0f' "$used")%"
printf '%s\n' "$out"

The --no-optional-locks on git is a recommendation from the code itself: the line runs after every reply, and without that flag git may compete with the agent for the repository lock.

2. Execute permission:

chmod +x ~/.verboo/statusline.sh

3. The settings. In ~/.verboo/settings.json (or in the folder set by VERBOO_CONFIG_DIR, if you use that variable):

{
  "statusLine": {
    "type": "command",
    "command": "~/.verboo/statusline.sh",
    "padding": 0
  }
}

type only accepts "command". padding is optional and sets the horizontal spacing of the line. To apply it to a single project, use .verboo/settings.json at the repository root. No restart needed: when the command changes in settings, the line is recomputed right away.

How do you test the script before using it?

Pipe a fake JSON into standard input. If it prints the line, you are done.

echo '{"model":{"display_name":"deepseek-v4-pro"},"workspace":{"current_dir":"'"$PWD"'"},"context_window":{"used_percentage":42.7}}' | ~/.verboo/statusline.sh

Inside a git repository on the main branch, the output looks like this:

deepseek-v4-pro · my-project · main · ctx 43%

Before the first reply of the session, used_percentage is null. The // empty in jq and the [ -n "$used" ] test make the context part simply disappear in that case, instead of showing ctx null%.

Which fields does the status line JSON include?

The main ones, as built in src/components/StatusLine.tsx:

FieldWhat it isWhen it is present
model.display_name and model.idModel answering right nowAlways. Changes when you use /model
workspace.current_dirCurrent folderAlways
workspace.project_dirFolder where the session startedAlways
workspace.added_dirsFolders added with /add-dirAlways (list, may be empty)
context_window.used_percentagePercentage of context used, 0 to 100null before the first reply
context_window.remaining_percentagePercentage of context freenull before the first reply
context_window.context_window_sizeWindow size of the current model, in tokensAlways
session_nameSession name set with /renameOnly if the session has a name
output_style.nameActive output styleAlways (default if none)
vim.modeINSERT or NORMALOnly with vim mode on
worktree.name and worktree.branchSession worktree and branchOnly in a --worktree session
versionVerboo Code versionAlways

An optional field that is not sent is simply missing from the JSON, so always use // empty in jq so it does not turn into the text null on screen.

When does the status line refresh?

When a new agent reply arrives, and when you change the permission mode, the vim mode or the model. It is not a clock: if none of that changes, the command does not run again.

The code waits 300 ms after the last change before running the command, and cancels a run in progress when another one starts. In practice: a slow script does not freeze the interface, but a line with the time (date +%H:%M) only shows the time of the last refresh, not the current time.

Why is the status line not showing?

It is almost always one of these six causes. Script errors are ignored silently, so the line just disappears, with no message.

SymptomCause in the codeWhat to do
Notice statusline skipped · restart to fixThe folder has not been marked as trusted yet. No user command runs before thatAccept the folder trust dialog and restart the session
Empty line, script looks rightScript exited with a non-zero code. Only output with exit 0 is shownRun the fake JSON test and check echo $?
Empty line, exit 0Nothing was printed to stdout. Blank lines are droppedPrint with printf or echo, not to stderr
jq: command not found in the testWithout jq installed the script failsbrew install jq or sudo apt install jq
Permission denied in the testScript is not executablechmod +x ~/.verboo/statusline.sh
Nothing shows in any folder"disableAllHooks": true in settings turns off hooks and the status line togetherRemove the key or set it to false

The command runs in bash. On Windows it goes through Git Bash, so write the script in bash syntax there too.

Can you add colors or use more than one line?

Yes. ANSI codes pass through, as long as you use printf:

printf '\033[35m%s\033[0m · %s\n' "$model" "$(basename "$dir")"

For multiple lines, print more than one. Verboo Code keeps all of them and only drops empty ones. Remember the line is shown dimmed, so very dark colors are hard to read.

With the context percentage on screen, you know when to run /compact before the session slows down. On Verboo Code tokens are unlimited, so that is the only number you need to watch: create your account at verboo.ai, open the CLI and run /statusline.

Enjoyed this article?
Share knowledge with your network.
// Read also

Related articles