최신 포스트
📌 이런 분들께 추천 Claude Code 쓰면서 사용량 / 비용 / 리셋 시간 헷갈리는 분 터미널에서 깔끔한 상태 UI 만들고 싶은 개발자 “와 이거 뭐야?” 소리 듣고 싶은 개발 감성충(?) Quick Start 아래 실제 코드부분을 복사한후 다음과 같이 명령 아래 코드를 이용해서 statusline 설정해줘. [아래 코드 복사] 한 줄 요약 Claude Code의 JSON 상태를 파싱해서 👉 디렉토리 / 모델 / 버전 / 사용량 / 비용을 👉 이모지 + 컬러 + 프로그레스바로 예쁘게 보여주는 statusline 스크립트입니다. 이 스크립트가 하는 일 이 statusline은 단순 출력이 아니라 꽤 똑똑합니다: JSON → 환경변수 자동 파싱 Node.js로 stdin JSON을 읽어서 필요한 값만 export 처리 👉 모델, 사용량, 비용, 리셋 시간까지 전부 자동 추출 디렉토리 표시 최적화 홈 디렉토리는 ~로 치환 긴 경로도 깔끔하게 표시 감성 터지는 프로그레스 바 사용량 퍼센트 기반 컬러 변경 🟢 0~49% → 여유 🟡 50~79% → 주의 🔴 80% 이상 → 위험 이모지까지 자동 변경 (✨ ⚡ 🔥) 리셋 시간 계산 남은 시간 자동 계산 5h, 7d 각각 따로 표시 비용 + 시간당 비용 계산 총 사용 비용 시간당 비용($/h)까지 계산 👉 “이거 너무 비싼데?” 바로 감지 가능 실제 코드 아래는 실제로 사용하는 스크립트입니다 #!/bin/bash # Claude Code 3-line statusline with emojis input=$(cat) # JSON parsing via node eval "$(echo "$input" | node -e " const d = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); const e = (k,v) => console.log('export ' + k + '=' + JSON.stringify(String(v ?? ''))); e('MODEL', d.model?.display_name ?? '—'); e('CWD', d.workspace?.current_dir ?? '—'); e('VERSION', d.version ?? '—'); e('CTX_PCT', d.context_window?.used_percentage ?? ''); e('RATE_5H', d.rate_limits?.five_hour?.used_percentage ?? ''); e('RATE_7D', d.rate_limits?.seven_day?.used_percentage ?? ''); e('COST_USD', d.cost?.total_cost_usd ?? 0); e('DURATION_MS', d.cost?.total_duration_ms ?? 0); // Calculate reset remaining const now = Date.now() / 1000; const fmt = (s) => { if (!s || s 0) return d + 'd ' + h + 'h'; if (h > 0) return h + 'h ' + String(m).padStart(2,'0') + 'm'; return m + 'm'; }; const r5 = d.rate_limits?.five_hour?.resets_at; const r7 = d.rate_limits?.seven_day?.resets_at; e('RESET_5H', r5 ? fmt(r5 - now) : ''); e('RESET_7D', r7 ? fmt(r7 - now) : ''); " 2>/dev/null)" # ── Directory with ~ substitution ── DISPLAY_DIR="$CWD" if [ "$CWD" = "$HOME" ]; then DISPLAY_DIR="~" elif [[ "$CWD" == "$HOME/"* ]]; then DISPLAY_DIR="~${CWD#$HOME}" fi # ── ANSI colors ── RST="\033[0m" BOLD="\033[1m" DIM="\033[2m" BLUE="\033[38;5;75m" GREEN="\033[38;5;114m" YELLOW="\033[38;5;222m" MAGENTA="\033[38;5;177m" CYAN="\033[38;5;116m" RED="\033[38;5;204m" GREY="\033[38;5;240m" WHITE="\033[38;5;252m" ORANGE="\033[38;5;215m" PINK="\033[38;5;211m" # ── Progress bar (rounded style) ── progress_bar() { local pct=${1:-0} local width=${2:-12} local pct_int=$(printf "%.0f" "$pct" 2>/dev/null || echo 0) local color="$GREEN" local glow="✨" if [ "$pct_int" -ge 80 ] 2>/dev/null; then color="$RED"; glow="🔥" elif [ "$pct_int" -ge 50 ] 2>/dev/null; then color="$YELLOW"; glow="⚡" fi # Round properly: add 50 before dividing to avoid always rounding down local filled=$(( (pct_int * width + 50) / 100 )) [ "$filled" -gt "$width" ] && filled=$width [ "$pct_int" -gt 0 ] && [ "$filled" -eq 0 ] && filled=1 local empty=$(( width - filled )) local bar_f="" bar_e="" for ((i=0; i

2026년 3월 23일
AI
5

2026년 3월 23일

2026년 3월 16일
인기 도구
전체보기 →트레이딩
2026년 3월 9일
트레이딩-MetaTrader
2026년 3월 4일
트레이딩-매매법
2026년 3월 4일
트레이딩-매매법
프로그래밍・서버
2026년 3월 13일
프로그래밍-Python
2026년 3월 9일
프로그래밍-기타
2026년 3월 9일
프로그래밍-기타
2026년 3월 6일
프로그래밍-NodeJS














