cc-statusline

command module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 11 Imported by: 0

README

cc-statusline

A Go program for Claude Code's statusline that displays session info in a compact, Nerd Font-styled format with clickable OSC 8 hyperlinks.

Example outputs

Each line shows: CWD · Model · Context usage · Tokens (in/out) · Rate limits (5h/7d). Git branch or worktree name appears after the path when not on main. Empty segments are omitted automatically. CWD, worktree name, and rate limits are clickable hyperlinks.

Long branch names are progressively shortened to fit the terminal width.

When a rate limit resets within 1 hour, the display switches from used percentage to remaining capacity with a countdown:

  • Normal: both limits as used percentages
  • 5h reset approaching: remaining capacity + countdown (e.g. 39% for 52m)
  • 7d reset approaching: same format with a calendar icon

Requirements

  • Go 1.21+
  • A Nerd Font in your terminal
  • A terminal with OSC 8 hyperlink support (Ghostty, iTerm2, Kitty, WezTerm)

Install

Homebrew
brew install rileychh/tap/cc-statusline
Go
go install github.com/rileychh/cc-statusline@latest
Nix flakes
{
  inputs = {
    cc-statusline.url = "github:rileychh/cc-statusline"
    cc-statusline.inputs.nixpkgs.follows = "nixpkgs";
  };

  # In your system packages:
  environment.systemPackages = [
    inputs.cc-statusline.packages.${pkgs.stdenv.hostPlatform.system}.default
  ];
}

Configure

Add to ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "cc-statusline"
  }
}

The binary must be in your PATH (e.g. in GOBIN).

If you're using Nix, it can be installed with a single configuration:

{
  "statusLine": {
    "type": "command",
    "command": "nix run github:rileychh/cc-statusline"
  }
}

Customization

Segments are composable functions with the signature func(*StatusInput) segmentResult. To add, remove, or reorder segments, edit the slice in main():

fmt.Print(render(&input, []segment{
    cwdSegment,
    modelSegment,
    contextSegment,
    tokensSegment,
    rateLimitsSegment,
}, " · "))

Return segmentResult{} from a segment to skip it. Segments can provide a compact callback to support adaptive shortening when the statusline exceeds the terminal width.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL