Built-in design generation now runs as an agentic MCP tool-loop (reusing the agent-rs BuiltInProvider), gated behind OPENPENCIL_DESIGN_AGENT_LOOP / the Settings experimental toggle; the orchestrator stays the default. - design-agent system prompt + in-process design toolset (parity-locked with the MCP surface) + flag-gated Intent::Design routing - spawn_agents execution as sequential sub-loops + live creation-mode badges (per-agent glow + 'N/M designing...' header) - new MCP tools: get_guidelines, ToolSearch, get_screenshot, get_editor_state, export_nodes, spawn_agents; style-guide local audit - #27 AI panel restyle: rounded tool cards + green check-rings, gray user bubbles, model-pill bottom toolbar, header, empty-state pills, the PARALLEL AGENTS (agent_team_size) 1x-6x chip dropdown - multi-chat tabs: ChatSessions model (Deref-to-active) + tab row UI (switch / close / + / Cmd+T) with each run bound to its tab Large checkpoint commit spanning the working tree (Rust shell crates).
5.5 KiB
5.5 KiB
@zseven-w/openpencil
English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Français · Español · Deutsch · Português · Русский · हिन्दी · Türkçe · ไทย · Tiếng Việt · Bahasa Indonesia
CLI สำหรับ OpenPencil — ควบคุมเครื่องมือออกแบบจากเทอร์มินัลของคุณ
การติดตั้ง
npm install -g @zseven-w/openpencil
การรองรับแพลตฟอร์ม
CLI จะตรวจจับและเปิดแอปเดสก์ท็อป OpenPencil โดยอัตโนมัติบนทุกแพลตฟอร์ม:
| แพลตฟอร์ม | เส้นทางการติดตั้งที่ตรวจพบ |
|---|---|
| macOS | /Applications/OpenPencil.app, ~/Applications/OpenPencil.app |
| Windows | NSIS ต่อผู้ใช้ (%LOCALAPPDATA%), ต่อเครื่อง (%PROGRAMFILES%), แบบพกพา |
| Linux | /usr/bin, /usr/local/bin, ~/.local/bin, AppImage (~/Applications, ~/Downloads), Snap, Flatpak |
การใช้งาน
op <คำสั่ง> [ตัวเลือก]
วิธีการป้อนข้อมูล
อาร์กิวเมนต์ที่รับ JSON หรือ DSL สามารถส่งได้สามวิธี:
op design '...' # ข้อความแบบอินไลน์ (ข้อมูลขนาดเล็ก)
op design @design.txt # อ่านจากไฟล์ (แนะนำสำหรับการออกแบบขนาดใหญ่)
cat design.txt | op design - # อ่านจาก stdin (การไพพ์)
การควบคุมแอป
op start [--desktop|--web] # เปิด OpenPencil (เดสก์ท็อปเป็นค่าเริ่มต้น)
op stop # หยุดอินสแตนซ์ที่กำลังทำงาน
op status # ตรวจสอบว่ากำลังทำงานอยู่หรือไม่
การออกแบบ (Batch DSL)
op design <dsl|@file|-> [--post-process] [--canvas-width N]
op design:skeleton <json|@file|->
op design:content <section-id> <json|@file|->
op design:refine --root-id <id>
การดำเนินการเอกสาร
op open [file.op] # เปิดไฟล์หรือเชื่อมต่อกับแคนวาสสด
op save <file.op> # บันทึกเอกสารปัจจุบัน
op get [--type X] [--name Y] [--id Z] [--depth N]
op selection # รับการเลือกแคนวาสปัจจุบัน
การจัดการโหนด
op insert <json> [--parent P] [--index N] [--post-process]
op update <id> <json> [--post-process]
op delete <id>
op move <id> --parent <P> [--index N]
op copy <id> [--parent P]
op replace <id> <json> [--post-process]
ตัวแปรและธีม
op vars # รับตัวแปร
op vars:set <json> # ตั้งค่าตัวแปร
op themes # รับธีม
op themes:set <json> # ตั้งค่าธีม
op theme:save <file.optheme> # บันทึกพรีเซ็ตธีม
op theme:load <file.optheme> # โหลดพรีเซ็ตธีม
op theme:list [dir] # แสดงรายการพรีเซ็ตธีม
หน้า
op page list # แสดงรายการหน้า
op page add [--name N] # เพิ่มหน้า
op page remove <id> # ลบหน้า
op page rename <id> <name> # เปลี่ยนชื่อหน้า
op page reorder <id> <index> # จัดลำดับหน้าใหม่
op page duplicate <id> # ทำสำเนาหน้า
การนำเข้า
op import:svg <file.svg> # นำเข้าไฟล์ SVG
op import:figma <file.fig> # นำเข้าไฟล์ Figma .fig
เลย์เอาต์
op layout [--parent P] [--depth N]
op find-space [--direction right|bottom|left|top]
แฟล็กทั่วไป
--file <path> ไฟล์ .op เป้าหมาย (ค่าเริ่มต้น: แคนวาสสด)
--page <id> ID หน้าเป้าหมาย
--pretty แสดงผล JSON แบบอ่านง่าย
--help แสดงความช่วยเหลือ
--version แสดงเวอร์ชัน
สัญญาอนุญาต
MIT