Skip to content

Executing via bunx/npx leads to higher resource consumption #103

@meeghele

Description

@meeghele

I did notice that the installer configures Claude CLI to execute npx/bunx ccstatusline as the Claude Code CLI statusline, i.e.:

{
 "statusLine": {
 "type": "command",
 "command": "npx/bunx ccstatusline"
 }
}

From the official Claude CLI documentation, this command can be executed at most every 300ms. Apart from the fact that would be better to use a persistent statusline process, running npx/bunx ccstatusline is more resource intensive than simply running ccstatusline directly due to the way npx/bunx work.

So heads up, running the statusline without npx/bunx would save some resources, i.e.:

{
 "statusLine": {
 "type": "command",
 "command": "ccusage statusline"
 }
}

I did run benchmarks calling ccstatusline directly or via npx/bunx and the difference is somewhat significant, see here.

Please note that benchmarking ccstatusline is not my main focus; I plugged ccstatusline in the benchmarks once I noticed a large amount of node processes being spawned on a colleague's laptop using multiple Claude CLI instances with ccusage, issue here.

Being ccstatusline a very popular project, I decided to give you guys the heads up by opening an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions