● กำลังพัฒนา
URL Shortener CLI
CLI tool ย่อ URL ด้วย TinyURL API และจัดการ history — บันทึก, ค้นหา และ copy ไปยัง clipboard
สารบัญ
ภาพรวม
ย่อ URL บ่อยสำหรับแชร์ link ยาวจาก e-commerce หรือ product catalog ใน LINE/chat tool นี้ย่อได้เลยจาก terminal พร้อม copy ไป clipboard อัตโนมัติและบันทึก history ไว้ค้นหาทีหลัง
สิ่งที่ทำแล้ว
- Shorten —
shorten <url>ส่ง URL ไปยัง TinyURL API แล้ว print short URL - Auto-copy — copy ผลลัพธ์ไป clipboard อัตโนมัติด้วย
clipboardy - History — บันทึก URL pairs ลงใน
~/.url-history.jsonพร้อม timestamp - List —
shorten listแสดง history 10 รายการล่าสุดใน table format - Search —
shorten search <keyword>ค้นหาจาก history ด้วย keyword - Open —
shorten open <short-url>เปิด URL ใน browser โดยตรง
ตัวอย่าง
$ shorten https://panupongws.com/resources/drizzle-orm-guide
✓ https://tinyurl.com/2abc123x (copied to clipboard)
$ shorten list
┌─────────────────────────────────────────┬──────────────────────────────────┬──────────────────┐
│ Original │ Short URL │ Date │
├─────────────────────────────────────────┼──────────────────────────────────┼──────────────────┤
│ https://panupongws.com/resources/... │ https://tinyurl.com/2abc123x │ 2026-06-15 12:30 │
└─────────────────────────────────────────┴──────────────────────────────────┴──────────────────┘
กำลังทำ
- Custom alias —
shorten <url> --alias my-linkสร้าง short URL แบบกำหนด slug เอง - Provider เพิ่มเติม — Rebrandly, is.gd เพื่อ fallback ถ้า TinyURL ล่ม
- QR code mode —
--qrgenerate QR code ใน terminal ด้วย ASCII art
เทคโนโลยี
- TypeScript + Node.js 22
commanderสำหรับ CLIclipboardyสำหรับ clipboard accesscli-table3สำหรับ table output- TinyURL API (ไม่ต้อง API key สำหรับ basic usage)