
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
claude-code-statusline-pro
Advanced tools
Claude Code Statusline Pro - Enhanced statusline with Rust engine (supports short command: ccsp)
Claude Code Statusline Pro - 为Claude Code量身定制的智能状态栏系统。
PMBTUS, MT, BT)git2 仓库分析:直接获取分支、状态、stash 等信息,避免频繁 Shell 调用,在大型仓库中依然流畅.jsonl,并通过原子写入持久化快照,避免大型日志反复全量扫描在开始使用之前,请确保您的系统满足以下要求:
# 检查Claude Code版本
claude --version
# 检查Node.js版本
node --version
# 检查npm版本
npm --version
只需要在Claude Code的配置文件中添加一行配置,无需预先安装:
在项目根目录或 $USER 目录创建 .claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "npx ccsp@latest"
}
}
💡 兼容说明:旧命令
npx ccsp@latest仍会继续工作并自动调用新包,但将显示迁移提示。建议尽快将现有配置更新为npx ccsp@latest以保持一致。
保存文件后,重新打开Claude Code即可看到专业版状态栏!
打开Claude Code,你应该看到类似这样的状态栏:
📁 my-project | 🤖 S4 | 🌿 main | 📊 [████████████░░░] 80.1%(160k/200k) | $21.07 | ✅ Ready
通过简单的字母组合快速定制状态栏显示内容:
注:这些命令全部是写在settings.json中的,并不是在终端直接执行使用(直接执行会打印出预览结果)
# 显示所有组件(推荐)
npx ccsp@latest --preset PMBTUS --theme powerline
# 只显示模型、Token和使用量
npx ccsp@latest --preset MTU --theme classic
# 只显示分支和Token信息
npx ccsp@latest --preset BT --theme capsule
多行系统可以把状态栏扩展为网格布局,嵌入多个可独立刷新的小组件。
row(从1开始)和 col(从0开始)控制每个小组件的位置,支持跨行/列排布。static(静态文本)与 api(HTTP 请求)两种类型,API 小组件支持模板渲染、环境变量替换。detection 段读取环境变量,可配置 equals / contains / pattern 触发条件,也可以配合 force 手动开启或关闭。filter 支持 JSONPath + equals / contains / pattern 匹配,只在命中关键字时刷新;可用于最近请求等场景。configs/components/usage.template.toml 与 rust/configs/components/usage.template.toml,复制到 ~/.claude/statusline-pro/components/usage.toml 后按需改写。在 config.toml 中开启多行模式并指定要加载的组件文件:
[multiline]
enabled = true
执行 npx ccsp@latest config init -w 可以一次性生成主配置并复制所有小组件模板。
Classic主题支持三种图标模式,默认会根据终端能力自动选择:

需要安装Nerd Font字体,并在对应的终端中选择使用字体,推荐使用 Hack Nerd Font

适合支持Emoji但没有Nerd Font的终端

最大兼容性,适合所有终端环境

箭头无缝连接设计,需要Nerd Font支持,提供最佳视觉体验。

胶囊形状包装,现代化UI设计,适合追求简洁美观的用户。
如果你的终端本就支持某种图标(例如Nerd Font),但没有自动启用,则可强制指定启用该图标能力
# 强制启用Nerd Font图标(需要安装字体,否则会显示乱码)
npx ccsp@latest --force-nerd-font
# 强制启用Emoji图标(需要终端确实支持Emoji,如MacOS,否则会显示乱码)
npx ccsp@latest --force-emoji
# 强制启用纯文本模式
npx ccsp@latest --force-text
状态栏的token计算与Claude官方API保持完全一致,确保显示数据的准确性:

