{"version":"2.1.271","anchor":"new-accept-command-flag-for-non-interactively-trusting-a","canonical_anchor":"new-accept-command-cli-flag-for-plugin-command-acceptan","heading":"New --accept-command flag to pre-approve a plugin's install command","tier":"use","area":"Plugins","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/new-accept-command-flag-for-non-interactively-trusting-a","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### New --accept-command flag to pre-approve a plugin's install command\n\nA new --accept-command flag lets you pre-approve a specific plugin install or update command without the broader -y\/--yes flag\n\n**What**\n\nInstalling or updating a plugin can involve running a marketplace-declared command, which Claude Code normally asks you to confirm. A new `--accept-command` flag lets you pre-approve that specific command instead of using the broader `-y`\/`--yes` flag.\n\n- `--accept-command <sha256>` takes the sha256 hash of the exact command text (previously reported via `--json`'s `shownCommand.sha256`), and only auto-accepts if it matches the command actually shown to the user for that plugin\/marketplace pair; otherwise it prints a warning and leaves the command unconfirmed.\n\n- If the marketplace's declared command has changed since the hash was generated, it refuses and re-shows the new command instead of accepting it.\n\n- This is wired through the CLI option parser and the plugin install and plugin update command handlers alike, so both flows support scoped, non-interactive command acceptance.\n\n**Why**\n\nThis lets scripts and automation approve a known, specific install command without granting blanket trust via `-y`\/`--yes`, and it protects against silently accepting a different command if the marketplace's listing changes.\n\n- Area: Plugins\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5"}