-
After reviewing many statusline projects, most focus on UI aesthetics rather than practical functionality.
-
Anthropic Claude Code is arguably the best in its class, but it doesn't support mainland China, leading to projects like CCR and especially Claude Relay Service.
-
This brings various issues, particularly network-related ones. The network path "User -> Anthropic" is complex, and it's often unclear what problems occur.
-
Therefore, this project was developed to understand the health status of CRS and communication latency to Anthropic API along the path
User -> ··· -> CRS -> ··· -> Anthropic. -
Known error scenarios:
- A high-performance Claude Code statusline tool written in Rust, integrating network probing, Git information, and real-time usage tracking.
- No background monitoring processes, driven solely by statusline
stdininformation, featuringtime window-basednetwork probingfunctionality. - Aggregates JSONL logs from work projects, consolidating
errorinformation to clearly understand Claude Code error conditions. - For more important information about
stdin, time windows, JSONL, please refer to: Q & A
- The design relies on background processes for timed probing, so if Claude Code is open but idle, network data won't refresh during the designed window periods.
- Network conditions are dynamic (🟢/🟡/🔴), using P95 statistics calculated from aggregated 12 Total (end-to-end) data samples. For more details, check
ccstatus-monitoring.json. - When degraded/error occurs, detailed timing data is displayed (DNS|TCP|TLS|TTFB). TTFB is particularly important - it's the time from
sending model service request <--> Anthropic returnsthe first byte. - This tool can only provide information about which stage has issues; you need to investigate which component has the highest latency yourself.
- OAuth Masquerade Mode: Complete OAuth environment support with OAuth masquerade probing system
- First-party Request Masquerade: OAuth tokens sent as Authorization headers to
https://api.anthropic.com, masquerading as direct client requests - Green Status Indicator: Displays green emoji (🟢) with timing metrics, omits proxy health prefix
- Token Expiry Validation: Automatic token expiration checking to prevent invalid requests
- Detailed Timing Breakdown: Supports DNS|TCP|TLS|TTFB detailed timings (requires
timings-curlfeature) - Secure Debug Logging: Logs token length rather than full token to protect sensitive information
- Cross-platform Support: Via
CLAUDE_CODE_OAUTH_TOKENenvironment variable and macOS Keychain - Smart Rendering: Format
🟢 P95:...ms DNS:...|TCP:...|TLS:...|Total:... HTTP/x
- First-party Request Masquerade: OAuth tokens sent as Authorization headers to
- ✅
OAuth subscription user display issues resolved(v2.2.6 fixed) - Other known issues: None
Model | Working Directory | Git Branch Status | Context Window | Network Status
- High performance with Rust native speed
- Git integration with branch, status, and tracking info
- Model display with simplified Claude model names
- Usage tracking based on transcript analysis
- Network Probing: Driven by Claude code statusline stdin to initial endpoint status awareness ⚡
- Trying to resolve JS Challenge/Bot Fight detection and countermeasures (LOW EXPECTATION) 🛡️
- Directory display showing current workspace
- Minimal design using Nerd Font icons
- Simple configuration via command line options
- Modular features with configurable build options
- The easiest way to install CCstatus is via npm:
npm install -g @mauruppi/ccstatus- Use mirror registry acceleration
npm install -g @mauruppi/ccstatus --registry https://registry.npmmirror.comFeatures:
- ✅ One-command installation across all platforms
- ✅ Automatic platform detection (macOS Intel/ARM64, Linux x64, Windows x64)
- ✅ Auto-setup for Claude Code (installs to
~/.claude/ccstatus/) - ✅ Auto-writes settings.json:
- macOS/Linux:
"command": "~/.claude/ccstatus/ccstatus" - Windows:
"command": "%USERPROFILE%\\.claude\\ccstatus\\ccstatus.exe"
- macOS/Linux:
- ✅ Static binaries with zero dependencies
- ✅ Easy updates via
npm update -g @mauruppi/ccstatus
After installation, Claude Code is ready. To reconfigure manually:
- Run:
npm --prefix npm/main run configure-claude
Platform Deployment
mkdir -p ~/.claude/ccstatus
wget https://github.com/MaurUppi/CCstatus/releases/latest/download/ccstatus-linux-x64-static.tar.gz
tar -xzf ccstatus-linux-x64-static.tar.gz
cp ccstatus ~/.claude/ccstatus/CCstatus
chmod +x ~/.claude/ccstatus/CCstatusRequires: Ubuntu 22.04+, CentOS 9+, Debian 11+, RHEL 9+ (glibc 2.35+)
mkdir -p ~/.claude/ccstatus
wget https://github.com/MaurUppi/CCstatus/releases/latest/download/ccstatus-linux-x64-static.tar.gz
tar -xzf ccstatus-linux-x64-static.tar.gz
cp ccstatus ~/.claude/ccstatus/CCstatus
chmod +x ~/.claude/ccstatus/CCstatusWorks on any Linux distribution (static, no dependencies)
mkdir -p ~/.claude/ccstatus
wget https://github.com/MaurUppi/CCstatus/releases/latest/download/ccstatus-macos-x64-static.tar.gz
tar -xzf ccstatus-macos-x64-static.tar.gz
cp ccstatus ~/.claude/ccstatus/CCstatus
chmod +x ~/.claude/ccstatus/CCstatusmkdir -p ~/.claude/ccstatus
wget https://github.com/MaurUppi/CCstatus/releases/latest/download/ccstatus-macos-arm64-static.tar.gz
tar -xzf ccstatus-macos-arm64-static.tar.gz
cp ccstatus ~/.claude/ccstatus/CCstatus
chmod +x ~/.claude/ccstatus/CCstatus# Create directory and download
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude\ccstatus"
Invoke-WebRequest -Uri "https://github.com/MaurUppi/CCstatus/releases/latest/download/ccstatus-windows-x64-static.zip" -OutFile "ccstatus-windows-x64-static.zip"
Expand-Archive -Path "ccstatus-windows-x64-static.zip" -DestinationPath "."
Move-Item "ccstatus.exe" "$env:USERPROFILE\.claude\ccstatus\CCstatus.exe"Note: When installed via npm, settings.json is auto-managed and points to ~/.claude/ccstatus/ccstatus (Windows: %USERPROFILE%\\.claude\\ccstatus\\ccstatus.exe). The following examples are for manual setup:
Linux/macOS: ~/.claude/settings.json
{
"statusLine": {
"type": "command",
"command": "~/.claude/ccstatus/CCstatus",
"padding": 0
}
}Windows: C:\ProgramData\ClaudeCode\settings.json
{
"statusLine": {
"type": "command",
"command": "%USERPROFILE%\\.claude\\ccstatus\\CCstatus.exe",
"padding": 0
}
}Shows simplified Claude model names:
claude-3-5-sonnet→Sonnet 3.5claude-4-sonnet→Sonnet 4
- Current project directory name
- Branch name with Nerd Font icon
- Status:
✓Clean,●Dirty,⚠Conflicts - Remote tracking:
↑nAhead,↓nBehind
Token usage percentage based on transcript analysis with context limit tracking.
Real-time Claude API connectivity monitoring:
- 🟢 Healthy: API responding normally (P95 < 4s)
- 🟡 Degraded: Slower responses or rate limits (P95 4-8s)
- 🔴 Error: Connection issues or API failures
- ⚪ Unknown: Monitoring disabled or no credentials
Smart monitoring windows:
- COLD: Immediate check on startup or session changes
- GREEN: Regular health checks every 5 minutes during active use
- RED: Error-triggered checks when transcript shows API errors
Features:
- Automatic credential detection (environment, shell, Claude config)
- Proxy Health Check: Dedicated proxy health status monitoring module
- Intelligent health status assessment: Healthy/Degraded/Bad/Unknown
- Multi-URL probe strategy: primary endpoint + fallback endpoint
- IF detected Official endpoint then skip proxy check to avoid redundancy
- Bot Fight Intelligent Detection: Bot challenge identification and mitigation 🛡️
- Multi-dimensional Detection: HTTP status codes (403/429/503) + Cloudflare header analysis
- Shield Status Display: Shows 🛡️ icon and total response time during bot challenges
- P95 Contamination Protection: Bot challenge responses automatically excluded from performance statistics
- Secure Timing Suppression: POST bot challenges don't display detailed timing breakdown
- HTTP Version Tracking: Records HTTP/1.1 vs HTTP/2.0 protocol usage
- Enhanced JSONL Logging: Improved error information aggregation and analysis
- P95 latency tracking with rolling 12-sample window
- Frequency-gated probing to minimize API usage
- Debug logging with
CCSTATUS_DEBUG=true - Built-in Self-Update System V1 with intelligent update management 🔄
- Manual checks:
--check-updatecommand-line tool for immediate version checking - Background integration: Automatic update detection during normal statusline usage
- Smart notifications: Flashing text alerts on statusline when updates are available
- Geographic routing: Automatic China mainland optimization via hk.gh-proxy.com proxy
- Persistent caching: ETag/Last-Modified HTTP caching reduces unnecessary network requests
- Update state tracking: Cross-session persistence of update check history and throttling
- Manual checks:
- State persistence across sessions
- Startup time: < 50ms
- Memory usage: < 10MB
- Binary size: 3.1 MB static build (network probing included)
- Network overhead: < 1 API call per 5 minutes (frequency-gated)
- Monitoring latency: Smart windowing minimizes impact on Claude API usage
- Claude Code: For statusline integration
See changelog: CHANGELOG.md
Build from Source
- For detailed build configuration options, refer to BUILD.md Build from Source section
- Modify
Cargo.tomlas needed
git clone https://github.com/MaurUppi/CCstatus.git
cd CCstatus
# Default build (foundation + network probing + self-update)
cargo build --release
# Build (foundation + network probing **with timing display**)
cargo build --release --features timings-curl
# Network monitoring only (without self-update)
cargo build --release --features network-monitoring --no-default-featuresBuild Options:
- Default: Core functionality + network probing + self-update (~4.1MB)
- Network monitoring only: Core functionality + network probing (without updates) (~3MB)
- + timings-curl: High-precision timing display (~4.3MB)
- + timings-curl-static: Full static build (~7MB)
Contributions are welcome! Please feel free to submit issues or pull requests.
- This project is based on comprehensive refactoring of Haleclipse's CCometixLine
This project is licensed under the MIT License.

