Claude Code status line

goccc

A single-binary cost calculator that can also drive a customizable Claude Code status line.

35 stars 6 forksStatus lines Source

Install

Install
brew install backstabslash/tap/goccc
From source
git clone https://github.com/backstabslash/goccc.git

From the README

A fast, zero-dependency CLI cost calculator, tool analytics, and customizable statusline for Claude Code. Breakdowns by model, day, project, and branch. Single binary, no runtime needed.

Table of Contents

- Installation
- Usage
- Claude Code Statusline
- Session Exit Hook
- Tool & Skill Analytics
- Configuration
- Flags
- Preserving Log History

Installation

Homebrew (macOS / Linux)

Go install

Pre-built binaries

Available on the releases page for macOS, Linux, and Windows (amd64 / arm64).

From source

Usage

Claude Code Statusline

goccc can serve as a Claude Code statusline β€” a fully customizable, live cost dashboard right in your terminal prompt.

- πŸ’Έ Session cost β€” parsed from the current session's JSONL files using goccc's pricing table
- πŸ’° Today's total β€” aggregated across all sessions today (shown only when higher than session cost)
- πŸ’­ Context % β€” context window usage percentage
- πŸ”‹ 5h / 7d window β€” remaining percentage of the usage window with elapsed time (subscription users only; hidden for API billing). Emoji switches to πŸͺ« below 25%
- πŸ€– Model β€” current model

The mcp segment (active MCP servers) is available but off by default β€” add it to segments to enable it.

Values are color-coded: cost and context turn yellow β†’ red as they increase; rate limit windows are inverted β€” yellow below 50%, red below 25% remaining.

Setup

Add to ~/.claude/settings.json:

Works with any install method. To run without installing: go run github.com/backstabslash/goccc@latest -statusline.

Customization

The statusline is fully customizable via ~/.goccc.json. With no config, you get the default layout shown above.

segments β€” ordered list of segments to display. Only listed segments are shown; segments with no data auto-hide. "|" forces a line break.

The config…
Read the full README on GitHub

How status lines work

  • A status line is a command Claude Code runs to draw the bar under the prompt. It gets the session as JSON on stdin (model, folder, cost, context) and prints one or more lines.
  • Point the statusLine setting in ~/.claude/settings.json at it: { "statusLine": { "type": "command", "command": "<the command from the README>" } }.
  • Or run /statusline inside Claude Code and describe what you want.
Claude Code docs

Details

Language
Go
License
MIT
Last updated
11 October 2026
Topics
anthropicapi-costsclaudeclaude-codeclicost-calculatordeveloper-toolsgolangstatuslineusage-tracker

FAQ

What is goccc?

A single-binary cost calculator that can also drive a customizable Claude Code status line. It is a status line for Claude Code, from backstabslash/goccc on GitHub.

How do I install goccc?

Run brew install backstabslash/tap/goccc, then follow the setup in the README.

Is goccc popular?

backstabslash/goccc has 35 GitHub stars and 6 forks, and is included in 1 curated Claude Code list. It was last updated on 11 October 2026.

More status lines

Browse the most popular Claude Code mods, all status lines, or the skills and MCP server directories.