{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://github.com/tayloreernisse/claude-statusline/schema.json", "title": "Claude Code Status Line Configuration", "description": "Configuration for the claude-statusline status line script", "type": "object", "additionalProperties": false, "properties": { "$schema": { "type": "string", "description": "JSON Schema reference for editor support" }, "version": { "type": "integer", "const": 1, "description": "Config schema version" }, "global": { "$ref": "#/$defs/globalConfig" }, "presets": { "type": "object", "description": "Named layout presets. Each preset is an array of arrays of section IDs.", "additionalProperties": { "$ref": "#/$defs/layoutArray" } }, "layout": { "description": "Active layout. Either a preset name (string) or a direct layout array.", "oneOf": [ { "type": "string", "description": "Name of a preset defined in 'presets'" }, { "$ref": "#/$defs/layoutArray" } ], "default": "standard" }, "sections": { "type": "object", "description": "Configuration for built-in sections", "properties": { "model": { "$ref": "#/$defs/basicSection" }, "provider": { "$ref": "#/$defs/basicSection" }, "project": { "$ref": "#/$defs/basicSection" }, "vcs": { "$ref": "#/$defs/vcsSection" }, "beads": { "$ref": "#/$defs/beadsSection" }, "context_bar": { "$ref": "#/$defs/contextBarSection" }, "context_usage": { "$ref": "#/$defs/contextUsageSection" }, "tokens_raw": { "$ref": "#/$defs/tokensRawSection" }, "cache_efficiency": { "$ref": "#/$defs/basicSection" }, "cost": { "$ref": "#/$defs/costSection" }, "cost_velocity": { "$ref": "#/$defs/basicSection" }, "token_velocity": { "$ref": "#/$defs/basicSection" }, "cost_trend": { "$ref": "#/$defs/trendSection" }, "context_trend": { "$ref": "#/$defs/contextTrendSection" }, "context_remaining": { "$ref": "#/$defs/basicSection" }, "lines_changed": { "$ref": "#/$defs/basicSection" }, "duration": { "$ref": "#/$defs/basicSection" }, "tools": { "$ref": "#/$defs/toolsSection" }, "turns": { "$ref": "#/$defs/cachedSection" }, "load": { "$ref": "#/$defs/cachedSection" }, "version": { "$ref": "#/$defs/basicSection" }, "time": { "$ref": "#/$defs/timeSection" }, "output_style": { "$ref": "#/$defs/basicSection" }, "hostname": { "$ref": "#/$defs/basicSection" } }, "additionalProperties": false }, "custom": { "type": "array", "description": "Custom command sections", "items": { "$ref": "#/$defs/customCommand" }, "default": [] }, "colors": { "type": "object", "description": "Themed color palettes for light/dark modes", "properties": { "dark": { "$ref": "#/$defs/colorPalette" }, "light": { "$ref": "#/$defs/colorPalette" } }, "additionalProperties": false }, "glyphs": { "type": "object", "description": "Glyph configuration for Nerd Fonts and fallbacks", "properties": { "enabled": { "type": "boolean", "default": false, "description": "Enable Nerd Font glyphs" }, "set": { "type": "object", "description": "Nerd Font glyph mappings", "additionalProperties": { "type": "string" } }, "fallback": { "type": "object", "description": "ASCII fallback glyphs when Nerd Fonts are disabled", "additionalProperties": { "type": "string" } } }, "additionalProperties": false } }, "$defs": { "globalConfig": { "type": "object", "description": "Global settings", "properties": { "separator": { "type": "string", "description": "Separator text between sections (used when separator_style is 'text'). When justify is 'spread' or 'space-between', the non-space characters are kept as visual anchors.", "default": " | " }, "separator_style": { "type": "string", "enum": ["text", "powerline", "arrow", "none"], "description": "Separator style between sections. 'text': use the separator string. 'powerline': Nerd Font triangle (auto-falls-back to arrow if glyphs disabled). 'arrow': Unicode heavy angle quotation mark. 'none': spaces only.", "default": "text" }, "justify": { "type": "string", "enum": [ "left", "spread", "space-between" ], "description": "How sections distribute across the terminal width. 'left': pack left with fixed separators (flex sections expand). 'spread': distribute gaps evenly across all separators. 'space-between': first section flush left, last flush right, gaps evenly distributed.", "default": "left" }, "vcs": { "type": "string", "enum": [ "auto", "git", "none" ], "description": "VCS detection mode", "default": "auto" }, "width": { "type": "integer", "minimum": 40, "description": "Maximum terminal width cap and fallback. Dynamic sources (ioctl, process tree, stty) take priority when available." }, "width_margin": { "type": "integer", "minimum": 0, "default": 4, "description": "Columns to subtract from detected width. Accounts for terminal multiplexer borders (Zellij/tmux) or Claude Code UI chrome that reduce the actual visible area." }, "cache_dir": { "type": "string", "description": "Cache directory template. {session_id} is replaced at runtime.", "default": "/tmp/claude-sl-{session_id}" }, "responsive": { "type": "boolean", "description": "Enable responsive layout selection based on terminal width", "default": true }, "breakpoints": { "type": "object", "description": "Width breakpoints for responsive layout selection", "properties": { "narrow": { "type": "integer", "description": "Width below which 'dense' preset is used", "default": 60 }, "medium": { "type": "integer", "description": "Width below which 'standard' preset is used (above uses 'verbose')", "default": 100 } }, "additionalProperties": false }, "theme": { "type": "string", "enum": ["auto", "dark", "light"], "description": "Color theme. 'auto' detects from terminal.", "default": "auto" } }, "additionalProperties": false }, "colorName": { "type": "string", "description": "Color specifier. Supports: named colors (red, green, yellow, blue, magenta, cyan, white), modifiers (dim, bold, italic, underline, strikethrough), hex (#FF6B35, #F00), backgrounds (bg:red, bg:#FF6B35), palette refs (p:success). Multiple can be space-separated (e.g., '#FF6B35 bold')." }, "colorPalette": { "type": "object", "description": "Semantic color palette for a theme. Values support all colorName formats.", "properties": { "success": { "type": "string" }, "warning": { "type": "string" }, "danger": { "type": "string" }, "critical": { "type": "string" }, "muted": { "type": "string" }, "accent": { "type": "string" }, "highlight": { "type": "string" }, "info": { "type": "string" } }, "additionalProperties": false }, "layoutArray": { "type": "array", "description": "Array of lines, each line is an array of section IDs. Use 'spacer' (or '_spacer1', '_spacer2' etc.) as a virtual section that expands to fill remaining width, pushing sections apart.", "items": { "type": "array", "items": { "type": "string" }, "minItems": 1 }, "minItems": 1, "examples": [ [ [ "model", "provider", "project", "vcs" ], [ "context_bar", "cost", "duration" ] ] ] }, "priority": { "type": "integer", "enum": [ 1, 2, 3 ], "description": "Display priority. 1=always show, 2=drop if tight, 3=drop first", "default": 2 }, "thresholds": { "type": "object", "description": "Threshold values for color transitions", "properties": { "warn": { "type": "number" }, "danger": { "type": "number" }, "critical": { "type": "number" } }, "additionalProperties": false }, "basicSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": true }, "priority": { "$ref": "#/$defs/priority" }, "flex": { "type": "boolean", "default": false }, "min_width": { "type": "integer", "minimum": 0 }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "vcsSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": true }, "priority": { "$ref": "#/$defs/priority" }, "min_width": { "type": "integer", "minimum": 0, "default": 8 }, "show_ahead_behind": { "type": "boolean", "default": true }, "show_dirty": { "type": "boolean", "default": true }, "ttl": { "type": "object", "properties": { "branch": { "type": "number", "default": 3 }, "dirty": { "type": "number", "default": 5 }, "ahead_behind": { "type": "number", "default": 30 } }, "additionalProperties": false }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "beadsSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": true }, "priority": { "$ref": "#/$defs/priority" }, "show_wip": { "type": "boolean", "default": true, "description": "Show current WIP bead ID" }, "show_wip_count": { "type": "boolean", "default": true, "description": "Show count of in-progress beads (medium+ width)" }, "show_ready_count": { "type": "boolean", "default": true, "description": "Show count of ready beads" }, "show_open_count": { "type": "boolean", "default": true, "description": "Show count of open/pending beads (medium+ width)" }, "show_closed_count": { "type": "boolean", "default": true, "description": "Show count of completed beads (wide width only)" }, "ttl": { "type": "number", "default": 30 }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "contextBarSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": true }, "priority": { "$ref": "#/$defs/priority" }, "flex": { "type": "boolean", "default": true }, "min_width": { "type": "integer", "minimum": 0, "default": 15 }, "bar_width": { "type": "integer", "minimum": 3, "default": 10 }, "bar_style": { "type": "string", "enum": ["classic", "block"], "default": "block", "description": "Bar rendering style. 'classic': = and - characters. 'block': Unicode block characters with optional gradient." }, "gradient": { "type": "boolean", "default": true, "description": "Enable per-character gradient coloring (green to yellow to red). Only applies when bar_style is 'block'." }, "fill_char": { "type": "string", "description": "Override character for filled portion. Default: '=' (classic) or full block (block)." }, "empty_char": { "type": "string", "description": "Override character for empty portion. Default: '-' (classic) or light shade (block)." }, "thresholds": { "$ref": "#/$defs/thresholds" }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "contextUsageSection": { "type": "object", "description": "Shows context usage as 'used/total' (e.g., '125k/200k')", "properties": { "enabled": { "type": "boolean", "default": false }, "priority": { "$ref": "#/$defs/priority" }, "capacity": { "type": "integer", "default": 200000, "description": "Context window capacity in tokens. Used when max_tokens is not provided by Claude Code." }, "thresholds": { "$ref": "#/$defs/thresholds" }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "tokensRawSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "priority": { "$ref": "#/$defs/priority" }, "format": { "type": "string", "default": "{input} in/{output} out", "description": "Format template. {input} and {output} are replaced." }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "costSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": true }, "priority": { "$ref": "#/$defs/priority" }, "thresholds": { "$ref": "#/$defs/thresholds" }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "trendSection": { "type": "object", "description": "Sparkline trend visualization", "properties": { "enabled": { "type": "boolean", "default": true }, "priority": { "$ref": "#/$defs/priority" }, "width": { "type": "integer", "minimum": 3, "default": 8, "description": "Number of sparkline characters" }, "gradient": { "type": "boolean", "default": true, "description": "Enable per-character gradient coloring based on value" }, "flex": { "type": "boolean", "default": false }, "min_width": { "type": "integer", "minimum": 0 }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "contextTrendSection": { "type": "object", "description": "Context usage sparkline trend with threshold coloring", "properties": { "enabled": { "type": "boolean", "default": true }, "priority": { "$ref": "#/$defs/priority" }, "width": { "type": "integer", "minimum": 3, "default": 8, "description": "Number of sparkline characters" }, "gradient": { "type": "boolean", "default": true, "description": "Enable per-character gradient coloring based on value" }, "thresholds": { "$ref": "#/$defs/thresholds" }, "flex": { "type": "boolean", "default": false }, "min_width": { "type": "integer", "minimum": 0 }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "toolsSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": true }, "priority": { "$ref": "#/$defs/priority" }, "min_width": { "type": "integer", "minimum": 0, "default": 6 }, "show_last_name": { "type": "boolean", "default": true }, "show_breakdown": { "type": "boolean", "description": "Show per-tool breakdown in wide terminals (e.g. Bash: 84/Read: 35/Edit: 34)", "default": true }, "top_n": { "type": "integer", "minimum": 0, "description": "Max number of tools to show in breakdown (0 = all). Adaptively reduced to fit terminal width.", "default": 7 }, "palette": { "type": "array", "items": { "type": "string", "description": "Hex color string (#RRGGBB or #RGB)" }, "description": "Rotating color palette for tool names. Override to customize; leave empty (default) to auto-detect from terminal config (WezTerm/Kitty/Alacritty) or fall back to built-in Dracula palette.", "default": [] }, "ttl": { "type": "number", "default": 2 }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "cachedSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "priority": { "$ref": "#/$defs/priority" }, "ttl": { "type": "number" }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "timeSection": { "type": "object", "properties": { "enabled": { "type": "boolean", "default": false }, "priority": { "$ref": "#/$defs/priority" }, "format": { "type": "string", "default": "%H:%M", "description": "strftime format string" }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" }, "color": { "$ref": "#/$defs/colorName" }, "background": { "$ref": "#/$defs/colorName", "description": "Background color for the section. Accepts named colors (green, red), hex (#50fa7b), or palette refs (p:success). Applied as a background wrap around the section output, preserving foreground colors." }, "placeholder": { "type": ["string", "null"], "description": "Text shown when the section has no data (e.g. after /clear). Set to empty string or null to hide the section instead. Default: '--'." } }, "additionalProperties": false }, "colorMatch": { "type": "object", "description": "Map of output value to color specifier", "additionalProperties": { "type": "string" } }, "customCommand": { "type": "object", "required": [ "id", "command" ], "properties": { "id": { "type": "string", "description": "Unique identifier, used in layout arrays", "pattern": "^[a-z][a-z0-9_-]*$" }, "label": { "type": "string", "description": "Display label prefix. Defaults to id." }, "command": { "type": "string", "description": "Shell command to execute. stdout is captured as the value." }, "ttl": { "type": "number", "description": "Cache TTL in seconds", "default": 30 }, "priority": { "$ref": "#/$defs/priority" }, "flex": { "type": "boolean", "default": false }, "min_width": { "type": "integer", "minimum": 0, "default": 4 }, "color": { "type": "object", "properties": { "match": { "$ref": "#/$defs/colorMatch" } }, "additionalProperties": false }, "default_color": { "$ref": "#/$defs/colorName", "description": "Default color override. Uses 'default_color' to avoid conflict with 'color.match'." }, "prefix": { "type": "string" }, "suffix": { "type": "string" }, "pad": { "type": "integer", "minimum": 1 }, "align": { "type": "string", "enum": ["left", "right", "center"], "default": "left" } }, "additionalProperties": false } } }