_ _ _ _
___ ___ ___| |_ __ _| |_ _ _ ___| (_)_ __ ___
/ __/ __/ __| __/ _` | __| | | / __| | | '_ \ / _ \
| (_| (__\__ \ || (_| | |_| |_| \__ \ | | | | | __/
\___\___|___/\__\__,_|\__|\__,_|___/_|_|_| |_|\___|
# ccstatusline
**๐จ A highly customizable status line formatter for Claude Code CLI**
*Display model info, git branch, token usage, and other metrics in your terminal*
[](https://www.npmjs.com/package/ccstatusline)
[](https://www.npmjs.com/package/ccstatusline)
[](https://github.com/sirmalloc/ccstatusline/blob/main/LICENSE)
[](https://nodejs.org)
[](https://packagephobia.com/result?p=ccstatusline)
[](https://github.com/sirmalloc/ccstatusline/graphs/commit-activity)
[](https://github.com/hesreallyhim/awesome-claude-code)

## ๐ Table of Contents
- [Recent Updates](#-recent-updates)
- [Features](#-features)
- [Quick Start](#-quick-start)
- [Usage](#-usage)
- [Development](#๏ธ-development)
- [Contributing](#-contributing)
- [License](#-license)
- [Related Projects](#-related-projects)
---
## ๐ Recent Updates
### v1.1.0 - Enhanced Customization
- **๐จ Background Colors** - Set background colors for individual status items in Color Configuration menu
- **๐ค Bold Text Styling** - Toggle bold formatting for individual items in Color Configuration menu
- **โ๏ธ Global Options Menu** - New menu for global formatting preferences including padding, separators, color inheritance, and overrides
---
## โจ Features
- **๐ Real-time Metrics** - Display model name, git branch, token usage, session duration, and more
- **๐จ Fully Customizable** - Choose what to display and customize colors for each element
- **๐ Multi-line Support** - Configure up to 3 independent status lines
- **๐ฅ๏ธ Interactive TUI** - Built-in configuration interface using React/Ink
- **โ๏ธ Global Options** - Apply consistent formatting across all items (padding, separators, bold, background)
- **๐ Cross-platform** - Works seamlessly with both Bun and Node.js
- **๐ Smart Width Detection** - Automatically adapts to terminal width with flex separators
- **โก Zero Config** - Sensible defaults that work out of the box
---
## ๐ Quick Start
### No installation needed! Use directly with npx:
```bash
# Run the configuration TUI
npx ccstatusline@latest
```
### Configure ccstatusline
The interactive configuration tool provides a terminal UI where you can:
- Configure up to 3 separate status lines
- Add/remove/reorder status line items
- Customize colors for each element
- Configure flex separator behavior
- Edit custom text items
- Install/uninstall to Claude Code settings
- Preview your status line in real-time
> ๐ก **Tip:** Your settings are automatically saved to `~/.config/ccstatusline/settings.json`
---
## ๐ Usage
Once configured, ccstatusline automatically formats your Claude Code status line. The status line appears at the bottom of your terminal during Claude Code sessions.
### ๐ Available Status Items
- **Model Name** - Shows the current Claude model (e.g., "Claude 3.5 Sonnet")
- **Git Branch** - Displays current git branch name
- **Git Changes** - Shows uncommitted insertions/deletions (e.g., "+42,-10")
- **Session Clock** - Shows elapsed time since session start (e.g., "2hr 15m")
- **Version** - Shows Claude Code version
- **Tokens Input** - Shows input tokens used
- **Tokens Output** - Shows output tokens used
- **Tokens Cached** - Shows cached tokens used
- **Tokens Total** - Shows total tokens used
- **Context Length** - Shows current context length in tokens
- **Context Percentage** - Shows percentage of context limit used (out of 200k)
- **Context Percentage (usable)** - Shows percentage of usable context (out of 160k, accounting for auto-compact at 80%)
- **Terminal Width** - Shows detected terminal width (for debugging)
- **Custom Text** - Add your own custom text to the status line
- **Custom Command** - Execute shell commands and display their output (refreshes whenever the statusline is updated by Claude Code)
- **Separator** - Visual divider between items (customizable: |, -, comma, space)
- **Flex Separator** - Expands to fill available space
---
### โจ๏ธ TUI Controls
#### Main Menu
- **โโ** - Navigate menu items
- **Enter** - Select item
- **Ctrl+C** - Exit
#### Line Editor
- **โโ** - Select item
- **โโ** - Change item type
- **Enter** - Enter move mode (reorder items)
- **a** - Add item at end
- **i** - Insert item before selected
- **d** - Delete selected item
- **c** - Clear entire line
- **r** - Toggle raw value mode (no labels)
- **b** - Toggle bold text for this item
- **e** - Edit value (for custom-text and custom-command items)
- **w** - Set max width (for custom-command items)
- **t** - Set timeout in milliseconds (for custom-command items)
- **p** - Toggle preserve colors (for custom-command items)
- **Space** - Change separator character (for separator items)
- **ESC** - Go back
#### Color Configuration
- **โโ** - Select item
- **Enter** - Cycle through colors
- **ESC** - Go back
#### Terminal Width Options
These settings affect where long lines are truncated, and where right-alignment occurs when using flex separators:
- **Full width always** - Uses full terminal width (may wrap if auto-compact message appears or IDE integration adds text)
- **Full width minus 40** - Reserves 40 characters for auto-compact message to prevent wrapping (default)
- **Full width until compact** - Dynamically switches between full width and minus 40 based on context percentage threshold (configurable, default 60%)
---
### โ๏ธ Global Options
Configure global formatting preferences that apply to all status items:

#### Default Padding & Separators
- **Default Padding** - Add consistent padding to the left and right of each item
- **Default Separator** - Automatically insert a separator between all items
- Press **(p)** to edit padding
- Press **(s)** to edit separator
### ๐ Show Your Support
Give a โญ if this project helped you!
[](https://github.com/sirmalloc/ccstatusline/stargazers)
[](https://github.com/sirmalloc/ccstatusline/network/members)
[](https://github.com/sirmalloc/ccstatusline/watchers)
[](https://www.npmjs.com/package/ccstatusline)
[](https://www.npmjs.com/package/ccstatusline)
[](https://github.com/sirmalloc/ccstatusline/blob/main/LICENSE)
[](https://bun.sh)
[](https://github.com/sirmalloc/ccstatusline/issues)
[](https://github.com/sirmalloc/ccstatusline/pulls)
[](https://github.com/sirmalloc/ccstatusline/graphs/contributors)
### ๐ฌ Connect
[Report Bug](https://github.com/sirmalloc/ccstatusline/issues) ยท [Request Feature](https://github.com/sirmalloc/ccstatusline/issues) ยท [Discussions](https://github.com/sirmalloc/ccstatusline/discussions)