终端界面#
启动终端界面;支持原始输入时使用 Ink,否则使用 Rich。等同于不带子命令执行 openprogram。
usage: openprogram tui [-h] [--print [PROMPT]] [--standalone]
[--output-format {text,json,stream-json}]
[--include-partial-messages] [--permission-mode MODE]
[--continue] [--session-id ID] [--at REF]
[--no-project-binding] [--no-web] [--json-schema PATH]
[--model PROVIDER/MODEL] [--effort LEVEL]
[--usage-file PATH] [--transcript-file PATH]
[--resume SESSION_ID] [--no-alt-screen]
[--screen-reader]
参数#
| 参数 | 说明 |
|---|---|
--print, -p PROMPT |
单次提示词:发送、打印回复后退出 |
--standalone |
在当前进程中运行,而不是交给正在运行的 App 的 Worker |
--output-format OUTPUT_FORMAT |
--print 调用写到标准输出的内容:text(回复)、json(一条记录,说明这次运行如何结束)或 stream-json(每行一个事件,init 在最前,result 在最后) |
--include-partial-messages |
配合 --output-format stream-json,同时流式输出文字和推理的增量 |
--permission-mode MODE |
只用于这次 --print 轮次的权限模式(ask、acceptEdits、plan、auto、bypass);不保存到会话 |
--continue, -c |
继续这个文件夹所属项目中最近更新的会话 |
--session-id ID |
用这个 id 新建 --print 会话;已存在时失败 |
--at REF |
配合 --resume 或 --continue:在这个分支上运行,或接在这条消息之后(分支中间的消息会开出新分支) |
--no-project-binding |
不把新的 --print 会话绑定到这个文件夹:这里不写入任何内容,会话保存在 profile 中 |
--no-web |
这次 --print 轮次不使用任何网页工具(search、fetch),也不使用提供商自带的网页搜索 |
--json-schema PATH |
要求单次 --print 调用输出符合 JSON Schema 的结果;'-' 表示读取标准输入 |
--model PROVIDER/MODEL |
单次 --print 调用在新会话中使用的模型 |
--effort LEVEL |
单次 --print 调用的推理强度 |
--usage-file PATH |
单次 --print 调用结束后,把用量摘要以 JSON 写入 PATH |
--transcript-file PATH |
单次 --print 调用结束后,把这一轮以 JSON lines 写入 PATH |
--resume SESSION_ID |
恢复先前的 CLI 聊天会话。 |
--no-alt-screen |
在终端内联显示,保留滚动历史。 |
--screen-reader |
使用适合辅助技术的内联终端界面,禁用鼠标跟踪。 |