Skip to main content

Module setup

Module setup 

Source
Expand description

setup subcommand: copies the running binary to a stable location, installs the slash commands and points Claude Code’s statusLine at the installed binary.

npm runs the binary from its package cache, so statusLine.command must never point at current_exe(); it points at the copy in ~/.claude/statusline/bin/.

Structs§

StatusLinePlan
A pending change to Claude Code’s statusLine setting.

Enums§

BinaryOutcome
SettingsOutcome

Constants§

BINARY_NAME

Functions§

install_binary
Copy source to target, replacing an existing binary without a window where target is missing or half-written.
plan_statusline
Work out the statusLine value for command. Our own entry keeps its extra keys (padding, refreshInterval, …); anything else is replaced with the defaults. Returns None when the settings already point at command.
remove_legacy_files
Remove files left behind by installs ≤ 1.2.x (binary outside bin/, quota cache). Only call once statusLine no longer points at the legacy binary.
run
Entry point for claude-code-status-line setup [--yes]. Returns the exit code.
statusline_command
statusLine.command for the binary installed in ~/.claude/statusline/bin/.
update_claude_settings
Point statusLine in Claude Code’s settings.json at command. confirm sees the plan before anything is written; the previous file is kept as a numbered backup.