feat(onboard): add skip bootstrap flag (#71218) · openclaw/openclaw@8226a3f
Patrick-Eric
·
2026-04-25
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -23,6 +23,7 @@ Interactive onboarding for local or remote Gateway setup.
|
23 | 23 | openclaw onboard |
24 | 24 | openclaw onboard --flow quickstart |
25 | 25 | openclaw onboard --flow manual |
| 26 | +openclaw onboard --skip-bootstrap |
26 | 27 | openclaw onboard --mode remote --remote-url wss://gateway-host:18789 |
27 | 28 | ``` |
28 | 29 | |
@@ -115,6 +116,7 @@ Non-interactive local gateway health:
|
115 | 116 | - Unless you pass `--skip-health`, onboarding waits for a reachable local gateway before it exits successfully. |
116 | 117 | - `--install-daemon` starts the managed gateway install path first. Without it, you must already have a local gateway running, for example `openclaw gateway run`. |
117 | 118 | - If you only want config/workspace/bootstrap writes in automation, use `--skip-health`. |
| 119 | +- If you manage workspace files yourself, pass `--skip-bootstrap` to set `agents.defaults.skipBootstrap: true` and skip creating `AGENTS.md`, `SOUL.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `HEARTBEAT.md`, and `BOOTSTRAP.md`. |
118 | 120 | - On native Windows, `--install-daemon` tries Scheduled Tasks first and falls back to a per-user Startup-folder login item if task creation is denied. |
119 | 121 | |
120 | 122 | Interactive onboarding behavior with reference mode: |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -28,8 +28,10 @@ inside a sandbox workspace under `~/.openclaw/sandboxes`, not your host workspac
|
28 | 28 | |
29 | 29 | ```json5 |
30 | 30 | { |
31 | | - agent: { |
32 | | - workspace: "~/.openclaw/workspace", |
| 31 | + agents: { |
| 32 | + defaults: { |
| 33 | + workspace: "~/.openclaw/workspace", |
| 34 | + }, |
33 | 35 | }, |
34 | 36 | } |
35 | 37 | ``` |
@@ -43,7 +45,7 @@ If you already manage the workspace files yourself, you can disable bootstrap
|
43 | 45 | file creation: |
44 | 46 | |
45 | 47 | ```json5 |
46 | | -{ agent: { skipBootstrap: true } } |
| 48 | +{ agents: { defaults: { skipBootstrap: true } } } |
47 | 49 | ``` |
48 | 50 | |
49 | 51 | ## Extra workspace folders |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -44,7 +44,7 @@ If a file is missing, OpenClaw injects a single “missing file” marker line (
|
44 | 44 | To disable bootstrap file creation entirely (for pre-seeded workspaces), set: |
45 | 45 | |
46 | 46 | ```json5 |
47 | | -{ agent: { skipBootstrap: true } } |
| 47 | +{ agents: { defaults: { skipBootstrap: true } } } |
48 | 48 | ``` |
49 | 49 | |
50 | 50 | ## Built-in tools |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -22,6 +22,10 @@ On the first agent run, OpenClaw bootstraps the workspace (default
|
22 | 22 | - Writes identity + preferences to `IDENTITY.md`, `USER.md`, `SOUL.md`. |
23 | 23 | - Removes `BOOTSTRAP.md` when finished so it only runs once. |
24 | 24 | |
| 25 | +## Skipping bootstrapping |
| 26 | + |
| 27 | +To skip this for a pre-seeded workspace, run `openclaw onboard --skip-bootstrap`. |
| 28 | + |
25 | 29 | ## Where it runs |
26 | 30 | |
27 | 31 | Bootstrapping always runs on the **gateway host**. If the macOS app connects to |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -87,8 +87,10 @@ Optional: choose a different workspace with `agents.defaults.workspace` (support
|
87 | 87 | |
88 | 88 | ```json5 |
89 | 89 | { |
90 | | - agent: { |
91 | | - workspace: "~/.openclaw/workspace", |
| 90 | + agents: { |
| 91 | + defaults: { |
| 92 | + workspace: "~/.openclaw/workspace", |
| 93 | + }, |
92 | 94 | }, |
93 | 95 | } |
94 | 96 | ``` |
@@ -97,8 +99,10 @@ If you already ship your own workspace files from a repo, you can disable bootst
|
97 | 99 | |
98 | 100 | ```json5 |
99 | 101 | { |
100 | | - agent: { |
101 | | - skipBootstrap: true, |
| 102 | + agents: { |
| 103 | + defaults: { |
| 104 | + skipBootstrap: true, |
| 105 | + }, |
102 | 106 | }, |
103 | 107 | } |
104 | 108 | ``` |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,11 +25,14 @@ openclaw onboard --non-interactive \
|
25 | 25 | --gateway-bind loopback \ |
26 | 26 | --install-daemon \ |
27 | 27 | --daemon-runtime node \ |
| 28 | + --skip-bootstrap \ |
28 | 29 | --skip-skills |
29 | 30 | ``` |
30 | 31 | |
31 | 32 | Add `--json` for a machine-readable summary. |
32 | 33 | |
| 34 | +Use `--skip-bootstrap` when your automation pre-seeds workspace files and does not want onboarding to create the default bootstrap files. |
| 35 | + |
33 | 36 | Use `--secret-input-mode ref` to store env-backed refs in auth profiles instead of plaintext values. |
34 | 37 | Interactive selection between env refs and configured provider refs (`file` or `exec`) is available in the onboarding flow. |
35 | 38 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -260,6 +260,7 @@ is only a legacy import source.
|
260 | 260 | Typical fields in `~/.openclaw/openclaw.json`: |
261 | 261 | |
262 | 262 | - `agents.defaults.workspace` |
| 263 | +- `agents.defaults.skipBootstrap` when `--skip-bootstrap` is passed |
263 | 264 | - `agents.defaults.model` / `models.providers` (if Minimax chosen) |
264 | 265 | - `tools.profile` (local onboarding defaults to `"coding"` when unset; existing explicit values are preserved) |
265 | 266 | - `gateway.*` (mode, bind, auth, tailscale) |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -133,6 +133,16 @@ describe("registerOnboardCommand", () => {
|
133 | 133 | ); |
134 | 134 | }); |
135 | 135 | |
| 136 | +it("forwards --skip-bootstrap to setup wizard options", async () => { |
| 137 | +await runCli(["onboard", "--skip-bootstrap"]); |
| 138 | +expect(setupWizardCommandMock).toHaveBeenCalledWith( |
| 139 | +expect.objectContaining({ |
| 140 | +skipBootstrap: true, |
| 141 | +}), |
| 142 | +runtime, |
| 143 | +); |
| 144 | +}); |
| 145 | + |
136 | 146 | it("parses --mistral-api-key and forwards mistralApiKey", async () => { |
137 | 147 | await runCli(["onboard", "--mistral-api-key", "sk-mistral-test"]); |
138 | 148 | expect(setupWizardCommandMock).toHaveBeenCalledWith( |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -133,6 +133,7 @@ export function registerOnboardCommand(program: Command) {
|
133 | 133 | .option("--daemon-runtime <runtime>", "Daemon runtime: node|bun") |
134 | 134 | .option("--skip-channels", "Skip channel setup") |
135 | 135 | .option("--skip-skills", "Skip skills setup") |
| 136 | +.option("--skip-bootstrap", "Skip creating default agent workspace files") |
136 | 137 | .option("--skip-search", "Skip search provider setup") |
137 | 138 | .option("--skip-health", "Skip health check") |
138 | 139 | .option("--skip-ui", "Skip Control UI/TUI prompts") |
@@ -189,6 +190,7 @@ export function registerOnboardCommand(program: Command) {
|
189 | 190 | daemonRuntime: opts.daemonRuntime as GatewayDaemonRuntime | undefined, |
190 | 191 | skipChannels: Boolean(opts.skipChannels), |
191 | 192 | skipSkills: Boolean(opts.skipSkills), |
| 193 | +skipBootstrap: Boolean(opts.skipBootstrap), |
192 | 194 | skipSearch: Boolean(opts.skipSearch), |
193 | 195 | skipHealth: Boolean(opts.skipHealth), |
194 | 196 | skipUi: Boolean(opts.skipUi), |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { setConfigValueAtPath } from "../config/config-paths.js"; |
1 | 2 | import type { DmScope } from "../config/types.base.js"; |
2 | 3 | import type { OpenClawConfig } from "../config/types.openclaw.js"; |
3 | 4 | import type { ToolProfileId } from "../config/types.tools.js"; |
@@ -32,3 +33,13 @@ export function applyLocalSetupWorkspaceConfig(
|
32 | 33 | }, |
33 | 34 | }; |
34 | 35 | } |
| 36 | + |
| 37 | +export function applySkipBootstrapConfig(cfg: OpenClawConfig): OpenClawConfig { |
| 38 | +const next = structuredClone(cfg); |
| 39 | +setConfigValueAtPath( |
| 40 | +next as Record<string, unknown>, |
| 41 | +["agents", "defaults", "skipBootstrap"], |
| 42 | +true, |
| 43 | +); |
| 44 | +return next; |
| 45 | +} |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。