claude-code-status-line

command module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 8 Imported by: 0

README

Claude Code Status Line

A custom status line hook for Claude Code that displays rich session information with colorized output in your terminal.

Features

Displays the following information when Claude Code starts or updates:

  • User and directory: Current username and working directory
  • Git status: Current branch with dirty indicator (*)
  • Model info: Active Claude model name
  • Usage metrics: Context window usage percentage and total cost
  • Token counts: Input and output tokens

Installation

Option 1: Using go install
go install github.com/0xys/claude-code-status-line@latest

The binary will be installed to your $GOPATH/bin directory (typically ~/go/bin).

Option 2: Build from source
git clone https://github.com/0xys/claude-code-status-line.git
cd claude-code-status-line
go build -o bin/claude-code-status-line main.go

Usage

Configure Claude Code to use this command by editing ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "claude-code-status-line <my_username>"
  }
}
  • <my_username> is an optional argument. If no argument is provided, it uses your system username.

Example Output

<my_username>:~/code/personal/project main* 👾 Claude Sonnet 4.5 used 45.23% $1.25 ↑8912 ↓15234
  • Gray: username and directory
  • Orange: git branch and status
  • Light Blue: model name
  • Yellow: usage percentage and cost
  • Light Red: token counts

Requirements

  • Go 1.25.6 or later
  • Git (for git status detection)
  • Claude Code CLI

Development

See CLAUDE.md for architecture details and development guidance.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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