如图所示:
183.3k/200k (91.7%)183559 + 21333 > 200000183559 ≈ 183.3k ✅ 完全一致contextUsedTokens = usage.input_tokens +
usage.cache_creation_input_tokens +
usage.cache_read_input_tokens +
usage.output_tokens;
这确保了状态栏显示的token使用量与Claude官方统计完全一致。
状态栏提供两种成本计算模式,可在 config.toml 中配置:
/clear 命令或关闭应用为止/clear 命令或重启 Claude Code在 config.toml 中设置:
[components.usage]
mode = "conversation" # 或 "session"
cost = (inputTokens * inputPrice + outputTokens * outputPrice +
cacheTokens * cachePrice) / 200_000
注意: 状态栏的成本计算与 /cost 命令采用不同逻辑和时间范围,确保各自场景的准确性。
状态栏采用两级配置系统,支持灵活的配置管理:
项目级配置 (优先级: 高)
~/.claude/projects/{project-hash}/statusline-pro/config.tomlnpx ccsp@latest config initnpx ccsp@latest config init -w用户级配置 (优先级: 低)
~/.claude/statusline-pro/config.tomlnpx ccsp@latest config init -gnpx ccsp@latest config init -w -g运行初始化命令时,系统会自动检测您的终端能力:
# 初始化项目级配置(推荐)
npx ccsp@latest config init
# 初始化项目级配置并复制组件模板
npx ccsp@latest config init -w
# 初始化全局配置
npx ccsp@latest config init -g
# 强制重新初始化(覆盖现有配置)
npx ccsp@latest config init --force
提示:
-w等同于--with-components,会把组件多行模板一并复制到配置目录,方便直接在本地调整。
智能检测功能:
系统初始化后会生成完整的 config.toml 配置文件:
# 默认预设和主题
preset = "PMBTUS"
theme = "powerline"
# 主题特性配置
[themes.powerline]
enable_gradient = true
ignore_separator = true
fine_progress = true
# 组件顺序配置
[components]
order = ["project", "model", "branch", "tokens", "usage", "status"]
# Token组件详细配置
[components.tokens]
show_gradient = true # 启用彩色渐变进度条
show_progress_bar = true # 显示进度条
show_percentage = true # 显示百分比
progress_width = 15 # 进度条宽度
# Token阈值配置
[components.tokens.thresholds]
warning = 60 # 60%显示黄色警告
danger = 85 # 85%显示红色危险
backup = 85 # 后备区域开始
critical = 95 # 95%显示🔥临界
# 终端兼容配置
[terminal]
force_nerd_font = false # 强制启用Nerd Font
force_emoji = false # 强制启用Emoji
force_text = false # 强制文本模式
智能检测并自动适配不同终端环境:
# 错误示例:status line command failed: npx ccsp@latest
# 解决方案:升级Claude Code到最新版本
npm install -g @anthropic-ai/claude-code@latest
# 错误示例:/bin/sh: npx: command not found
# 解决方案:安装或更新Node.js环境
# 访问官网下载最新版本:https://nodejs.org/
# 或使用包管理器安装:
# macOS (使用Homebrew)
brew install node
# Ubuntu/Debian
sudo apt update && sudo apt install nodejs npm
# Windows
# 请访问 https://nodejs.org/ 下载安装包
# 检查Claude Code版本
claude --version
# 如果版本低于1.0.71,请更新
npm install -g @anthropic-ai/claude-code@latest
# 更新后重启终端并重新打开Claude Code
libssl.so.3 找不到自 v3.0.2 起,Linux x64/ARM64 平台包改为 musl 静态链接构建,不再依赖系统自带的 OpenSSL;请执行以下步骤:
npx ccsp@latest --versionnpm cache clean --force
npx ccsp@latest --version
libssl3 或升级系统,但建议尽快迁移到 3.0.2+。# 检查终端是否支持Nerd Font,强制使用Emoji模式
npx ccsp@latest --force-emoji
# 检查终端颜色支持,可以禁用颜色
npx ccsp@latest --no-color
# 检查Claude Code配置文件是否正确
cat ~/.claude/settings.json
# 测试基本功能
echo '{"model":{"id":"claude-sonnet-4"}}' | npx ccsp@latest
# 测试特定预设和主题
echo '{"model":{"id":"claude-sonnet-4"}}' | npx ccsp@latest --preset MT --theme classic
Claude Code Professional Status Bar - Smart status bar system specifically designed for Claude Code.
PMBTUS, MT, BT)git2 repository analysis: reads branch status, stash counts, and operations without spawning shells, keeping large repos responsive.jsonl logs no longer stall refreshesBefore getting started, please ensure your system meets the following requirements:
# Check Claude Code version
claude --version
# Check Node.js version
node --version
# Check npm version
npm --version
Simply add one line to your Claude Code configuration file, no pre-installation required:
Create .claude/settings.json in your project root or home directory:
{
"statusLine": {
"type": "command",
"command": "npx ccsp@latest"
}
}
💡 Compatibility Note: The legacy command
npx ccsp@lateststill works and forwards to the new package, but will emit a migration warning. Updating existing configs tonpx ccsp@latestkeeps future upgrades smooth.
Save the file and restart Claude Code to see the professional status bar!
Open Claude Code and you should see a status bar like this:
📁 my-project | 🤖 S4 | 🌿 main | 📊 [████████████░░░] 80.1%(160k/200k) | $21.07 | ✅ Ready
Quickly customize status bar content through simple letter combinations:
Note: These commands are all written in settings.json, not executed directly in the terminal (direct execution will print preview results)
# Show all components (recommended)
npx ccsp@latest --preset PMBTUS --theme powerline
# Show only model, tokens, and usage
npx ccsp@latest --preset MTU --theme classic
# Show only branch and token information
npx ccsp@latest --preset BT --theme capsule
The multiline engine turns the status bar into a grid of independently refreshing widgets.
row (1-based) and col (0-based) to place each widget and build multi-row layouts.static (text) and api (HTTP request) widgets with template rendering and environment variable substitution.detection blocks read environment variables and support equals / contains / pattern, with optional force overrides.filter combines JSONPath with equals / contains / pattern so widgets refresh only when keywords match—perfect for last-request panels.configs/components/usage.template.toml or rust/configs/components/usage.template.toml to ~/.claude/statusline-pro/components/usage.toml and customize.Enable multiline mode in config.toml and point to your widget file:
[multiline]
enabled = true
Run npx ccsp@latest config init -w to generate the main config and copy all widget templates in one step.
Classic theme supports three icon modes, automatically selected based on terminal capabilities by default:

