add force flag for rules remove
This commit is contained in:
19
README.md
19
README.md
@@ -117,24 +117,35 @@ task-master rules remove windsurf
|
|||||||
|
|
||||||
# Removes the specified brand rule sets and their MCP config from your project.
|
# Removes the specified brand rule sets and their MCP config from your project.
|
||||||
|
|
||||||
```
|
````
|
||||||
|
|
||||||
- Adding rules creates the brand rules directory (e.g., `.roo/rules`) and copies/initializes the brand's rules.
|
- Adding rules creates the brand rules directory (e.g., `.roo/rules`) and copies/initializes the brand's rules.
|
||||||
- Removing rules deletes the brand rules directory and associated MCP config.
|
- Removing rules deletes the brand rules directory and associated MCP config.
|
||||||
- You can use multiple comma-separated brands in a single command.
|
- You can use multiple comma-separated brands in a single command.
|
||||||
|
- Use the `--force` flag to bypass the confirmation prompt when removing rules (dangerous, irreversible):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
task-master rules remove windsurf --force
|
||||||
|
````
|
||||||
|
|
||||||
|
:warning: **Warning:** The `--force` flag will immediately and permanently delete brand rules and configuration without asking for confirmation.
|
||||||
|
|
||||||
task-master rules add windsurf,roo
|
task-master rules add windsurf,roo
|
||||||
task-master rules remove windsurf
|
task-master rules remove windsurf --force
|
||||||
|
|
||||||
# List all tasks
|
# List all tasks
|
||||||
|
|
||||||
task-master list
|
task-master list
|
||||||
|
|
||||||
# Show the next task to work on
|
# Show the next task to work on
|
||||||
|
|
||||||
task-master next
|
task-master next
|
||||||
|
|
||||||
# Generate task files
|
# Generate task files
|
||||||
|
|
||||||
task-master generate
|
task-master generate
|
||||||
```
|
|
||||||
|
````
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
@@ -154,7 +165,7 @@ Try running it with Node directly:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
node node_modules/claude-task-master/scripts/init.js
|
node node_modules/claude-task-master/scripts/init.js
|
||||||
```
|
````
|
||||||
|
|
||||||
Or clone the repository and run:
|
Or clone the repository and run:
|
||||||
|
|
||||||
|
|||||||
@@ -504,7 +504,11 @@ function registerCommands(programInstance) {
|
|||||||
.description(
|
.description(
|
||||||
'Add or remove rules for one or more brands (e.g., task-master rules add windsurf roo)'
|
'Add or remove rules for one or more brands (e.g., task-master rules add windsurf roo)'
|
||||||
)
|
)
|
||||||
.action(async (action, brands) => {
|
.option(
|
||||||
|
'-f, --force',
|
||||||
|
'Skip confirmation prompt when removing rules (dangerous)'
|
||||||
|
)
|
||||||
|
.action(async (action, brands, options) => {
|
||||||
const projectDir = process.cwd();
|
const projectDir = process.cwd();
|
||||||
|
|
||||||
if (!brands || brands.length === 0) {
|
if (!brands || brands.length === 0) {
|
||||||
@@ -520,8 +524,11 @@ function registerCommands(programInstance) {
|
|||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
|
|
||||||
if (action === 'remove') {
|
if (action === 'remove') {
|
||||||
const ui = await import('./ui.js');
|
let confirmed = true;
|
||||||
const confirmed = await ui.confirmRulesRemove(expandedBrands);
|
if (!options.force) {
|
||||||
|
const ui = await import('./ui.js');
|
||||||
|
confirmed = await ui.confirmRulesRemove(expandedBrands);
|
||||||
|
}
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
console.log(chalk.yellow('Aborted: No rules were removed.'));
|
console.log(chalk.yellow('Aborted: No rules were removed.'));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user