//! Headless MaterialCraft command line: inspect, script, cook, export and render packages, and serve agents over MCP or JSON lines. Never opens a window #![forbid(unsafe_code)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] use std::sync::{Arc, Mutex}; use materialcraft_automation::security::{client_token, server_token}; use materialcraft_automation::{AuthorizedWorkspace, BridgeClient, Filesystem, Headless, MaterialCraftMcp, RenderOptions, rpc}; use serde_json::{Value, json}; const USAGE: &str = "\ materialcraft-cli: headless MaterialCraft USAGE: materialcraft-cli --version materialcraft-cli info Graphs, nodes, outputs and cook results, as JSON. materialcraft-cli commands [--filter ] List the engine commands (id, label, params). materialcraft-cli nodes [--filter ] [--category ] List the node library (ids, ports, parameters). materialcraft-cli run [params-json] [-o ] Run one command and print its JSON result; -o saves the package. materialcraft-cli batch Run [{\"id\", \"params\"}, ...] or {\"open\": , \"steps\": [...], \"save\": }. materialcraft-cli new