使用
macOS arm64
需要先準備
- 執行環境:
Go 1.26.10 or later
透過 brew cask nao1215/tap/atago 安裝 atago
brew install --cask nao1215/tap/atago
確認能用
atago --version輸出應包含「atago v0.25.2」。
先試試這個
cat > f1.atago.yaml <<'YAML'
version: "1"
suite:
name: example
scenarios:
- name: echo greets the world
steps:
- run:
shell: true
command: echo "hello atago"
- assert:
exit_code: 0
stdout:
contains: atago
stderr:
empty: true
YAML
cat > f2.atago.yaml <<'YAML'
version: "1"
suite:
name: files
scenarios:
- name: the generator writes the expected files
steps:
- run:
shell: true
command: mkdir -p site && echo "<html>hello</html>" > site/index.html
- assert:
file:
path: site/index.html
contains:
- "<html"
YAML
cat > f3.atago.yaml <<'YAML'
version: "1"
suite:
name: pty-test
scenarios:
- name: the init wizard completes
steps:
- pty:
command: sh -c 'printf "Project name: "; read name; echo "created $name/"'
session:
- expect: "Project name:"
- send: "demo\n"
- expect: "created demo/"
- assert:
exit_code: 0
YAML
cat > /tmp/prompt.sh <<'SH'
#!/bin/sh
printf "Project name: "
read name
echo "created $name/"
SH
chmod +x /tmp/prompt.sh
echo "setup done" && ls -lh *.atago.yaml
atago run f1.atago.yaml撰寫 YAML 規格檔,再以 atago run <spec>.atago.yaml 執行。
Linux x86_64
需要先準備
- 執行環境:
Go 1.26.10 or later
從 releases 下載預建的 linux_amd64 tarball,並將 atago 安裝至 ~/.local/bin
mkdir -p ~/.local/bin /tmp/atago-dl && curl -fsSL -o /tmp/atago-dl/atago.tar.gz https://github.com/nao1215/atago/releases/download/v0.25.2/atago_0.25.2_linux_amd64.tar.gz && tar -xzf /tmp/atago-dl/atago.tar.gz -C /tmp/atago-dl && install -m 0755 /tmp/atago-dl/atago ~/.local/bin/atago && ~/.local/bin/atago --version
確認能用
atago --version輸出應包含「atago v0.25.2」。
先試試這個
mkdir -p specs && cat > specs/f1.atago.yaml <<'YAML'
version: "1"
suite:
name: example
scenarios:
- name: echo greets the world
steps:
- run:
shell: true
command: echo "hello atago"
- assert:
exit_code: 0
stdout:
contains: atago
stderr:
empty: true
YAML
cat > specs/f2.atago.yaml <<'YAML'
version: "1"
suite:
name: files-example
scenarios:
- name: the generator writes the expected files
steps:
- run:
shell: true
command: mkdir -p site && echo "<html>hello</html>" > site/index.html && cat site/index.html
- assert:
file:
path: site/index.html
contains:
- "<html"
YAML
cat > specs/f3.atago.yaml <<'YAML'
version: "1"
suite:
name: pty-example
scenarios:
- name: the init wizard completes
steps:
- pty:
command: sh -c 'printf "Project name: "; read name; echo "created $name/"'
session:
- expect: "Project name:"
- send: "demo\n"
- expect: "created demo/"
- assert:
exit_code: 0
YAML
ls -la specs/ && cat specs/f1.atago.yamlatago run specs/f1.atago.yaml撰寫 YAML 規格檔,再以 atago run <spec>.atago.yaml 執行。
它能做什麼
- 操作互動式提示與終端機介面已測試
怎麼使用
- 在規格檔中新增
pty步驟,包含要執行的command,以及由expect與send項目組成的session清單。 - 新增
assert步驟,例如exit_code: 0。 - 以
atago run <spec>.atago.yaml執行規格。
- 在規格檔中新增
- 將實際指令執行過程錄製為測試規格已測試
怎麼使用
- 以
atago record --out <spec>.atago.yaml -- <command>錄製指令。 - 以
atago run <spec>.atago.yaml重播錄製的規格。
- 以
- 檢查指令的結束代碼、stdout 與 stderr沒有看到它可用
- 檢查產生的檔案並比對快照沒有看到它可用
pickfit 測到哪一步
macOS arm64
- 可以安裝
- 可以啟動
- 4 項功能中 2 項可用
- 可離線使用
Linux x86_64
- 可以安裝
- 可以啟動
- 4 項功能中 1 項可用
- 可離線使用
其他系統
Windows:專案說支援,但 pickfit 還沒試過。
適合用來
- 檢查指令的結束代碼、stdout 與 stderr
- 檢查產生的檔案並比對快照
- 透過 PTY 操作互動式提示與 TUI
- 將實際執行錄製成測試規格
- 搭配背景伺服器測試 CLI
可替代 runn、venom、ShellSpec 和 Bats。
pickfit 怎麼測的
每次測試都從乾淨的機器開始,照上面的步驟執行。 pickfit 怎麼驗證
macOS arm64
主要功能可用
- 從頭重跑
- 可離線使用
- 檢查於 2026年11月1日
- 版本 v0.25.2
測試機器遇到的差異
- README: brew install --cask nao1215/tap/atago
測試中: brew 警告「Calling `postflight` is deprecated! Use `postflight_steps` instead」,但安裝仍成功,執行檔已連結至 /opt/homebrew/bin/atago
Linux x86_64
主要功能可用
- 從頭重跑
- 可離線使用
- 檢查於 2026年10月30日
- 版本 v0.25.2
測試機器遇到的差異
- README: go install github.com/nao1215/atago@latest (requires Go 1.26.10+); yay -S atago-bin; aqua g -i nao1215/atago; mise use -g aqua:nao1215/atago
測試中: 從 GitHub releases 頁面下載 atago_0.25.2_linux_amd64.tar.gz(README 有說明),並將 atago 執行檔安裝至 ~/.local/bin - README: README wizard example uses a bare command without ': ' so needs no quoting
測試中: 含有「: 」的 pty/run 指令值須以雙引號括起,否則載入時會以 ATG2003 失敗