feat: add selfclaude update CLI command#3
Merged
KilimcininKorOglu merged 1 commit intoMay 9, 2026
Merged
Conversation
One-step pull + reinstall + daemon restart instead of the manual `cd ~/.selfclaude/app && git pull && pnpm install` dance. Exports readPid/isAlive from daemon.ts so the update action can detect a running daemon and restart it automatically (skip with --no-restart).
badursun
added a commit
that referenced
this pull request
May 9, 2026
The update command runs `git reset --hard origin/main` against the install dir, which silently wipes any uncommitted operator edits — hand-tuned system prompts, mid-debug tweaks, anything not yet pushed. Add a `git status --porcelain` check before the reset and abort with a clear message + the dirty-file list + the install-dir path. The operator can either commit/stash and retry, or pass the new --force flag to opt into the destructive path. Per CLAUDE.md global rule: never run destructive git commands without explicit operator intent. The flag makes intent explicit. Builds on PR #3 by @KilimcininKorOglu (`selfclaude update` command). Co-Authored-By: kilimcinin kör oğlu <229108989+KilimcininKorOglu@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
selfclaude updatecommand — one-step pull + reinstall + daemon restartcd ~/.selfclaude/app && git pull && pnpm installworkflowreadPid/isAlivefromdaemon.tsfor programmatic daemon detectioninstall.shoutput andREADME.mdCLI table to reference the new commandUsage
Test plan
pnpm --filter @selfclaude/cli typecheck— zero errors in modified filesselfclaude updateon an installed instance — should report "Already up to date" or pull + reinstall--no-restartskips daemon restart