Create Statusline create-statusline

Build and enable a custom MCP statusline for the Codex CLI.

Use it when someone wants a provider that displays information in the terminal footer.

Works in Claude, ChatGPT, Codex and more
Our test
—
not tested yet
GitHub stars
137k
openai/codex
Added by
0
members
Updated
Dec 6
commit 4a7cc49
Content
4 files
2 scripts · 18 KB
License
Apache 2.0
free to use

What our test found

Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.

View on GitHub ↗
name: create-statusline
description: Build and enable a custom MCP statusline for the Codex CLI. Use when someone wants a provider that displays information in the terminal footer.

Help the user choose what to show. Reuse an existing stdio MCP server when it already owns the data and is configured globally or supplied by an installed plugin. For a new provider, copy and edit render. The bundled with this skill describes the snapshot and UI tree. If those files are on a different machine from your workspace, write the provider in the workspace using the protocol below.

Advertise the footer

Advertise exactly one valid statusline entrypoint per tool in tools/list. Use the stable server and tool names for the saved selection. Set _meta["openai/ui"].entrypoints to include {"type":"statusline","resourceUri":"ui://my-statusline/footer"}. The tool's title is the label in the picker.

Available UI elements

row, col, and box require a gap, an integer from 0 through 2^53 − 1.

  • col: Stack items vertically. Put each field in its own text or row element. A gap of zero puts the fields on consecutive lines, and a gap of one leaves a blank line between them. Adjacent bare strings render together.
  • row: Group items horizontally. The gap is measured in terminal columns. Set wrap: "wrap" to allow items to flow onto another line, and use justify to position items on each line.
  • box: Choose the axis at runtime with optional direction, which defaults to col. With direction: "row", the box accepts row props and groups adjacent strings into one flex item.
  • spacer: Put {"type":"spacer"} between fields in a row to push the following fields to the right. Spacers on each wrapped line share its spare width, and the row gap applies on both sides. In a content-height column, the spacer occupies a slot with the usual gaps.
  • text: Group styled text. Set preserveWhitespace: true to keep indentation, repeated spaces and tabs across styled children. Set maxLines to an integer from 1 through 2^53 − 1 to limit the block after wrapping. Hidden lines end the visible block with an unlinked ellipsis. Clamping takes precedence over preserveWhitespace on the same element.
  • bold: Render children in bold.
  • italic: Render children in italics.
  • underline: Underline children.
  • code: Display commands and paths with the same children as text. Nest bold inside code to emphasize an argument. Code preserves spaces and line breaks across children, expands tabs at eight-column stops, and uses the terminal theme’s code colors.
  • link: Link the children to an absolute HTTP(S) URL using props.href.
  • badge: Display a short state label, for example {"type":"badge","props":{"color":"success"},"children":["passing"]}. A badge accepts a string, an icon, or one of each in either order. It collapses label whitespace and stays on one line. For a check before the label, use [{"type":"icon","props":{"name":"check"}},"passing"] as the children. Badge color defaults to secondary and can also be info, success, warning, or danger.
  • icon: Render a static glyph named by IconName in the reference. Icons work inline in text and inherit the surrounding style.
  • list: Use {"type":"list","children":["build","test"]} for bullets. Set props.marker to "number" for numbering from one or "none" for unmarked items. Each direct child is one item. Wrapped lines align with the item text.
  • list-item: Group styled fragments into a single list item, for example {"type":"list-item","children":["run ",{"type":"code","children":["tests"]}]}.
  • string: A bare JSON string renders as literal text.
General behavior

Codex requests the advertised URI with resources/read. Read the displayed thread's snapshot from params._meta["com.openai/codex-statusline-state"]. Return exactly one text resource at that URI, with MIME type application/json and a JSON-encoded UI tree. Optional account and usage fields may be absent. A null tree clears the footer.

Check the rendering client’s app.cli_version before using newer features such as spacer or maxLines. If support is unknown or absent, return a literal string for the entire tree. An unsupported tag or property invalidates the whole response.

Use named theme or status colors to follow the user's theme. Codex accepts up to 64 KiB of UI tree JSON, 16 KiB of UTF-8 leaf text, 256 non-null nodes, and a depth of 16 (root at 0).

Refresh timing and errors

Codex debounces changes to the snapshot for 300 ms. It also refreshes one second after the last successful read completes, even if the snapshot stays the same or keeps changing.

Each read attempt has a 5-second deadline. Codex retries timeouts and app-server errors up to twice, with delays of 1 second and then 2 seconds. A timed-out read must return during the delay before Codex can start the next attempt. Invalid responses and transport failures stop the reader immediately. Reselect the provider in /statusline to restart it after a failure.

Enable and verify

Install the provider through an installed plugin or register the stdio command on the connected app-server host. For example, run codex mcp add my-statusline -- python3 -u /absolute/path/to/statusline.py there, using a path and interpreter the host can access. If the workspace is on a separate executor, give the user the provider file to copy to the host and the command to run there. Enable Custom status line in /experimental on the connected app server, then restart the TUI.

Exercise tools/list and resources/read with a representative snapshot. After adding the server, start a new conversation in its workspace to connect to it. Open /statusline, choose Choose a status line provider, and select the provider. Verify that changing threads changes the displayed inputs. If discovery fails, dismiss the provider picker before pressing F2 for inventory and server lookup warnings. If discovery completes but the provider is missing, check the entrypoint metadata in tools/list. After editing the Python file, restart its stdio process to load the changes.