Chuyển đến nội dung
Skillpedia
Hình ảnh và biểu tượng8.5k · #12425

modly-cli

Skill này làm gì

Skill này cho phép agent AI dùng ứng dụng desktop Modly để biến một bức ảnh thành mô hình 3D. Skill dành cho nhà thiết kế hoặc người làm game đã cài và đang chạy Modly.

Khi nào nên dùng

  • ✓Khi bạn muốn biến ảnh sản phẩm thành mô hình 3D bằng Modly.
  • ✓Khi bạn cần kiểm tra Modly đã chạy và sẵn sàng trước khi bắt đầu một công việc.
  • ✓Khi bạn muốn xuất một tài sản 3D đã hoàn thành từ Modly thành file.

Liên kết skill

https://github.com/lightningpixel/modly/blob/main/tools/modly-cli/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/lightningpixel/modly/blob/main/tools/modly-cli/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Biến ảnh sản phẩm này thành mô hình 3D bằng Modly và xuất file đã hoàn thành cho tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent gửi lệnh đến ứng dụng Modly trên máy bạn, kiểm tra ứng dụng đã mở, khởi động công việc, chờ kết quả và xuất đầu ra khi xong.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Modly CLI

Overview

Modly exposes a local API at http://127.0.0.1:8765 while the official desktop app is running. The stdlib-only CLI at tools/modly-cli/agent.py is an agent helper over the canonical automation contract:

  • health
  • model
  • workflow-run
  • capability
  • process-run

Final machine-readable JSON is printed to stdout. Progress JSON lines, when requested, are printed to stderr.

Prerequisites

Launch the official Modly desktop app first, then check readiness:

python tools/modly-cli/agent.py health

Use --compact when another agent needs single-line JSON:

python tools/modly-cli/agent.py --compact health

GET /health is checked before business operations. If the app is unavailable, failures are structured:

{
  "ok": false,
  "code": "API_UNAVAILABLE",
  "message": "Cannot reach Modly API at ..."
}

Canonical Commands

Inspect models through /model/*:

python tools/modly-cli/agent.py model list
python tools/modly-cli/agent.py model status
python tools/modly-cli/agent.py model params --model active

Start or resume workflow runs:

python tools/modly-cli/agent.py workflow-run start --image ./input.png --wait
python tools/modly-cli/agent.py workflow-run status <run_id>
python tools/modly-cli/agent.py workflow-run cancel <run_id>

Generate from an image and export the finished mesh:

python tools/modly-cli/agent.py generate \
  --image ./input.png \
  --output ./export.glb \
  --progress

generate is a friendly wrapper around POST /workflow-runs/from-image and GET /workflow-runs/{run_id}. It does not silently fall back to /generate/*. The JSON includes recovery metadata:

{
  "ok": true,
  "run": {"kind": "workflowRun", "id": "..."},
  "workspace_path": "Default/model.glb",
  "export_path": "/absolute/path/to/export.glb",
  "meta": {
    "status_command": "python tools/modly-cli/agent.py workflow-run status ...",
    "cancel_command": "python tools/modly-cli/agent.py workflow-run cancel ...",
    "legacy": false
  }
}

Use --no-export when the caller only needs the workspace path. The hidden export helper remains available to download an existing workspace mesh, but it is not part of the canonical root command set:

python tools/modly-cli/agent.py export --path Default/model.glb --output ./model.glb

Discover capabilities or process runs only when the running server exposes the canonical contract:

python tools/modly-cli/agent.py capability list
python tools/modly-cli/agent.py process-run status <run_id>

If the contract is absent, the CLI fails closed:

{
  "ok": false,
  "code": "UNSUPPORTED_PROCESS",
  "message": "This process is not available through the canonical process-run contract."
}

Model Selection

--model auto uses the active model reported by /model/status, then validates that id against /model/all. Explicit --model values are also validated against /model/all. The CLI does not infer hidden capabilities from model names, labels, or string fragments.

Legacy Compatibility

The old /generate/* endpoints are explicit compatibility commands:

python tools/modly-cli/agent.py legacy job <job_id>
python tools/modly-cli/agent.py legacy cancel <job_id>
python tools/modly-cli/agent.py legacy generate --image ./input.png --output ./legacy.glb

Legacy responses include meta.legacy: true. Top-level job, cancel, models, and params aliases may still parse for older scripts, but they are not the documented canonical surface.

Developer-Only API Helpers

Headless startup helpers live under dev:

python tools/modly-cli/agent.py dev serve-api --print-command
python tools/modly-cli/agent.py dev ensure-server
python tools/modly-cli/agent.py dev ensure-server --start --detach

These commands start or inspect only the FastAPI backend. They do not imply Electron/Desktop bridge readiness, scene operation readiness, extension process execution readiness, or full workflow support. Prefer launching the official desktop app for real agent workflows.

Experimental ComfyUI Helpers

ComfyUI orchestration is outside the canonical Modly contract and lives under experimental:

python tools/modly-cli/agent.py experimental comfy-image \
  --workflow Trellis2Workflow \
  --prompt "clean object render, isolated on white" \
  --comfy-output ./source.png

python tools/modly-cli/agent.py experimental generat
Câu hỏi thường gặp

Tôi có cần mở Modly không?

Có. Ứng dụng desktop Modly phải đang chạy, vì agent giao tiếp với giao diện cục bộ của nó.

Tôi cần đưa gì cho agent?

Một ảnh đầu vào là thứ chính cần có để bắt đầu một công việc tạo mô hình.

Nếu Modly không chạy thì sao?

Agent báo một lỗi rõ ràng rằng nó không thể kết nối đến ứng dụng, thay vì đoán mò.

Chi tiết

Mô tả gốc của tác giả

Use when an agent needs to call a running Modly desktop instance from the terminal to generate/export image-to-3D assets through canonical JSON-first automation commands.

repo: lightningpixel/modly

Độ phổ biến

Sao GitHub
8.5k
Vị trí xếp hạng
#12425
Giấy phép
—
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Skill tương tự