Skip to main content

unifi_cli/
lib.rs

1pub mod api;
2pub mod commands;
3pub mod fields;
4pub mod output;
5pub mod tui;
6
7/// Commands that refuse to act without confirmation: they ask on a terminal,
8/// and exit `confirmation_required` when stdin is not one unless `--yes` is
9/// passed.
10///
11/// One list, three consumers: `unifi schema` publishes it so an agent can tell
12/// which invocations need `--yes` before it runs them, `main` gates these
13/// commands on it, and the contract tests drive every entry to prove the gate
14/// is really there. A mutating command is not automatically on this list;
15/// `devices locate` only blinks an LED, and `clients set-fixed-ip` and
16/// `protect rtsps create` add configuration rather than taking something away.
17pub const CONFIRMATION_GATED_COMMANDS: &[&str] = &[
18    "clients block",
19    "clients unblock",
20    "clients kick",
21    "devices restart",
22    "devices upgrade",
23    "ports cycle",
24    "protect rtsps delete",
25];