diff --git a/README.md b/README.md index 94cc8d8..bddf44b 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Alternatively, you can clone the repository and run the app directly without ins ```bash # Windows -launcher.bat +launch.bat # Linux / macOS ./launcher.sh @@ -108,7 +108,28 @@ Modly supports external model and process extensions. Each extension is a GitHub --- -### Community +## Modly CLI + +Agents and scripts can call a running Modly desktop app without using the UI via the stdlib-only CLI. The CLI is a thin helper over Modly's canonical automation concepts and keeps final machine-readable JSON on stdout: + +```bash +python tools/modly-cli/agent.py health +python tools/modly-cli/agent.py model list +python tools/modly-cli/agent.py workflow-run status +python tools/modly-cli/agent.py generate --image ./input.png --output ./export.glb +``` + +Canonical commands are `health`, `model`, `workflow-run`, `capability`, and `process-run`. The friendly `generate` command starts `POST /workflow-runs/from-image`, polls the returned run, exports the final mesh when requested, and includes recovery metadata such as `workflow-run status ...` and `workflow-run cancel ...` in the JSON response. + +Compatibility and helper surfaces are intentionally separated: `legacy` wraps old `/generate/*` job endpoints, `dev serve-api` / `dev ensure-server` start only the FastAPI backend and do not prove Electron/Desktop bridge readiness, and `experimental comfy-image` / `experimental generate-from-workflow` are external ComfyUI orchestration helpers rather than the canonical Modly agent contract. Hidden helper aliases such as `status`, `export`, and `batch` remain parseable for scripts, but they are not presented as canonical root commands. + +`experimental generate-from-workflow --workflow --output ` treats `--output` as the final artifact location. When the ComfyUI workflow produces a downloadable 3D asset, the CLI downloads it directly; image-only workflows remain a compatibility path through Modly image-to-3D generation. + +See `tools/modly-cli/SKILL.md` for the agent workflow and output contract. + +--- + +### Community Join the [Discord server](https://discord.gg/BvjDCvS3yr) to stay up to date with the latest news, report bugs, and share feedback. diff --git a/api/routers/generation.py b/api/routers/generation.py index d64843d..ad59899 100644 --- a/api/routers/generation.py +++ b/api/routers/generation.py @@ -127,7 +127,8 @@ async def _run_generation(job_id: str, image_bytes: bytes, params: dict, collect job.status = "running" def progress_cb(pct: int, step: str = "") -> None: - job.progress = pct + if pct > job.progress: + job.progress = pct if step: job.step = step diff --git a/api/services/extension_process.py b/api/services/extension_process.py index df0e8f7..60ce678 100644 --- a/api/services/extension_process.py +++ b/api/services/extension_process.py @@ -190,7 +190,7 @@ def _read_loop(self, proc: subprocess.Popen, msg_queue: queue.Queue) -> None: try: msg_queue.put(json.loads(line)) except json.JSONDecodeError: - print(f"[{self.MODEL_ID}] bad JSON: {line}", file=sys.stderr) + print(f"[{self.MODEL_ID}] {line}", file=sys.stderr) finally: msg_queue.put(None) # sentinel: process is done