Allow opting out of auto-update and of the automatic `bl skill init` after updates
bl currently self-updates silently and then unconditionally re-runs bl skill init, with no persistent way to opt out of either step.
What happens
- Any command (e.g. a scheduled
bl usage token-plan) triggersshouldAutoUpdate()when the installed version is a major behind, or more than 3 minors behind (packages/runtime/src/utils/update-checker.ts). It then runsnpm install -g bailian-cli@latestin the middle of the user's command. - On success,
syncAgentSkillsAfterUpdate()runsbl skill init, which symlinks everybailian-*skill into every detected agent directory (~/.claude/skills,~/.codex/skills,~/.config/opencode/skills,~/.pi/agent/skills,~/.agents/skills, …).bl updatedoes the same viaupdateAgentSkill()(packages/commands/src/commands/update.ts). - The only gate is
ctx.settings.quiet, which comes from the per-invocation--quietflag and is not aconfig.jsonkey (packages/core/src/config/loader.ts), so it cannot be made persistent.bl skill inititself has no flags to limit targets.
Why this is a problem
Users who manage their agent skill directories elsewhere (dotfiles, a config-as-code repo) have their removals silently reverted on the next update. In my case 10 skills I had removed came back into five agent homes because a cron-style quota probe happened to run after 1.24.0 was published (telemetry: skill init at 2026-09-11T13:48:04Z, cliVersion 1.24.0, immediately after an in-flight 1.20.0 usage token-plan).
Request
Two independent, persistent switches (config.json key and/or env var), e.g.:
BAILIAN_AUTO_UPDATE=0/"auto_update": false— never runnpm install -gimplicitly; only print the "update available" notice.BAILIAN_SKILL_SYNC=0/"skill_sync": false— never runbl skill initimplicitly after an update (both the auto path andbl update).
Optionally, bl skill init --agent <list> so the sync can be scoped even when enabled.
Environment: bl 1.24.0, npm global install, macOS 26.6, node v26.8.2.
Additional reproduction on Windows: implicit updating also interfered with machine-readable output during a paid asynchronous video edit.
Environment
- CLI at invocation: 1.20.0 (npm global installation); unexpectedly updated itself to 1.28.0 during the command.
- Node: v24.19.0
- OS/shell: Windows, PowerShell
- Region: cn (Beijing DashScope)
- Skills initially 1.20.0; skill synchronization subsequently fetched 1.28.0 documentation.
- Invoked by a local agent adapter using child_process.spawn with piped stdout/stderr.
- The user had explicitly selected keeping 1.20.0 rather than upgrading.
Command shape (paths and prompt generalized)
bl video edit --video ./reference.mp4 --prompt "[redacted visual editing prompt]" --resolution 720P --async --output json
The input was a 5-second video. Credentials were supplied through the environment and are omitted.
Observed
The command exited with code 0 and the remote video task was actually submitted successfully. However, the adapter could not parse the captured stdout as one JSON result. Update/install output interfered with machine-readable capture, and the adapter did not retain a task ID.
The retained diagnostic included the following CLI messages (excerpt, not a complete stdout/stderr transcript):
Significant update detected: 1.20.0 → 1.28.0
Auto-updating to keep your CLI up to date...
Update complete: 1.20.0 → 1.28.0
Syncing agent skill...
Agent skill updated.
We did NOT resubmit. We recovered the original task through the official read-only task listing API, confirmed it succeeded, and downloaded that result. A caller that automatically retries a parse failure could otherwise create an additional billable task.
Workaround and related output behavior
- Restored the CLI to 1.20.0 as requested by the user.
- Added --quiet to subsequent polling/download commands to avoid the implicit update branch.
- With both --quiet and --output json, task polling returned bare SUCCEEDED rather than a JSON object. The adapter now accepts this abbreviated format, but quiet mode is not a transparent workaround for consumers expecting JSON.
- CLI is currently 1.20.0; skill sync still fetched newer documentation. We are not claiming the entire environment was restored to the older version.
Expected / suggested improvements
- An explicit persistent opt-out for implicit updates and skill synchronization, as requested in this issue.
- Keep --output json stdout machine-readable, including output from updater subprocesses; send diagnostic output to stderr.
- Avoid updating the installation during an in-flight command, especially one that submits a paid asynchronous task.
- Clarify or standardize precedence of --quiet versus --output json, ideally allowing update suppression without losing structured output.
Frequency: observed once during submission. We did not repeat paid generation or another implicit upgrade just to reproduce it. The complete original stdout transcript was not retained, so the exact offending stdout bytes are unavailable. No media, credentials, account identifiers, task IDs, private paths, or raw configuration are included in this report.