grex_cli/cli/verbs/mod.rs
1pub mod add;
2pub mod doctor;
3pub mod exec;
4pub mod import;
5pub mod init;
6pub mod ls;
7pub mod rm;
8pub mod run;
9pub mod serve;
10pub mod status;
11pub mod sync;
12pub mod teardown;
13pub mod update;
14
15/// Shared JSON helper for M1-scaffold stubs.
16///
17/// Emits `{"status": "unimplemented", "verb": "<name>"}` so that
18/// `--json` callers still receive a parseable document when the verb
19/// has not yet been implemented (issue #35 / M8-6). Human-output
20/// behaviour is preserved on the non-JSON path.
21pub(crate) fn emit_unimplemented_json(verb: &str) -> anyhow::Result<()> {
22 let doc = serde_json::json!({
23 "status": "unimplemented",
24 "verb": verb,
25 });
26 println!("{}", serde_json::to_string(&doc)?);
27 Ok(())
28}