Skip to content

feat: add yes option to init command - #9514

Merged
Soulter merged 1 commit into
masterfrom
codex/issue-9498-init-yes
Aug 2, 2026
Merged

feat: add yes option to init command#9514
Soulter merged 1 commit into
masterfrom
codex/issue-9498-init-yes

Conversation

@Soulter

@Soulter Soulter commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

  • add -y/--yes to astrbot init
  • skip the installation confirmation when the option is provided while preserving the interactive default
  • add CLI regression coverage for unattended initialization

Motivation

This enables unattended AstrBot deployments that cannot respond to the installation confirmation prompt.

Closes #9498

Testing

  • ruff format .
  • ruff check .
  • python -m pytest (2073 passed)

Summary by Sourcery

Add a non-interactive initialization option to the AstrBot CLI init command and add regression coverage for it.

New Features:

  • Add a -y/--yes flag to the astrbot init CLI command to allow skipping installation confirmation prompts for unattended setups.

Tests:

  • Add a CLI regression test ensuring that the -y option skips the installation confirmation while still performing full initialization.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
astrbot-docs 69a753b Commit Preview URL

Branch Preview URL
Aug 02 2026, 02:50 PM

@Soulter
Soulter marked this pull request as ready for review August 2, 2026 14:52
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 2, 2026
@Soulter
Soulter merged commit c68a2ea into master Aug 2, 2026
22 checks passed
@dosubot

dosubot Bot commented Aug 2, 2026

Copy link
Copy Markdown

📄 Knowledge review

Dosu skipped reviewing this PR because your organization has used its 200 included credits for the month. Your usage will reset on 2026-09-01. To have Dosu review this PR before then, ask your organization admin to upgrade to a pro account.


Leave Feedback Ask Dosu about AstrBot Add Dosu to your team

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Changing the Click command function signature from init() to init(yes: bool) may break any internal callers that invoke cmd_init.init() directly; consider giving yes a default value or introducing a separate internal helper so existing non-CLI usages remain compatible.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Changing the Click command function signature from `init()` to `init(yes: bool)` may break any internal callers that invoke `cmd_init.init()` directly; consider giving `yes` a default value or introducing a separate internal helper so existing non-CLI usages remain compatible.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]为astrbot init指令添加-y参数

1 participant