setup

setup is a command for coding agents from holyshite/claude-hud-for-api. It costs 16 tokens per session (771 once invoked), scanned B, original, MIT.

An automatic setup command for Claude HUD, a Claude Code status bar showing token usage and model information. It finds the required Node.js program and plugin files, then updates Claude Code's settings.

In plain words
What is it for?
Use it to install or repair the HUD status bar configuration, especially after installing the plugin or cloning it manually.
Why use it?
It removes the need to locate installation files and edit the settings file manually. It also checks whether the plugin entry file exists and may build it if needed.

Command

Part of the claude-hud plugin — 2 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/holyshite/claude-hud-for-api/setup
Clone the repo
git clone --depth 1 https://github.com/holyshite/claude-hud-for-api

Or install claude-hud, the plugin that ships this one along with the rest of its 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/holyshite/claude-hud-for-api/setup.svg)](https://agentmods.dev/commands/holyshite/claude-hud-for-api/setup)
Your own site
<a href="https://agentmods.dev/commands/holyshite/claude-hud-for-api/setup"><img src="https://agentmods.dev/badge/commands/holyshite/claude-hud-for-api/setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 771 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.00771
Opus 5 $0.00008 $0.00385
Sonnet 5 $0.00003 $0.00154
Haiku 4.5 $0.00002 $0.00077

Measured 4d ago against content hash 15ffd7600e36, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

setup scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Read `~/.claude/settings.json` first (use the Read tool). Then update it to add the `statusLine` config.
commands/setup.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude HUD Setup

自动配置 Claude Code 状态栏,显示实时 token 使用量和模型信息。

你的任务

按照以下步骤自动完成配置,无需让用户手动操作。

Step 1: 检测 node 路径

Run which node to find the node binary path. If it returns empty, also try:

  • Check common paths: ~/.nvm/versions/node/*/bin/node
  • Check if there's a node in PATH via command -v node

Save the node path for later use.

Step 2: 找到插件目录

插件通过 Claude Code plugin 系统安装时,文件在 ~/.claude/plugins/<plugin-name>/ 下。但 Claude 不会自动告诉你这个路径。

Run these to find the plugin directory:

# Check common plugin locations
ls -d ~/.claude/plugins/claude-hud 2>/dev/null || \
ls -d ~/.claude/plugins/claude-token-hud 2>/dev/null || \
ls -d ~/.claude/plugins/claude-hud-for-api 2>/dev/null || echo "NOT_FOUND"

If NOT_FOUND, the user may have cloned the repo manually. Ask them for the full path, or check the current working directory.

Step 3: 验证插件入口

# Verify the entry point exists
ls -la <plugin_dir>/dist/index.js

If it doesn't exist, you may need to build:

cd <plugin_dir> && npm run build

Step 4: 配置 settings.json

Read ~/.claude/settings.json first (use the Read tool). Then update it to add the statusLine config.

The statusLine config format:

{
  "statusLine": {
    "type": "command",
    "command": "<node_path> <plugin_dir>/dist/index.js",
    "padding": 1
  }
}

Important rules:

  • command 字段直接是命令字符串,不要bash -c 包裹
  • 用空格分隔 node_path 和插件路径
  • 如果 settings.json 已有其他配置,只更新 statusLine 字段,保留其他字段
  • 使用 Edit 工具精确替换,不要重写整个文件

Step 5: 验证安装

Run this to test the plugin works:

echo '{"model":{"display_name":"Claude Test"},"context_window":{"context_window_size":200000,"current_usage":{"input_tokens":45000}}}' | node <plugin_dir>/dist/index.js

Expected output: something like Claude Test | ██░░░░░░░░ 23% 45k/200k

Step 6: 告知用户

告诉用户配置完成,状态栏会在 Claude Code 重启后显示。如果用户想立即看到效果,建议运行 /reload-plugins

可用的 slash 命令

  • /claude-hud:setup - 自动配置状态栏(当前命令)
  • /claude-hud:configure - 查看并编辑 HUD 显示选项、颜色和格式配置

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 93 lines · 16 tokens per session scan B 15ffd7600e36

Subscribe to this mod's changes

setup is a command published in the GitHub repository holyshite/claude-hud-for-api (2 stars, last pushed 4mo ago), licensed MIT. It adds 16 tokens to every session and 771 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.