Metadata-Version: 2.4
Name: ccstatusline-py
Version: 0.1.1
Summary: Customizable statusline formatter for Claude Code CLI
License: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: pydantic>=2.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: textual>=0.80.0
Requires-Dist: tomli-w>=1.0.0
Description-Content-Type: text/markdown

# ccstatusline-py

A Python/uv port of [ccstatusline](https://github.com/sirmalloc/ccstatusline) — customizable statusline for Claude Code CLI. No Node.js required.

## Installation

Once published to PyPI:

```bash
uvx --from ccstatusline-py ccstatusline
```

In the meantime, install the latest from GitHub:

```bash
uv tool install --python 3.11 git+https://github.com/MChromiak/cc_statusline_py.git
```

Either path puts a `ccstatusline` binary on your PATH.

## Claude Code integration

Add to `~/.claude/settings.json`:

```json
{
  "statusLine": {
    "type": "command",
    "command": "ccstatusline",
    "padding": 0
  }
}
```

(Use `uvx ccstatusline` instead of `ccstatusline` if you installed via `uvx`.)

## Configuration

Run interactively to configure visually:

```bash
ccstatusline
```

Config is saved to `~/.config/ccstatusline_py/settings.toml`. If you already have a config from the original ccstatusline, it will be migrated automatically on first run.

## Examples

Each example below is a complete `~/.config/ccstatusline_py/settings.toml`. Available widget types include `model`, `cwd`, `git_branch`, `git_status`, `context_pct`, `context_bar`, `session_cost`, `session_duration`, `tokens_used`, `burn_rate`, `block_reset_timer`, `separator`, and more.

### 1. Minimal — model name and git branch

```toml
color_level = "none"
minimalist_mode = true

[powerline]
enabled = false

[[lines]]
widgets = [
  { type = "model", padding = 0 },
  { type = "separator", padding = 1 },
  { type = "git_branch", padding = 0 },
]
```

Renders as:

```
claude-sonnet-4-5  │  main
```

### 2. Powerline — model, branch, context bar, cost

```toml
color_level = "truecolor"

[powerline]
enabled = true
separator = ""
left_cap = ""
right_cap = ""

[[lines]]
widgets = [
  { type = "model",        fg = "#ffffff", bg = "#005f87", padding = 1 },
  { type = "git_branch",   fg = "#1e1e2e", bg = "#a6e3a1", padding = 1 },
  { type = "context_bar",  fg = "#1e1e2e", bg = "#f9e2af", padding = 1 },
  { type = "session_cost", fg = "#1e1e2e", bg = "#f5c2e7", padding = 1 },
]
```

Renders coloured powerline-style segments:

```
 claude-sonnet-4-5  main  ████░░░░░░  $0.0234
```

(With a Nerd Font, the segment caps are rendered as connected arrows.)

### 3. Two-line — overview line + project line

```toml
color_level = "256"

[powerline]
enabled = false

[[lines]]
widgets = [
  { type = "model",        fg = "#5fafff", padding = 0 },
  { type = "separator",    padding = 1 },
  { type = "context_pct",  fg = "#ffaf00", padding = 0 },
  { type = "separator",    padding = 1 },
  { type = "session_cost", fg = "#aaffaa", padding = 0 },
]

[[lines]]
widgets = [
  { type = "cwd",        fg = "#888888", padding = 0 },
  { type = "separator",  padding = 1 },
  { type = "git_branch", fg = "#ff87d7", padding = 0 },
  { type = "git_status", fg = "#ffaf00", padding = 1 },
]
```

Renders two lines:

```
claude-sonnet-4-5  │  42.5%  │  $0.0234
cc_statusline_py  │  main ✔
```

## Requirements

- Python 3.11+
- uv
