Skip to content

fix(daemon): print usage on bare ccstatusline daemon - #52

Merged
axisrow merged 1 commit into
mainfrom
ao/ccstatusline-27/daemon-bare-usage
Oct 1, 2026
Merged

axisrow merged 1 commit into
mainfrom
ao/ccstatusline-27/daemon-bare-usage

Conversation

@axisrow

@axisrow axisrow commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Fixes #51

Problem

ccstatusline daemon with no subcommand started the daemon as a foreground server instead of printing usage, unlike every other invalid/missing verb.

Change

  • Bare daemon now prints usage: ccstatusline daemon [start|stop|status|restart|install|uninstall] to stderr and exits 1, exactly like the unknown-verb branch.
  • The detached foreground server host spawned by daemon start now uses a daemon serve subcommand (spawnDetachedDaemon args), so background behavior is unchanged.
  • Doc comments in lifecycle.ts / ccstatusline.ts updated to reflect daemon serve.

Test

  • New src/daemon/__tests__/daemon-cli.test.ts: pins argv to a bare daemon, mocks console.error / process.exit, and asserts the exact usage line plus a non-zero exit — in-process, so no server can start.

Verification

  • bun test: 2733 pass, 0 fail.
  • bun run lint: clean.

🤖 Generated with Claude Code

…rting a server

Bare `daemon` now prints the usage line and exits 1, matching the
unknown-verb branch (issue #51). The detached foreground server host
spawned by `daemon start` moves to the new `daemon serve` subcommand.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@axisrow
axisrow merged commit 774d8c2 into main Oct 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(daemon): bare ccstatusline daemon starts a foreground server instead of printing usage

1 participant