Skip to content

itzTiru/ccline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccline

A small, configurable statusline for Claude Code. Bash + jq, or native PowerShell. Nothing else.

Shows: dir, GitHub account, git branch, AWS profile, model, session cost, context %, 200k flag, 5h rate limit, duration, lines changed. Each toggleable.


Install with Claude Code

Paste this prompt into Claude Code:

Install ccline from https://github.com/itzTiru/ccline

Claude will clone the repo, run the correct installer for your platform, and verify the install.


Install manually

Linux / macOS / WSL / Git Bash

One-liner:

curl -fsSL https://raw.githubusercontent.com/itzTiru/ccline/main/setup.sh | bash

Or clone + install:

git clone https://github.com/itzTiru/ccline.git ~/.ccline
~/.ccline/bash/install.sh

Windows PowerShell

One-liner (Windows PowerShell 5.1 or PowerShell 7+):

iwr -useb https://raw.githubusercontent.com/itzTiru/ccline/main/setup.ps1 | iex

Or clone + install:

git clone https://github.com/itzTiru/ccline.git "$HOME\.ccline"
& "$HOME\.ccline\powershell\install.ps1"

If your execution policy blocks unsigned scripts, run the installer as:

powershell -NoProfile -ExecutionPolicy Bypass -File "$HOME\.ccline\powershell\install.ps1"

After install, press Esc in Claude Code to refresh the statusline. Run ccline config anytime to tweak segments.


What install does

  • clones/copies repo to ~/.ccline (or wherever you cloned it)
  • copies the statusline script to ~/.claude/ccline-statusline.sh (bash) or ~/.claude/ccline-statusline.ps1 (PowerShell)
  • copies default ccline.conf to ~/.claude/ccline.conf
  • backs up ~/.claude/settings.json to ~/.claude/settings.json.ccline-backup
  • patches settings.json so Claude Code's statusLine runs the new script
  • installs a ccline shim into ~/.local/bin (bash symlink, or .cmd wrapper on Windows)

Repo layout

ccline.conf          shared default config
setup.sh             curl | bash installer
setup.ps1            iwr | iex installer
bash/                ccline, install.sh, statusline.sh, uninstall.sh
powershell/          ccline.ps1, install.ps1, statusline.ps1, uninstall.ps1

Commands

ccline init              install and activate
ccline config            interactive toggle menu (save with q)
ccline gh <user>         switch active GitHub account (wraps gh auth switch)
ccline aws [profile]     list AWS profiles; with arg, print the profile name
ccline status            show install state
ccline uninstall         restore original settings.json, remove script
ccline help              usage

Examples

Bash:

ccline config                 # toggle segments on/off
ccline gh myworkaccount       # switch GitHub auth
eval $(ccline aws dev)        # switch AWS profile in current shell
ccline uninstall              # clean revert

PowerShell:

ccline config                         # toggle segments on/off
ccline gh myworkaccount               # switch GitHub auth
$env:AWS_PROFILE = (ccline aws dev)   # switch AWS profile in current shell
ccline uninstall                      # clean revert

Config

~/.claude/ccline.conf is a plain key=value file shared by both the bash and PowerShell scripts. Edit directly or via ccline config.

SHOW_DIR=1
SHOW_GITHUB=1
SHOW_AWS=1
SHOW_MODEL=1
SHOW_COST=1
SHOW_CONTEXT=1
SHOW_GIT=0
SHOW_RATE_LIMIT=0
SHOW_DURATION=0
SHOW_LINES=0

CONTEXT_WARN=50    # yellow at this %
CONTEXT_ALERT=80   # red at this %

Cost accuracy

ccline displays cost.total_cost_usd as emitted by Claude Code itself. Claude Code computes this turn-by-turn from actual API usage responses. It's the most accurate figure available client-side. Color thresholds kick in at $1 (yellow) and $5 (red) per session.

Caveats that affect any statusline:

  • Fast mode (Opus 4.6) bills at 6× standard rates. The statusline JSON does not expose fast-mode state directly, but Claude Code's cost figure still reflects it correctly.
  • The 1M-context surcharge that used to apply above 200k tokens no longer exists for Opus 4.6 / Sonnet 4.6. Pricing is flat across the full window.

Uninstall

ccline uninstall
  • restores settings.json from the backup made on first init
  • removes ~/.claude/ccline-statusline.sh (or .ps1)
  • removes the ~/.local/bin/ccline shim
  • keeps ~/.claude/ccline.conf (delete manually if you want it gone)

Requirements

Bash edition (Linux / macOS / WSL / Git Bash):

  • bash 3.2+ (macOS default works)
  • jq
  • awk, sed, grep, git (shipped everywhere Unix)
  • gh CLI (only if you use ccline gh)

PowerShell edition (Windows):

  • Windows PowerShell 5.1 or PowerShell 7+ (pwsh preferred when present)
  • git on PATH
  • gh CLI (only if you use ccline gh)

License

MIT

About

A small, configurable statusline for Claude Code. Bash + jq, or native PowerShell - nothing else

Topics

Resources

License

Stars

Watchers

Forks

Contributors