Skip to content

Add --force flag to ai-rules init command#26

Merged
jonandersen merged 2 commits into
block:mainfrom
davepic:dpiccolella/add-init-force-flag
Dec 8, 2025
Merged

Add --force flag to ai-rules init command#26
jonandersen merged 2 commits into
block:mainfrom
davepic:dpiccolella/add-init-force-flag

Conversation

@davepic
Copy link
Copy Markdown
Contributor

@davepic davepic commented Dec 4, 2025

Summary

  • Adds a --force option to ai-rules init that automatically bypasses the confirmation prompt when rules already exist
  • For custom recipes, passes force=true as a parameter when --force is specified
  • For default recipes, no force parameter is passed

Changes

  • Added force field to InitArgs struct in src/cli/args.rs
  • Updated run_init to skip confirmation prompt when --force is true
  • Modified initialize_rules_with_recipe to pass force parameter to custom recipes only
  • Updated README.md with documentation for the new --force option

Test plan

  • All existing tests pass (247 tests)
  • Release build completes successfully
  • --help shows the new --force option

🤖 Generated with Claude Code

Adds a --force option that automatically bypasses the confirmation prompt when rules already exist. For custom recipes, the force flag is passed as a parameter (force=true) only when --force is specified.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread src/commands/init.rs
@jonandersen jonandersen merged commit a5a514c into block:main Dec 8, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants