Skip to content

feat(bootstrap): detect agent CLI after bootstrap and print guidance#34

Closed
eouzoe wants to merge 1 commit into
mainfrom
pr/startsh-agent-detect
Closed

feat(bootstrap): detect agent CLI after bootstrap and print guidance#34
eouzoe wants to merge 1 commit into
mainfrom
pr/startsh-agent-detect

Conversation

@eouzoe

@eouzoe eouzoe commented Jul 16, 2026

Copy link
Copy Markdown
Owner

修改了什麼

scripts/start.sh 在 bootstrap 完成後(第 6 步)新增 agent CLI 偵測:掃描 opencode / claude / codex 是否可用,並在結尾訊息中告知使用者偵測到的 agent 與預設啟動方式。

為什麼要修改

引導流程結束後,使用者需要知道「下一步啟動哪個 AI agent」。原本只給一句 generic 提示,現在根據主機實際可用的 CLI 給出具體指引。

功能

  • 迴圈 command -v 檢查三個 agent CLI,收集到 AGENT_DETECTED
  • 有偵測到:打印 Detected agent CLI(s): ...Default: opencode -> run: opencode
  • 皆無:提示 No agent CLI detected. Install one, e.g. 'npm i -g opencode'

涉及檔案

  • scripts/start.sh(+15 / -1,僅第 6 步與結尾訊息)

影響

  • 純資訊輸出,不改變 bootstrap / devenv 啟動行為。
  • Justfileagent recipe 互補:start.sh 負責「提示」,agent recipe 負責「真正無互動啟動」。

參考文件 / 依據

測試

  • bash -n scripts/start.sh 語法通過。
  • 偵測邏輯與 agent recipe 共用同一套 command -v 分支,已在 recipe 單測中驗證。

@eouzoe eouzoe closed this Jul 16, 2026
@eouzoe
eouzoe deleted the pr/startsh-agent-detect branch July 16, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant