Skip to content

Add ws-dev status command - #39

Merged
hiyamamo merged 1 commit into
mainfrom
add-status-command
Jul 19, 2026
Merged

hiyamamo merged 1 commit into
mainfrom
add-status-command

Conversation

@hiyamamo

Copy link
Copy Markdown
Owner

Summary

  • Add a ws-dev status subcommand that reports whether a ws-dev server is running (pid) and for which worktree, reading server.pid / current-worktree under <git-common-dir>/ws-dev/ with liveness checked via signal 0.
  • Works without a config entry (it only depends on git state), so it answers "is it up?" even in unregistered repos — particularly useful after ws-dev server -b.
  • Extract the pid-file read + liveness check from stopPrior into readServerPid so status and server stop share one implementation, and add a unit test for it.
  • Update skills/ws-dev-cli/SKILL.md, README.md, and CLAUDE.md to document the new command.

Closes #30

Output

$ ws-dev status            # server running
ws-dev server running (pid 12345)
Worktree: feature-x

$ ws-dev status            # no server
No ws-dev server running
Last worktree: feature-x

Test plan

  • make check (fmt / vet / lint / go test ./...) passes
  • TestReadServerPid covers missing file, malformed pid file (removed as stale), and a live pid
  • Smoke-tested ws-dev status with no server running

🤖 Generated with Claude Code

Add a `status` subcommand that reports whether a ws-dev server is
running (pid, liveness via signal 0) and for which worktree, based on
the state files under <git-common-dir>/ws-dev/. It needs no config
entry, so it works in unregistered repos, and answers "is it up?"
after `ws-dev server -b`.

The pid-file read + liveness check is extracted from stopPrior into
readServerPid so both paths share one implementation.

Closes #30

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hiyamamo
hiyamamo merged commit 6241088 into main Jul 19, 2026
3 checks passed
@hiyamamo
hiyamamo deleted the add-status-command branch July 19, 2026 09:47
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.

ws-dev status コマンドの追加

1 participant