CyberPunk/BladeRunner styling. Two lines with kanji field labels: repo 庫, branch 枝, worktree 樹, and model 脳 on top; context 文, 5-hour 時, and weekly 週 meters below. The rate-limit bars carry a ┃ pace cursor marking how far through the reset window you are — cyan when your usage trails the cursor (on track), amber/red when it outruns it.

10 installs

Before you install

  • This version was reviewed before it was listed on Jul 10, 2026
  • Doesn't ask to connect to the internet
  • Needs jq; git is optional and only adds the repo, branch and worktree labels
  • Colors are 24-bit truecolor codes, so use a terminal with truecolor support
  • Run it with --test, or with no piped input, to print sample on track, critical and no-data states
Not showing after you paste? Fix it

Preview

Clean repo
庫 app · 枝 main · 脳 OPUS-4.8 文 ▓▓░░░░░░ 22% · 時 ▓▓░░┃░░░ 26% · 週 ▓░░░░┃░░ 7%
New session
庫 app · 枝 main · 脳 OPUS-4.8 文 ░░░░░░░░ -- · 時 ░░░░░░░░ -- · 週 ░░░░░░░░ --
Dirty branch
庫 app · 枝 feat/auth · 樹 feat-auth · 脳 SONNET-4.6 文 ▓▓▓▓░░░░ 48% · 時 ▓▓▓░░┃░░ 40% · 週 ▓░░░┃░░░ 18%
Near-full
庫 app · 枝 main · 脳 OPUS-4.8 文 ▓▓▓▓▓▓▓░ 91% · 時 ▓▓▓▓▓▓▓┃ 88% · 週 ▓▓▓▓▓░┃░ 61%
1M context
庫 app · 枝 main · 脳 FABLE-5 文 ▓▓▓▓▓░░░ 64% · 時 ▓┃▓░░░░░ 33% · 週 ▓┃▓▓▓▓░░ 80%
Post-compact
庫 app · 枝 main · 脳 HAIKU-4.5 文 ░░░░░░░░ -- · 時 ▓┃▓▓░░░░ 52% · 週 ░░░░░░░░ --
Worktree
庫 app · 枝 worktree-feature · 樹 feature · 脳 OPUS-4.8 文 ▓▓▓░░░░░ 37% · 時 ▓▓┃▓░░░░ 44% · 週 ▓▓░░░┃░░ 20%
Non-git
脳 OPUS-4.8 文 ▓▓░░░░░░ 22% · 時 ░░░░░░░░ -- · 週 ░░░░░░░░ --

In Claude Desktop

Kanji Rain in Claude Desktop

Recorded with statusline-anywhere.

What it does

Two lines with kanji labels: repo, branch, worktree and model on top, then 8-cell meters for context, the 5-hour limit and the weekly limit, each limit with a pace cursor.

Written in
Bash
Network access
None requested
Works in
Terminal

How it works

  1. Reads model, folder, repo name, context and both rate-limit windows from stdin via jq
  2. Gets the branch from git and detects worktrees made by hand with git worktree add
  3. A ┃ cursor marks time elapsed in each window; usage ahead of it goes amber, then red
  4. Missing data shows a dim empty bar with --; outside a repo only the model stays on top

Source

#!/usr/bin/env bash
# Kanji Rain — statusline for Claude Code.
#
# Claude Code pipes session JSON on stdin (see ~/.claude/settings.json
# "statusLine"); this prints two ANSI-colored lines:
#
#   庫 repo · 枝 branch · 樹 worktree · 脳 model
#   文 context ▓▓▓░░░┃░ 42% · 時 5h · 週 weekly
#
# Rate-limit meters (時/週) carry a ┃ pace cursor marking how far through the
# reset window you are: fill behind the cursor means you're consuming slower
# than the window refills (on track, cyan); fill past it means you're outrunning
# it (amber, then red for way over). Absolute floors still apply — >= 85% used
# is always red no matter the pace. The context meter (文) has no window, so it
# uses plain 60/85 thresholds. Fields with no data (rate limits before the
# first response, context at session start) render as a dim empty bar. The 樹
# worktree segment only appears inside a linked worktree; 庫/枝/樹 all
# disappear outside a git repo.
#
# Run it from a terminal (no piped stdin) for a preview of the
# normal / critical / no-data states. Requires jq; git is optional.

