xline is a small Rust Claude Code Statusline.
- keyboard-driven TUI editor built with
ratatui - starter themes written automatically on first run
- plain, Nerd Font, emoji, and powerline-style rendering
- configurable components for model, directory, worktree, hostname, git, pull requests, native context-window usage, separate five-hour and seven-day Claude rate limits, cost, session, and output style
- worktree-aware identity display with configurable Hide, Show, Branch, or Directory behavior outside worktrees, plus an optional original-branch field
- fresh themes enable Worktree with the Branch fallback and leave the richer Git status component disabled
- Git Status shows branch, file-change and upstream state, and optional SHA; branch autohiding removes duplication with another visible branch field
- pull-request number display with optional review state, URL, and separate OSC 8 hyperlinks for every visible PR field
- configurable comma-separated suffix stripping for displayed hostnames
# Build from source:
cargo build --release
# install locally
cargo install --path .Run xline in a terminal to open the theme editor:
xlineAdd to Claude Code by editing ~/.claude/settings.json and adding/editing the top-level property:
"statusLine": {
"type": "command",
"command": "xline",
"padding": 0
}By default, xline stores its configuration in ~/.claude/xline, with themes
in the themes subdirectory. Override the config directory for one-off runs or
isolated testing with --config-dir:
xline --config-dir /tmp/xline-testFor shells, wrappers, and CI, set XLINE_CONFIG_DIR:
XLINE_CONFIG_DIR=/tmp/xline-test xlineThe command-line option takes precedence over XLINE_CONFIG_DIR, which takes
precedence over the default. The selected directory applies to the TUI,
statusline rendering, initial theme bootstrap, and --install-themes.
This project drew inspiration and themes from CCometixLine.