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