# ── Palette (truecolor) ───────────────────────────────────────────────────────
MAG=$'\033[38;2;255;79;208m'   # kanji field icons
CYN=$'\033[38;2;77;240;224m'   # values, healthy meters
AMB=$'\033[38;2;255;180;84m'   # meters >= 60%
RED=$'\033[38;2;255;75;87m'    # meters >= 85%
WHT=$'\033[38;2;232;238;250m'  # model name
DIM=$'\033[38;2;74;88;113m'    # separators, missing data
RST=$'\033[0m'

SEP=" ${DIM}·${RST} "
BAR_CELLS=8
# ▓/░ render one column wide in every monospace font; fancier glyphs like ▰/▱
# are East-Asian-ambiguous width and overlap in many terminal fonts.
FILL="▓"
EMPTY="░"
MARK="┃"

# ── Meter: "▓▓▓░░░┃░ 42%" ─────────────────────────────────────────────────────
# $1 usage pct (-1 = no data), $2 elapsed pct of the reset window (-1 = none).
# With a window, the ┃ cursor marks "now" and color keys off usage - elapsed:
# on pace cyan, > 5 over amber, > 20 over red, with absolute floors at 70/85.
# Without one, plain 60/85 thresholds.
meter() {
  local pct=${1:--1} elapsed=${2:--1} color filled mark=0 i bar=""
  if (( pct < 0 )); then
    for (( i = 1; i <= BAR_CELLS; i++ )); do bar+="$EMPTY"; done
    printf '%s' "${DIM}${bar} --${RST}"
    return
  fi
  (( pct > 100 )) && pct=100

  local sev=0  # 0 cyan · 1 amber · 2 red
  if (( elapsed >= 0 )); then
    local over=$(( pct - elapsed ))
    if   (( over > 20 )); then sev=2
    elif (( over > 5  )); then sev=1
    fi
    (( pct >= 70 && sev < 1 )) && sev=1
    (( pct >= 85 )) && sev=2
    mark=$(( (elapsed * BAR_CELLS + 50) / 100 ))
    (( mark < 1 )) && mark=1
    (( mark > BAR_CELLS )) && mark=BAR_CELLS
  else
    (( pct >= 60 )) && sev=1
    (( pct >= 85 )) && sev=2
  fi
  case $sev in
    2) color=$RED ;;
    1) color=$AMB ;;
    *) color=$CYN ;;
  esac

  filled=$(( (pct * BAR_CELLS + 50) / 100 ))
  for (( i = 1; i <= BAR_CELLS; i++ )); do
    if   (( i == mark ));   then bar+="${WHT}${MARK}${color}"
    elif (( i <= filled )); then bar+="$FILL"
    else                         bar+="$EMPTY"
    fi
  done
  printf '%s' "${color}${bar} ${pct}%${RST}"
}

# ── Elapsed % of a reset window, from its resets_at epoch ─────────────────────
# $1 resets_at (-1 = unknown), $2 window length in seconds.
elapsed_pct() {
  local resets_at=${1:--1} window=$2 remaining now=${EPOCHSECONDS:-$(date +%s)}
  if (( resets_at <= 0 )); then printf '%s' -1; return; fi
  remaining=$(( resets_at - now ))
  (( remaining < 0 )) && remaining=0
  (( remaining > window )) && remaining=window
  printf '%s' $(( (window - remaining) * 100 / window ))
}