Requires Nerd Font installation and selecting the font in the corresponding terminal, recommend Hack Nerd Font

Suitable for terminals that support Emoji but don't have Nerd Font

Maximum compatibility, suitable for all terminal environments

Seamless arrow connection design, requires Nerd Font support, provides the best visual experience.

Capsule-shaped wrapper, modern UI design, suitable for users pursuing simplicity and beauty.
If your terminal already supports certain icons (e.g., Nerd Font) but doesn't auto-enable, you can force enable that icon capability
# Force enable Nerd Font icons (requires font installation, otherwise will show garbled text)
npx ccsp@latest --force-nerd-font
# Force enable Emoji icons (terminal must actually support Emoji like macOS, otherwise will show garbled text)
npx ccsp@latest --force-emoji
# Force enable plain text mode
npx ccsp@latest --force-text
The status bar's token calculation remains fully consistent with Claude's official API, ensuring accurate data display:

As shown in the image:
183.3k/200k (91.7%)183559 + 21333 > 200000183559 ≈ 183.3k ✅ Completely consistentcontextUsedTokens = usage.input_tokens +
usage.cache_creation_input_tokens +
usage.cache_read_input_tokens +
usage.output_tokens;
This ensures that the token usage displayed in the status bar is completely consistent with Claude's official statistics.
The status bar provides two cost calculation modes, configurable in config.toml:
/clear command or closing the application/clear command or restart Claude CodeSet in config.toml:
[components.usage]
mode = "conversation" # or "session"
cost = (inputTokens * inputPrice + outputTokens * outputPrice +
cacheTokens * cachePrice) / 200_000
Note: The status bar's cost calculation uses different logic and time ranges from the /cost command, ensuring accuracy for their respective scenarios.
The status bar uses a two-level configuration system for flexible configuration management:
Project-level Configuration (Priority: High)
~/.claude/projects/{project-hash}/statusline-pro/config.tomlnpx ccsp@latest config initnpx ccsp@latest config init -wUser-level Configuration (Priority: Low)
~/.claude/statusline-pro/config.tomlnpx ccsp@latest config init -gnpx ccsp@latest config init -w -gWhen running initialization commands, the system automatically detects your terminal capabilities:
# Initialize project-level configuration (recommended)
npx ccsp@latest config init
# Initialize project-level configuration and copy component templates
npx ccsp@latest config init -w
# Initialize global configuration
npx ccsp@latest config init -g
# Force re-initialization (overwrite existing configuration)
npx ccsp@latest config init --force
Tip:
-wis the short form of--with-components; it copies the bundled multiline widget templates into your config folder so you can customize them locally.
Smart Detection Features:
After system initialization, a complete config.toml configuration file will be generated:
# Default preset and theme
preset = "PMBTUS"
theme = "powerline"
# Theme feature configuration
[themes.powerline]
enable_gradient = true
ignore_separator = true
fine_progress = true
# Component order configuration
[components]
order = ["project", "model", "branch", "tokens", "usage", "status"]
# Token component detailed configuration
[components.tokens]
show_gradient = true # Enable colored gradient progress bar
show_progress_bar = true # Show progress bar
show_percentage = true # Show percentage
progress_width = 15 # Progress bar width
# Token threshold configuration
[components.tokens.thresholds]
warning = 60 # 60% shows yellow warning
danger = 85 # 85% shows red danger
backup = 85 # Backup area starts
critical = 95 # 95% shows 🔥 critical
# Terminal compatibility configuration
[terminal]
force_nerd_font = false # Force enable Nerd Font
force_emoji = false # Force enable Emoji
force_text = false # Force text mode
Smart detection and automatic adaptation for different terminal environments:
# Error example: status line command failed: npx ccsp@latest
# Solution: Upgrade Claude Code to the latest version
npm install -g @anthropic-ai/claude-code@latest
# Error example: /bin/sh: npx: command not found
# Solution: Install or update Node.js environment
# Visit official website for latest version: https://nodejs.org/
# Or use package managers:
# macOS (using Homebrew)
brew install node
# Ubuntu/Debian
sudo apt update && sudo apt install nodejs npm
# Windows
# Please visit https://nodejs.org/ to download installer
# Check Claude Code version
claude --version
# If version is below 1.0.71, please update
npm install -g @anthropic-ai/claude-code@latest
# Restart terminal and reopen Claude Code after update
# Check if terminal supports Nerd Font, force use Emoji mode
npx ccsp@latest --force-emoji
# Check terminal color support, can disable colors
npx ccsp@latest --no-color
# Check if Claude Code configuration file is correct
cat ~/.claude/settings.json
# Test basic functionality
echo '{"model":{"id":"claude-sonnet-4"}}' | npx ccsp@latest
# Test specific preset and theme
echo '{"model":{"id":"claude-sonnet-4"}}' | npx ccsp@latest --preset MT --theme classic
FAQs
Claude Code Statusline Pro - Enhanced statusline with Rust engine (supports short command: ccsp)
The npm package claude-code-statusline-pro receives a total of 57 weekly downloads. As such, claude-code-statusline-pro popularity was classified as not popular.
We found that claude-code-statusline-pro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.