# v0.2.1 Release Notes

> Generated: 2026-01-18 16:00
> v0.2.0 → v0.2.1

## Recommended Commit Message

refactor: Extract command parsing and utilities into internal packages
<details>
<summary>翻譯</summary>
refactor: 將命令解析與工具函式抽取至 internal packages
</details>

***

## Summary

Restructure codebase by extracting command parsing logic and utility functions from `cmd/cli/main.go` into dedicated internal packages (`internal/command`, `internal/utils`) for better modularity and separation of concerns.
<details>
<summary>翻譯</summary>
重構程式碼結構，將命令解析邏輯與工具函式從 `cmd/cli/main.go` 抽取至專用的 internal packages（`internal/command`、`internal/utils`），提升模組化與關注點分離。
</details>

## Changes

### REFACTOR
- Extract `PodmanArg` struct and command parsing logic to `internal/command` package
- Move `New()` (formerly `parseCommand()`), `parseArgs()`, `getLocalDir()`, `setRemoteDir()` to `internal/command/command.go`
- Extract `CheckRelyPackages()`, `installPackage()` to `internal/utils/checkRelyPackages.go`
- Extract common utilities `IsDir()`, `FileExist()`, `GetMAC()`, `CmdExec()` to `internal/utils/utils.go`
- Simplify `cmd/cli/main.go` to entry point only, removing unused imports (`crypto/md5`, `encoding/hex`, `net`, `path/filepath`, `runtime`, `strings`, `os/exec`)

<details>
<summary>翻譯</summary>

- 將 `PodmanArg` struct 與命令解析邏輯抽取至 `internal/command` package
- 將 `New()`（原 `parseCommand()`）、`parseArgs()`、`getLocalDir()`、`setRemoteDir()` 移至 `internal/command/command.go`
- 將 `CheckRelyPackages()`、`installPackage()` 抽取至 `internal/utils/checkRelyPackages.go`
- 將通用工具函式 `IsDir()`、`FileExist()`、`GetMAC()`、`CmdExec()` 抽取至 `internal/utils/utils.go`
- 簡化 `cmd/cli/main.go` 為純進入點，移除未使用的 imports（`crypto/md5`、`encoding/hex`、`net`、`path/filepath`、`runtime`、`strings`、`os/exec`）

</details>

***

## Files Changed

| File | Status | Tag |
|------|--------|-----|
| `cmd/cli/main.go` | Modified | REFACTOR |
| `internal/command/command.go` | Added | REFACTOR |
| `internal/utils/utils.go` | Added | REFACTOR |
| `internal/utils/checkRelyPackages.go` | Added | REFACTOR |

***

Generated by [Claude Code](https://gist.github.com/pardnchiu/cc619549138ccc7b57c073c314b7d0d8)