# ── Render one statusline from a JSON payload ─────────────────────────────────
render() {
  local json="$1"
  local fields model dir wt repo ctx five wk five_reset wk_reset branch

  fields=$(printf '%s' "$json" | jq -r '[
    (.model.display_name? // .model.id? // "claude"),
    (.workspace.current_dir? // .cwd? // ""),
    (.workspace.git_worktree? // .worktree.name? // ""),
    (.workspace.repo.name? // ""),
    ((.context_window.used_percentage? // -1) | round),
    ((.rate_limits.five_hour.used_percentage? // -1) | round),
    ((.rate_limits.seven_day.used_percentage? // -1) | round),
    ((.rate_limits.five_hour.resets_at? // -1) | round),
    ((.rate_limits.seven_day.resets_at? // -1) | round)
  ] | map(tostring) | join("\u001f")' 2>/dev/null) \
    || { printf '%s\n' "${DIM}claude${RST}"; return; }

  # unit separator, not tab: tab is IFS whitespace, so empty fields (e.g. no
  # worktree) would collapse and shift everything after them
  IFS=$'\x1f' read -r model dir wt repo ctx five wk five_reset wk_reset <<< "$fields"

  branch=""
  if [[ -n "$dir" ]]; then
    branch=$(command git -C "$dir" symbolic-ref --short -q HEAD 2>/dev/null) \
      || branch=$(command git -C "$dir" rev-parse --short HEAD 2>/dev/null)
  fi

  if [[ -n "$branch" ]]; then
    local git_dir common_dir
    git_dir=$(command git -C "$dir" rev-parse --absolute-git-dir 2>/dev/null)
    common_dir=$(command git -C "$dir" rev-parse --path-format=absolute --git-common-dir 2>/dev/null)
    # the common dir is <repo>/.git even inside a worktree, so its parent names
    # the repo when workspace.repo.name is absent (e.g. no GitHub remote)
    if [[ -z "$repo" && -n "$common_dir" ]]; then
      repo=$(basename "$(dirname "$common_dir")")
    fi
    # Claude Code only fills workspace.git_worktree for worktrees it created;
    # detect hand-made ones (git worktree add) by comparing git dirs.
    if [[ -z "$wt" && -n "$git_dir" && "$git_dir" != "$common_dir" ]]; then
      wt=$(basename "$(command git -C "$dir" rev-parse --show-toplevel 2>/dev/null)")
    fi
  fi

  # tr, not ${model^^}: macOS ships bash 3.2, which lacks case conversion
  model=$(printf '%s' "$model" | tr '[:lower:]' '[:upper:]')
  model=${model// /-}

  local -a parts=() meters=()
  [[ -n "$repo"   ]] && parts+=("${MAG}庫${RST} ${CYN}${repo}${RST}")
  [[ -n "$branch" ]] && parts+=("${MAG}枝${RST} ${CYN}${branch}${RST}")
  [[ -n "$wt"     ]] && parts+=("${MAG}樹${RST} ${CYN}${wt}${RST}")
  parts+=("${MAG}脳${RST} ${WHT}${model}${RST}")
  meters+=("${MAG}文${RST} $(meter "$ctx")")
  meters+=("${MAG}時${RST} $(meter "$five" "$(elapsed_pct "$five_reset" $(( 5 * 3600 )))")")
  meters+=("${MAG}週${RST} $(meter "$wk" "$(elapsed_pct "$wk_reset" $(( 7 * 86400 )))")")

  join_line "${parts[@]}"
  join_line "${meters[@]}"
}

# ── Join segments with the dim separator and print as one line ────────────────
join_line() {
  local line="" part
  for part in "$@"; do
    [[ -n "$line" ]] && line+="$SEP"
    line+="$part"
  done
  printf '%s\n' "$line"
}

# ── Preview mode: sample states, using the real repo for branch info ─────────
preview() {
  local base now=${EPOCHSECONDS:-$(date +%s)}
  base=$(printf '{"model":{"display_name":"Fable 5"},"workspace":{"current_dir":"%s"}}' "$PWD")

  # on track: 5h at 31% used / 75% elapsed, weekly at 68% used / 80% elapsed
  printf 'on track\n'
  render "$(printf '%s' "$base" | jq --argjson now "$now" '. + {
    context_window:{used_percentage:42},
    rate_limits:{five_hour:{used_percentage:31, resets_at:($now + 4500)},
                 seven_day:{used_percentage:68, resets_at:($now + 120960)}}}')"
  # burning hot: 5h at 91% used / 40% elapsed, weekly at 76% used / 50% elapsed
  printf 'critical\n'
  render "$(printf '%s' "$base" | jq --argjson now "$now" '.workspace.git_worktree="feat-statusline" | . + {
    context_window:{used_percentage:74},
    rate_limits:{five_hour:{used_percentage:91, resets_at:($now + 10800)},
                 seven_day:{used_percentage:76, resets_at:($now + 302400)}}}')"
  printf 'no data\n'
  render "$base"
}

if [[ "${1:-}" == "--test" || -t 0 ]]; then
  preview
  exit 0
fi

render "$(cat)"

Badge for your README

Own this listing? Add it to your README. The badge shows the install count as it grows.

Reviewed on statuslin.es
[![Reviewed on statuslin.es](https://statuslin.es/badge/c/kanji-rain-44ef4b3b.svg)](https://statuslin.es/c/kanji-rain-44ef4b3b?utm_source=readme-badge)

Or show the preview card:

Preview on statuslin.es
[![Preview on statuslin.es](https://statuslin.es/og/c/kanji-rain-44ef4b3b.png)](https://statuslin.es/c/kanji-rain-44ef4b3b?utm_source=readme-badge)

More status lines

  • 115 installs
Opus 4.8 [high] ~/app main 16:20:55 | ⛁ ██░░░░░░░░ 22% | 5h ●◔○○○ 26% ↻2h7m | 7d ◔○○○○○○ 7% ↻2d1h │ $0.41 ⏱ 10m
  • 57 installs
Opus 4.8 high ✦ │ ctx 22% │ app (main) │ PR #1287 ● │ $0.41 · 10m +128 -34 Session ● ● ● ● ● ● ● ● ○ ○ ○ 74% left Resets in 2h 6m Weekly ● ● ● ● ● ● ● ● ● ● ○ 93% left Resets in 2d 0h Fable ● ● ● ● ● ● ● ● ● ○ ○ 85% left Resets in 2d 0h ◐ Read:index.ts ✓ Read×1 ✓ Bash×1 ✓ Edit×1 ✓ Grep×1 ◐ code-reviewer Review the change for regressions
Model: Opus 4.8 | Thinking: high | Context: [▰▰▱▱▱▱▱▱▱▱] 45k/200k (22%) | cwd: ~/app | ⎇ main | (+0,-0) Cost: $0.41 | Block: 2hr 6m | Weekly: 7.0% | Session: 10m | In: 916.7 t/s | Out: 29.2 t/s | Cached: 2k | Session: [▰▱▱▱▱] 26.0% Mem: 0.8G/1.0G | (*゚∀゚*) | Session ID: b8e1c0d2-4a6f-4e2a-9c1b-3f5d7a9e2c10
  • 5 installs
Opus 4.8 (200K) high | app (main) ██░░░░░░░░ 22% 200K | 5h 26% ⇣32% 2h 7d 7% ⇣63% 2d
  • 4 installs
📁 app 🌿 main 🧠 Opus 🧊 22% [==--------] 💰 $0.41 ($2.41/h) ⏳ 5h: 26% [==--------] 7d: 7% [----------]
📁 app 🌿 main 🧠 Opus 🧊 22% [==--------] 💰 $0.41 ($2.41/h) ⏳ 5h: 26% [==--------] 7d: 7% [----------]

Related mods

Deck in Claude Desktop

A cockpit for Claude Code: plan bars and subagent strips, context, usage limits with reset countdowns and burn rates, spend, the model route and a pet. Six bar styles, three collapsed looks. CLI and Desktop.

Token Weather Usage in Claude Desktop

One line above the prompt: context tokens with their weather, a bar per recent prompt, your 5-hour and 7-day limits against the time elapsed, the prompt cache with its time left, the session cost with the last prompt's share in dollars and in points of the 5-hour limit, the subagents running, and a one-click pill for the GOs Claude proposes. Labels in English, French or Russian. After Token Weather (Anthropic, Apache-2.0) and the ideas of usage-meter (HolyGrail) and prompt-cache-control (Daniel San).

Flightdeck in Claude Desktop

Flightdeck: a live agent dashboard for Claude Code. Main model vitals, an on-call architect, every permission check, subagent cards and swimlanes, a turn receipt and a session log, all from real session events