cf statusline
Configure the Claude Code statusline with project info and API usage.
Usage
cf statusline
Example:
🧠 Opus (1M)
cf v0.3.0 | 📂 MyProject (⎇ main) | 👤 Thi Dinh (me@dinhanhthi.com)
ctx 42% | [5h] 30% → 2:30pm | [7d] 10% → mar 15, 2:30pm
📋 Tasks: 2/5 | 🤖 Agent: cf-reviewer
The first line is intentionally reserved for the model only. Claude Code renders its own built-in indicators (effort level, clipboard hints, MCP errors, token warnings) on the right side of the first row, so keeping that row short prevents your statusline from being cramped on narrow terminals.
Available Components
The statusline can show any combination of these components:
| ID | Description | Example |
|---|---|---|
version | Plugin version | cf v0.3.0 |
folder | Project name | MyProject |
model | Active model | Opus 4.6 |
branch | Git branch | ⎇ main |
account | Account name, email, or custom alias | 👤 Thi (me@dinhanhthi.com) |
context | Context window usage (color-coded green→red) | ctx 42% |
rate_limit | Current (5h) & weekly (7d) usage with reset time | [5h] 30% → 2:30pm | [7d] 10%… |
task_agent | Task progress & active agent | 📋 Tasks: 2/5 | 🤖 Agent: cf-reviewer |
When you run this command, an interactive checklist lets you choose which components to display. All components are enabled by default.
Dependencies
The rate_limit component requires curl and jq to fetch API usage data from Anthropic. If dependencies are missing, the statusline will show a warning instead. The CLI warns you during setup.
The account component reads from ~/.claude.json (requires jq, already needed by other components). Falls back to claude auth status --json if the file is unavailable. Usage data is cached for 60 seconds.
Account Alias
When configuring the statusline (via cf statusline, cf config, or cf init), if you select the account component, you'll be prompted to set an alias for your current account:
? Alias for me@dinhanhthi.com (leave empty to clear): Work
The alias completely replaces the name/email display in the statusline (e.g., 👤 Work instead of 👤 Thi Dinh (me@dinhanhthi.com)). Aliases are stored per email, so if you switch accounts, each account can have its own alias. Accounts without an alias fall back to the default name/email display.
To change or clear an alias, re-run cf statusline or cf config.
Customization
You can either edit ~/.coding-friend/config.json directly, or run cf statusline (interactively) at any time to change which components are shown. The checklist pre-selects your current configuration.
{
"statusline": {
"components": [
"version",
"folder",
"model",
"branch",
"account",
"context",
"rate_limit",
"task_agent"
],
"accountAliases": {
"me@work.com": "Work",
"me@personal.com": "Personal"
}
}
}
Setup via cf init
The statusline step is also available during cf init, which walks you through all Coding Friend configuration in one go.