🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

safe-update

by @hacksing

Update OpenClaw from source code. Supports custom project path and branch. Includes pulling latest branch, rebasing, building and installing, restarting serv...

Versionv1.0.6
Installs1
πŸ’‘ Examples

# Update with defaults (will analyze and recommend)
./update.sh

Update specific branch

./update.sh --branch feat/my-branch

Force merge mode

./update.sh --mode merge

Force rebase mode

./update.sh --mode rebase

Dry run (preview only)

./update.sh --dry-run

Custom project path

./update.sh --dir /opt/openclaw --branch main

βš™οΈ Configuration

Environment Variables (optional)

# Set custom project path
export OPENCLAW_PROJECT_DIR="/path/to/openclaw"

Set custom branch (default: main)

export OPENCLAW_BRANCH="your-feature-branch"

Enable dry-run mode (no actual changes)

export DRY_RUN="true"

Or Pass as Arguments

./update.sh --dir /path/to/openclaw --branch your-branch

πŸ“‹ Tips & Best Practices

  • Rebase may cause conflicts - if conflicts occur, resolve manually and continue
  • Force push - after rebase, if pushing to fork, use git push --force
  • Service reinstall - will update version in systemd unit file
  • User confirms restart - Gateway will not restart until you confirm
  • Backup first - always backup before updating!
  • View on ClawHub
    TERMINAL
    clawhub install safe-update

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’