statusline

Configure a custom command-based status line rendered above the CLI prompt.

Updated May 28, 2023
One-click install
npx skills add https://github.com/steveulrich/ProjectB --skill statusline-steveulrich
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: statusline
Source: https://github.com/steveulrich/ProjectB/tree/main/.cursor/skills/statusline
Command: npx skills add https://github.com/steveulrich/ProjectB --skill statusline-steveulrich

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The CLI prompt area shows no session context by default, forcing users to manually check which model is active, how much of the context window is consumed, or which git branch they are on. This Skill lets you render that information persistently above the prompt via a user-defined command. ## Core Features & Use Cases - Command-based status line: Add a statusLine entry to ~/.cursor/cli-config.json pointing at any executable script or inline command; its stdout renders above the prompt. - Rich JSON session payload: The command receives session data on stdin including model info, context window usage percentages, working directory, vim mode, and worktree details. - Flexible rendering: Supports multi-line output, ANSI color codes, configurable padding, update intervals (minimum 300ms), and timeouts. - Use Case: Create a bash script using jq that displays the current model name, a context-usage progress bar, and the current git branch, so you always know your session state at a glance. ## Quick Start Set up a status line in my CLI config that shows the current model name and context window usage percentage using a bash script with jq.

Frequently Asked Questions about statusline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a custom status line in the Cursor CLI?▼

Add a statusLine entry to ~/.cursor/cli-config.json with type set to "command" and a command field pointing to an executable script or inline command. The command's stdout is rendered above the prompt on each conversation update.

What data does the status line command receive on stdin?▼

The command receives a JSON payload containing session_id, transcript_path, cwd, model details (id, display_name, param_summary), context window usage percentages, version, output style, and optionally vim mode and worktree information.

Can the CLI status line display multiple lines and colors?▼

Yes, each line of stdout renders as a separate row in the status area, and ANSI color codes are fully supported. You can use chalk, tput, or raw escape sequences like \033[32m for coloring.

Why is my status line not updating or showing stale text?▼

If the command exits non-zero with empty stdout, the previous text is kept. Commands that exceed the timeout (default 2000ms) or overlap with a new update are killed, so keep scripts fast and ensure they exit zero.

How do I test a status line script before installing it?▼

Pipe a mock JSON payload into your script, for example: echo '{"model":{"display_name":"Opus"},"context_window":{"used_percentage":25}}' | ./statusline.sh. This simulates the stdin input the CLI provides.

Does the status line command consume API tokens?▼

No, the status line runs entirely locally and does not consume API tokens. Updates are debounced at the configured interval, clamped to a minimum of 300ms between invocations.