Skip to content

feat: add selfclaude update CLI command#3

Merged
KilimcininKorOglu merged 1 commit into
badursun:mainfrom
KilimcininKorOglu:feature/cli-update-command
May 9, 2026
Merged

feat: add selfclaude update CLI command#3
KilimcininKorOglu merged 1 commit into
badursun:mainfrom
KilimcininKorOglu:feature/cli-update-command

Conversation

@KilimcininKorOglu

Copy link
Copy Markdown
Collaborator

Summary

  • Adds selfclaude update command — one-step pull + reinstall + daemon restart
  • Replaces the manual cd ~/.selfclaude/app && git pull && pnpm install workflow
  • Exports readPid / isAlive from daemon.ts for programmatic daemon detection
  • Updates install.sh output and README.md CLI table to reference the new command

Usage

selfclaude update              # pull, install, restart daemon if running
selfclaude update --no-restart # pull + install only, skip daemon restart

Test plan

  • pnpm --filter @selfclaude/cli typecheck — zero errors in modified files
  • Run selfclaude update on an installed instance — should report "Already up to date" or pull + reinstall
  • Verify --no-restart skips daemon restart

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).
@KilimcininKorOglu
KilimcininKorOglu merged commit c0b1b5b into badursun:main May 9, 2026
1 check passed
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>
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.

1 participant