* feat(dev): use pinned Bun for local formatting * test(lint): include dev tool resolver in lifecycle fixture * perf(format): allow native formatter parallelism * perf(dev): retain faster formatter defaults and document fork
3.4 KiB
summary, read_when, title
| summary | read_when | title | ||
|---|---|---|---|---|
| Repository scripts: purpose, scope, and safety notes |
|
Scripts |
scripts/ holds helper scripts for local workflows and ops tasks. Use these when a task is clearly tied to a script. Otherwise prefer the CLI.
Conventions
- Scripts are optional unless referenced in docs or release checklists.
- Prefer CLI surfaces when they exist (example:
openclaw models status --check). - Assume scripts are host-specific. Read them before running on a new machine.
Formatting and linting
pnpm format writes formatting, pnpm format:check checks it, and pnpm lint
runs the lint pipeline. The local development tool selector
reference explains the pinned OpenClaw Bun fork, installation cache, supported
platforms, overrides, fallbacks, and CI parity. Use
OPENCLAW_FORMAT_TOOL=oxfmt pnpm format to force oxfmt. The
formatter caller inventory
lists dedicated formatters that retain oxfmt.
Auth monitoring scripts
General model auth is covered in Authentication. The scripts below are a separate, optional system. They monitor a Claude Code CLI subscription token on a remote/headless host. They also let you re-authenticate from a phone:
scripts/setup-auth-system.sh- one-time setup: checks current auth, helps generate a long-livedclaude setup-token, and prints systemd/Termux install steps.scripts/claude-auth-status.sh [full|json|simple]- checks Claude Code + OpenClaw auth status.scripts/auth-monitor.sh- polls status and sends a notification (viaopenclaw message send, and/or ntfy.sh) when the token nears expiry, including its final hour while authentication remains usable. Env:WARN_HOURS(default2),NOTIFY_PHONE,NOTIFY_NTFY. Run on a schedule via the bundledscripts/systemd/openclaw-auth-monitor.{service,timer}(every 30 minutes).scripts/mobile-reauth.sh- re-runsclaude setup-tokenand prints URLs to open on a phone, for use over SSH from Termux.scripts/termux-quick-auth.sh,scripts/termux-auth-widget.sh- Termux:Widget scripts. They SSH to the host and show a status toast. They open the re-auth console/instructions when auth has expired.
To use a Claude CLI login with OpenClaw, follow Claude CLI reuse. The Claude process owns its login credentials.
GitHub read helper
Use scripts/gh-read when you want gh to use a GitHub App installation token for repo-scoped read calls. This leaves normal gh on your personal login for write actions.
Required env:
OPENCLAW_GH_READ_APP_IDOPENCLAW_GH_READ_PRIVATE_KEY_FILE
Optional env:
OPENCLAW_GH_READ_INSTALLATION_IDwhen you want to skip repo-based installation lookupOPENCLAW_GH_READ_PERMISSIONSas a comma-separated override for the read permission subset to request
Repo resolution order:
gh ... -R owner/repoGH_REPOgit remote origin
Examples:
scripts/gh-read pr view 123scripts/gh-read run list -R openclaw/openclawscripts/gh-read api repos/openclaw/openclaw/pulls/123
When adding scripts
- Keep scripts focused and documented.
- Add a short entry in the relevant doc (or create one if missing).