Files
yvgude--lean-ctx/cookbook/examples/autoupdate
wehub-resource-sync 26382a7ac6
CI / Clippy (push) Failing after 15m13s
CI / Test (ubuntu-latest) (push) Failing after 16m1s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (no embeddings / no ORT) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Cookbook (Node) (push) Has been cancelled
CI / Pi Extension (Node) (push) Has been cancelled
CI / Rust SDK (lean-ctx-client) (push) Has been cancelled
CI / Embed SDK (lean-ctx-sdk) (push) Has been cancelled
CI / Python SDK (leanctx) (push) Has been cancelled
CI / Hermes Plugin (Python) (push) Has been cancelled
CI / SDK Conformance Matrix (push) Has been cancelled
CI / Coverage (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
CI / Adversarial Safety (push) Has been cancelled
CI / Benchmarks (push) Has been cancelled
CI / Output-Quality Gate (eval A/B) (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / CI Green (push) Has been cancelled
JetBrains Plugin / Actionlint (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (rust) (push) Has been cancelled
JetBrains Plugin / Validation (push) Has been cancelled
JetBrains Plugin / Build (push) Has been cancelled
JetBrains Plugin / Test (push) Has been cancelled
Security Check / Security Scan (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:30 +08:00
..

autoupdate

Background auto-updater for lean-ctx. Checks GitHub for a new release every 6 hours and runs lean-ctx update only when one is found — avoiding unnecessary daemon restarts.

Platform Script Scheduler
macOS autoupdate.sh LaunchAgent (every 6 h)
Linux autoupdate.sh cron 0 */6 * * *
Windows autoupdate.ps1 Task Scheduler (every 6 h)

macOS install

cp autoupdate.sh ~/.lean-ctx/autoupdate.sh
chmod +x ~/.lean-ctx/autoupdate.sh

# generate plist with your actual paths and register it
SCRIPT="$HOME/.lean-ctx/autoupdate.sh"
PLIST="$HOME/Library/LaunchAgents/com.leactx.autoupdate.plist"
cat > "$PLIST" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
  <key>Label</key><string>com.leactx.autoupdate</string>
  <key>ProgramArguments</key>
  <array><string>/bin/bash</string><string>$SCRIPT</string></array>
  <key>StartInterval</key><integer>21600</integer>
  <key>RunAtLoad</key><false/>
  <key>EnvironmentVariables</key>
  <dict>
    <key>PATH</key><string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
    <key>HOME</key><string>$HOME</string>
  </dict>
  <key>StandardOutPath</key><string>$HOME/.lean-ctx/autoupdate-stdout.log</string>
  <key>StandardErrorPath</key><string>$HOME/.lean-ctx/autoupdate-stderr.log</string>
</dict></plist>
EOF
launchctl load "$PLIST"

Linux install

cp autoupdate.sh ~/.lean-ctx/autoupdate.sh
chmod +x ~/.lean-ctx/autoupdate.sh
(crontab -l 2>/dev/null; echo "0 */6 * * * bash $HOME/.lean-ctx/autoupdate.sh") | crontab -

Windows install

Copy autoupdate.ps1 to $env:USERPROFILE\.lean-ctx\autoupdate.ps1, then run the install block at the top of the file in an elevated PowerShell session.

Logs

~/.lean-ctx/autoupdate.log (auto-rotated at 500 lines)