# Scripts API SUMMARY: ที่เก็บ script แบบถาวร — บันทึก shell, Python หรือ Node script ที่ใช้ซ้ำ และดึงผ่าน curl | bash KEY CONTEXT: Auth: Mind Key or JWT Store: POST /script { name, content, description?, language? } Fetch as text: GET /script/:name (returns text/plain, curl | bash ready) Info: GET /script/:name/info (metadata without content) List: GET /scripts (JSON array) Delete: DELETE /script/:name Use case: store deployment scripts, config generators, troubleshooting snippets Scripts API Scripts API ให้บริการที่เก็บแบบถาวรสำหรับ script ที่ใช้ซ้ำ script ถูกตั้งชื่อและกำหนดเวอร์ชันภายใน mind และสามารถดึงเป็น plain text — เหมาะสำหรับรูปแบบ Endpoints POST /script จัดเก็บหรืออัปเดต script [CODE BLOCK] GET /script/:name ดึงเนื้อหา script เป็น เหมาะสำหรับ pipe ไปยัง bash [CODE BLOCK] GET /script/:name/info ดึง metadata ของ script โดยไม่มีเนื้อหา [CODE BLOCK] Response: [CODE BLOCK] GET /scripts รายการ script ทั้งหมดใน mind ปัจจุบัน [CODE BLOCK] DELETE /script/:name ลบ script [CODE BLOCK] กรณีการใช้งานทั่วไป Deployment script จัดเก็บขั้นตอน deployment มาตรฐานเพื่อให้ LLM รันได้โดยไม่ต้อง derive ขั้นตอนใหม่ทุกครั้ง: [CODE BLOCK] Troubleshooting snippet จัดเก็บคำสั่ง diagnostic สำหรับปัญหาทั่วไป: [CODE BLOCK] ตัวสร้าง configuration จัดเก็บ script ที่สร้าง config: [CODE BLOCK] ขั้นตอนถัดไป - Variables API - Cron & Scheduler