Deploy and run a production-style autopilot for any GitHub repository.
Use bundled scripts and templates instead of rebuilding orchestrators from scratch.
--once) and inspect logs.Use this when the user asks to initialize a new workspace.
Fastest path (wrapper):
python3 scripts/setup_autopilot.py \
--output-dir /path/to/workdir \
--repo-url https://github.com/<owner>/<repo>.git \
--config-profile production \
--token "<github_token>" \
--run-doctor \
--run-once \
--force
python3 scripts/deploy_autopilot.py \
--output-dir /path/to/workdir \
--config-profile production \
--repo-url https://github.com/<owner>/<repo>.git \
--project-name "<project-name>" \
--caller-name "你的自动化系统名" \
--task-requirement "按你的目标执行迭代需求(可以是性能、功能、重构或修复)" \
--git-user-name ai \
--git-user-email ai@local \
--require-code-changes \
--branch dev \
--init-env \
--auto-disable-missing-clis \
--doctor-after-deploy \
--print-diagnose-cmd
Notes:
--config-profile production uses production baseline (includes require_code_changes=true) and then applies CLI args overrides.require_non_doc_code_changes=true, minimum_non_doc_files_changed=2, minimum_non_doc_lines_changed=30.--auto-disable-missing-clis prevents immediate failures on hosts without claude, open-code, or gemini.--init-env creates .env from .env.example when missing.--task-requirement is injected into runtime prompt and can be any concrete user requirement.--caller-name controls how the orchestrator is referenced inside CLI prompts; avoid hardcoding caller identity.--repo-url should always be set to a real repo URL. Placeholder values will fail doctor/runtime checks.--doctor-after-deploy runs doctor immediately and returns non-zero on health failure.--cli-order lets you customize priority order.--only-cli restricts execution to specific CLI(s).--interactive-cli enters selected CLI interactive session mode for one task.--interactive-max-turns controls max redo turns in interactive session mode.--no-alt-screen for better terminal compatibility.--require-code-changes enables a hard gate: no_changes is treated as audit failure and will trigger redo/switch logic./init first (or perform equivalent initialization if slash command is unsupported).init_required_paths=[".codex"]; if .codex is not created, init is treated as failed..codex/ (and other configured init directories) during git clean, and excludes them from commits.--disable-init-phase turns off init phase; --force-reinit forces init to run again.Use this before --once and after any host/toolchain change.
python3 scripts/doctor_autopilot.py --config openclaw_config.json
For token validation:
python3 scripts/doctor_autopilot.py --config openclaw_config.json --check-github-token
Doctor checks:
One-round validation:
source .env
python3 openclaw_autopilot.py --config openclaw_config.json --once --token-env GITHUB_TOKEN
Unattended loop:
./start_openclaw.sh
Keep these behaviors unless the user explicitly asks to change policy:
origin/dev to avoid drift with external commits.30s no output: terminate and switch.15min runtime: send progress probe.5min no useful probe response: terminate and switch.30min hard cap: terminate and switch.run_status, test_pass_rate, summary fields).run_status successful and test_pass_rate >= 90.require_code_changes=true, rounds with no staged code changes are treated as failed and retried/switched.require_non_doc_code_changes=true, rounds with docs-only changes are treated as failed and retried/switched.minimum_non_doc_files_changed / minimum_non_doc_lines_changed are set, rounds below threshold are treated as failed and retried/switched..codex) must exist after init or the tool is switched.dev.ai .A/M/D + file paths).logs/PAUSED_REASON.txt for external monitors.Runtime override examples:
python3 openclaw_autopilot.py --config openclaw_config.json --cli-order codex,gemini,open-code,claude --once
python3 openclaw_autopilot.py --config openclaw_config.json --only-cli gemini --once
python3 openclaw_autopilot.py --config openclaw_config.json --interactive-cli codex --interactive-max-turns 5
If CLI exits without writing report JSON, autopilot can generate fallback report.
Default fallback behavior:
Config keys live in fallback_report inside openclaw_config.json.
When users ask to improve behavior, patch in this order:
openclaw_config.json thresholds and CLI commands.scripts/deploy_autopilot.py: deploy templates + apply practical overrides.scripts/doctor_autopilot.py: host and config diagnostics.scripts/setup_autopilot.py: one-command setup wrapper for deploy + optional doctor/once run.scripts/log_summary.py: summarize round and event logs quickly.scripts/install_skill.py: install this skill repo into local Codex skills directory.scripts/smoke_test_deploy.py: offline smoke test for deploy/runtime templates.assets/templates/openclaw_autopilot.py: orchestrator template.assets/templates/openclaw_config.json: default runtime config.assets/templates/openclaw_config.production.json: production baseline config.assets/templates/start_openclaw.sh: unattended launcher.assets/templates/.env.example: token env template.Read these only when needed:
共 1 个版本