Skip to content

feat(tsm): add tsm daemon stop subcommand#8

Merged
tashian merged 2 commits into
mainfrom
feat/daemon-stop
May 5, 2026
Merged

feat(tsm): add tsm daemon stop subcommand#8
tashian merged 2 commits into
mainfrom
feat/daemon-stop

Conversation

@tashian

@tashian tashian commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds tsm daemon stop to gracefully stop the running tsmd via the existing daemon.shutdown JSON-RPC method.
  • Idempotent: short-circuits when the socket is dead so we don't spawn a daemon just to kill it.
  • Pins the daemon-side behavior with a regression test.

Closes #3

Test plan

  • cd tsmd && swift test --filter SocketServerTests passes
  • go test ./... passes
  • Manual: tsm status (spawns daemon) → tsm daemon stop → "tsmd stopped." → pgrep tsmd empty → tsm daemon stop → "tsmd not running."

tashian added 2 commits May 4, 2026 19:08
Adds a `daemon` parent command with a `stop` subcommand that calls the
existing `daemon.shutdown` JSON-RPC method. Idempotent: short-circuits
when the socket is dead so we don't spawn a daemon just to kill it.

Removes the matching "no `tsm daemon stop` command" gotcha from CLAUDE.md.
@tashian tashian merged commit 757c229 into main May 5, 2026
1 check 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.

subcommand to stop daemon

1 participant