Colors of the Society v2
auditedFreeRed Rising themed status line, now with all 14 Colors. Fresh context you rule as Gold; as it fills you descend Silver, Copper, White, Violet, Blue, Yellow, Green, Orange, Gray, Pink, Brown, Obsidian to Red in the mines. The whole line recolors live. Then Rise: /compact.
A Red Rising themed statusline that reads the session JSON from stdin, extracts fields via jq (model name, context percentage, cost, lines added/removed, effort/thinking, rate limits), and renders two colorized display lines mapping context usage to the 14 'Colors' of the pyramid. It runs 'git branch --show-current' to show the current branch and uses awk for a small percentage calculation. No files are written, no network calls are made, and no sensitive data leaves the machine.
Audits are advisory. This script runs on your machine — read it before installing.
The script — read it before you run it
#!/usr/bin/env bash
# ++ Colors of the Society ++ (Red Rising themed status line for Claude Code)
#
# Your context window is your standing in the Society's pyramid. Fresh context,
# you rule as GOLD. As it fills, you sink through all fourteen Colors -- Silver,
# Copper, White, Violet, Blue, Yellow, Green, Orange, Gray, Pink, Brown,
# Obsidian -- until you hit rock bottom as a RED in the mines. Then you Rise:
# /compact to break the chains and be reborn Gold.
#
# The whole line recolors live to whatever Color you currently burn as, and a
# spectrum strip shows your rung on the pyramid.
#
# Reads Claude Code session JSON on stdin. Requires: jq. Degrades gracefully.
input=$(cat)
j() { printf '%s' "$input" | jq -r "$1" 2>/dev/null; }
MODEL=$(j '.model.display_name // "Peerless"')
PCT=$(j '.context_window.used_percentage // 0' | cut -d. -f1); [ -z "$PCT" ] && PCT=0
COST=$(j '.cost.total_cost_usd // 0')
ADDED=$(j '.cost.total_lines_added // 0')
REMOVED=$(j '.cost.total_lines_removed // 0')
EFFORT=$(j '.effort.level // empty')
THINKING=$(j '.thinking.enabled // false')
FIVEH=$(j '.rate_limits.five_hour.used_percentage // empty')
RESET='\033[0m'; BOLD='\033[1m'; DIM='\033[2m'
# --- The 14 Colors of the Society (top of the pyramid -> the mines) ---------
NAMES=(Gold Silver Copper White Violet Blue Yellow Green Orange Gray Pink Brown Obsidian Red)
ROLES=(Sovereign Financier Magistrate Priest Artist Helmsman Physician Technologist Engineer Legionnaire Rose Servant Warrior Miner)
HUES=(220 253 173 231 141 39 227 40 208 245 218 130 236 196)
CREEDS=(
"the Society kneels"
"the coin obeys"
"you write the law"
"you judge the faithful"
"you shape beauty from nothing"
"you chart the void"
"you mend flesh and mind"
"circuits answer you"
"you keep her breathing"
"you hold the line"
"the Society's pleasure"
"unseen, you serve"
"bred for war, kept in chains"
"break the chains - RISE (/compact)")
# --- Which Color do you burn as? (context% descends the pyramid) ------------
if [ "$PCT" -ge 93 ]; then IDX=13
elif [ "$PCT" -ge 86 ]; then IDX=12
elif [ "$PCT" -ge 79 ]; then IDX=11
elif [ "$PCT" -ge 72 ]; then IDX=10
elif [ "$PCT" -ge 64 ]; then IDX=9
elif [ "$PCT" -ge 57 ]; then IDX=8
elif [ "$PCT" -ge 50 ]; then IDX=7
elif [ "$PCT" -ge 43 ]; then IDX=6
elif [ "$PCT" -ge 36 ]; then IDX=5
elif [ "$PCT" -ge 29 ]; then IDX=4
elif [ "$PCT" -ge 22 ]; then IDX=3
elif [ "$PCT" -ge 14 ]; then IDX=2
elif [ "$PCT" -ge 7 ]; then IDX=1
else IDX=0
fi
COLOR="${NAMES[$IDX]}"; ROLE="${ROLES[$IDX]}"; CREED="${CREEDS[$IDX]}"
CUR="\033[38;5;${HUES[$IDX]}m"
LAST=$(( ${#NAMES[@]} - 1 ))
EMPH=""; { [ "$IDX" -eq 0 ] || [ "$IDX" -eq "$LAST" ]; } && EMPH="$BOLD" # Gold & Red stand out
# --- House of the Institute (from model) ------------------------------------
case "$MODEL" in
*Opus*) HOUSE="House Mars" ;; # Omnis Vir Lupus - every man a wolf
*Sonnet*) HOUSE="House Minerva" ;;
*Haiku*) HOUSE="House Mercury" ;;
*Fable*) HOUSE="House Apollo" ;;
*) HOUSE="House Jupiter" ;;
esac
# --- The razor (effort level) -----------------------------------------------
case "$EFFORT" in
low) RAZOR="razor sheathed" ;;
medium) RAZOR="razor drawn" ;;
high) RAZOR="razor singing" ;;
xhigh) RAZOR="the Reaper rises" ;;
max) RAZOR="the Reaper unleashed" ;;
*) RAZOR="" ;;
esac
# --- Spectrum strip: the pyramid, Gold(left) -> Red(right), you marked ◆ -----
SPECTRUM=""
for i in "${!NAMES[@]}"; do
h="\033[38;5;${HUES[$i]}m"
if [ "$i" -eq "$IDX" ]; then SPECTRUM="${SPECTRUM}${h}${BOLD}◆${RESET}"
else SPECTRUM="${SPECTRUM}${DIM}${h}█${RESET}"; fi
done
# --- Width-aware assembly ---------------------------------------------------
COLS=${COLUMNS:-80}
SEP=" ${DIM}·${RESET} "; SEP_W=5
add() {
local vis="$1" col="$2" add_w=$(( ${#1} + SEP_W ))
[ -z "$PLAIN" ] && add_w=${#1}
if [ $(( ${#PLAIN} + add_w )) -le "$COLS" ]; then
[ -z "$PLAIN" ] && { LINE="$col"; PLAIN="$vis"; } \
|| { LINE="${LINE}${SEP}${col}"; PLAIN="${PLAIN} · ${vis}"; }
fi
}
# --- Line 1: spectrum, your Color + creed, House, front ---------------------
LINE="${SPECTRUM} ${CUR}${EMPH}${COLOR}: ${CREED}${RESET}"
printf -v SPECWIDE '%*s' "${#NAMES[@]}" ''; SPECWIDE="${SPECWIDE// /◆}"
PLAIN="${SPECWIDE} ${COLOR}: ${CREED}"
add "⟐ ${ROLE}" "${CUR}⟐ ${ROLE}${RESET}"
add "${HOUSE} · ${MODEL}" "${DIM}${HOUSE} · ${MODEL}${RESET}"
BRANCH=$(git branch --show-current 2>/dev/null)
[ -n "$BRANCH" ] && add "front: ${BRANCH}" "${CUR}front: ${BRANCH}${RESET}"
LINE1="$LINE"
# --- Line 2: burn %, He-3, razor, Sovereign's Leash, carved/razed, scheme ---
LINE="${CUR}${EMPH}${PCT}% burned${RESET}"; PLAIN="${PCT}% burned"
HE3=$(printf 'He3 %.2f' "$COST")
add "${HE3}" "${CUR}${HE3}${RESET}"
[ -n "$RAZOR" ] && add "⚔ ${RAZOR}" "${CUR}⚔ ${RAZOR}${RESET}"
if [ -n "$FIVEH" ]; then
LEASH=$(awk "BEGIN{printf \"%d\", 100-$FIVEH}")
add "Sovereign's Leash ${LEASH}%" "${DIM}Sovereign's Leash ${LEASH}%${RESET}"
fi
if [ "$ADDED" != "0" ] || [ "$REMOVED" != "0" ]; then
add "+${ADDED} carved -${REMOVED} razed" \
"\033[38;5;40m+${ADDED} carved${RESET} \033[38;5;196m-${REMOVED} razed${RESET}"
fi
[ "$THINKING" = "true" ] && add "⟐ scheming like a Gold" "${CUR}⟐ scheming like a Gold${RESET}"
LINE2="$LINE"
printf '%b\n' "$LINE1"
printf '%b\n' "$LINE2"