v0.5.0 Release Notes
Released
Generated: 2026-01-18 09:41 (+00:00) v0.4.0 → v0.5.0
Recommended Commit Message
refactor: Move hardcoded credentials to environment variables and reorganize command utilities
翻譯
refactor: 將硬編碼憑證移至環境變數並重組命令工具Summary
Remove hardcoded SSH credentials from source code and migrate to environment variables loaded via godotenv. Reorganize command execution utilities into a dedicated file and improve CLI output formatting with ANSI colors.
翻譯
從原始碼中移除硬編碼的 SSH 憑證,改為透過 godotenv 載入環境變數。將命令執行工具重組至專用檔案,並使用 ANSI 色彩改善 CLI 輸出格式。Changes
SECURITY
- Remove hardcoded
RemoteServerandPasswordconstants fromcheckSSHConnection.goandutils.go - Move SSH credentials to environment variables (
PODRUN_SERVER,PODRUN_USERNAME,PODRUN_PASSWORD) - Add validation for required environment variables with clear error messages
翻譯
- 從
checkSSHConnection.go和utils.go移除硬編碼的RemoteServer和Password常數 - 將 SSH 憑證移至環境變數(
PODRUN_SERVER、PODRUN_USERNAME、PODRUN_PASSWORD) - 新增必要環境變數驗證,提供清楚的錯誤訊息
FEAT
- Add
Detachfield toPodmanArgstruct for tracking detach state - Add parsing support for
-d/--detachflag in argument parser
翻譯
- 在
PodmanArgstruct 新增Detach欄位用於追蹤分離狀態 - 在參數解析器新增
-d/--detach旗標的解析支援
REFACTOR
- Extract command execution utilities (
CMDRun,SSHTest,SSHRun,SSEOutput) tointernal/utils/command.go - Add
Podrunstruct andGetENV()function for centralized environment configuration - Replace inline detach flag checking with
p.Detachfield access - Add ANSI color constants (
Reset,Hint,Ok,Error,Warn) for CLI output formatting - Improve compose output with colored section dividers
- Inline brew install logic and remove redundant
installPackage()helper - Add
init()function with godotenv for.envfile loading
翻譯
- 將命令執行工具(
CMDRun、SSHTest、SSHRun、SSEOutput)抽取至internal/utils/command.go - 新增
Podrunstruct 和GetENV()函式用於集中式環境設定 - 將內聯 detach 旗標檢查替換為
p.Detach欄位存取 - 新增 ANSI 色彩常數(
Reset、Hint、Ok、Error、Warn)用於 CLI 輸出格式化 - 使用彩色區段分隔線改善 compose 輸出
- 內聯 brew 安裝邏輯並移除冗餘的
installPackage()helper - 新增
init()函式配合 godotenv 載入.env檔案
REMOVE
- Delete
internal/command/checkSSHConnection.go(functionality moved toutils.SSHTest()) - Remove debug
slog.Infocalls from compose commands
翻譯
- 刪除
internal/command/checkSSHConnection.go(功能已移至utils.SSHTest()) - 從 compose 命令移除除錯用的
slog.Info呼叫
ADD
- Add
.env.expampletemplate file for environment configuration
翻譯
- 新增
.env.expample範本檔案用於環境設定
CHORE
- Add
github.com/joho/godotenv v1.5.1dependency
翻譯
- 新增
github.com/joho/godotenv v1.5.1依賴
Files Changed
| File | Status | Tag |
|---|---|---|
cmd/cli/main.go |
Modified | REFACTOR |
go.mod |
Modified | CHORE |
go.sum |
Modified | CHORE |
internal/command/checkSSHConnection.go |
Deleted | SECURITY, REMOVE |
internal/command/command.go |
Modified | FEAT |
internal/command/composeCMD.go |
Modified | REFACTOR |
internal/utils/checkRelyPackages.go |
Modified | REFACTOR |
internal/utils/utils.go |
Modified | SECURITY, REFACTOR |
internal/utils/command.go |
Added | REFACTOR |
.env.expample |
Added | ADD |
Generated by Claude Code