v0.11.0

v0.2.0 Release Notes

Released

Generated: 2026-01-18 00:00 v0.1.0 → v0.2.0

feat: Add CLI command parsing and argument handling system

翻譯 feat: 新增 CLI 命令解析與參數處理系統

Summary

Add comprehensive CLI argument parsing with support for multiple commands (info, export, deploy, clone, domain) and flexible flag handling. Refactor dependency checking into modular function with improved cross-platform package manager support.

翻譯 新增完整的 CLI 參數解析功能,支援多種命令(info、export、deploy、clone、domain)與彈性的 flag 處理。重構依賴檢查為模組化函式,改善跨平台套件管理器支援。

Changes

FEAT

翻譯
  • 新增 parseCommand() 函式用於 CLI 命令路由(info、export、deploy、clone、domain)
  • 新增 PodmanArg struct 封裝解析後的 CLI 參數
  • 新增 parseArgs() 函式,支援 flags:-u、--folder、--type、--output、-o、-f
  • 新增 getLocalDir() 函式,驗證本地目錄並檢測 docker-compose.yml
  • 新增 setRemoteDir() 函式,使用 MAC 地址與資料夾的 MD5 hash 產生唯一遠端路徑
  • 新增 getMAC() 函式取得硬體地址
  • 新增 isDir() 與 fileExists() 輔助函式

REFACTOR

翻譯
  • 將依賴檢查邏輯從 main() 抽取至專用的 checkRelyPackages() 函式
  • 重構 main() 採用模組化錯誤處理模式
  • 改善 Linux 套件管理器偵測,支援 apt、dnf、yum 與 pacman

FIX

翻譯
  • 修正 brew 安裝命令,移除錯誤的 -y flag
  • 改善錯誤處理,使用正確的 fmt.Errorf 回傳取代行內列印

Files Changed

File Status Tag
cmd/cli/main.go Modified FEAT

Generated by Claude Code