Amp CLI 新增 --execute 标志
amp dash x - Amp
AI 导读
Amp CLI 新增 --execute 标志(简写 -x),开启执行模式以支持程序化使用。该模式下 CLI 将提示词发送给 agent,等待完成后打印 agent 的最后一条消息。执行模式支持管道输入,并在重定向 stdout 时自动启用,也可与 threads continue 配合使用。
正文
当前显示原文,中文全文译文尚未就绪。
The Amp CLI has a new flag: --execute.
-x for short.
That flag turns on execute mode, which allows for programmatic use of the Amp CLI.
The CLI sends the given prompt to the agent and waits until the agent is done. Then it prints the agent's last message.
You can also pipe input to it:
Execute mode is automatically turned on when you redirect stdout:
You can also use execute mode with threads continue: