| 35 | /// for that. |
| 36 | #[derive(Debug, Args)] |
| 37 | pub struct Disable { |
| 38 | /// Which agent to remove hooks for. |
| 39 | /// |
| 40 | /// If not specified, removes hooks for all agents that have them |
| 41 | /// installed. |
| 42 | #[arg(long, value_name = "NAME")] |
| 43 | agent: Option<String>, |
| 44 | |
| 45 | /// Remove hooks for all installed agents. |
| 46 | /// |
| 47 | /// Equivalent to running `disable` for each agent that has hooks |
| 48 | /// currently installed. |
| 49 | #[arg(long)] |
| 50 | all: bool, |
| 51 | |
| 52 | /// Remove hooks from global ~/.claude/settings.json. |
| 53 | /// |
| 54 | /// Removes the globally installed hooks that were added with |
| 55 | /// `atomic agent enable --global`. |
| 56 | #[arg(short, long)] |
| 57 | global: bool, |
| 58 | |
| 59 | /// Remove hooks described by an integration-supplied manifest file. |
| 60 | /// |
| 61 | /// Reads the same manifest used by `atomic agent enable --hooks`, and |
| 62 | /// removes only the entries whose command matches the manifest's |
| 63 | /// `command_prefix` from its target file. Non-Atomic hooks are preserved. |
| 64 | #[arg(long, value_name = "FILE")] |
| 65 | hooks: Option<std::path::PathBuf>, |
| 66 | } |
| 67 | |
| 68 | impl Disable { |
| 69 | /// Create a default instance for testing. |
no outgoing calls