### What it is for 让脚本与 AI 代理可以使用命令行读写开着的终端,就像隔壁 [ELYOffice 那样](https://office.elygpui.com/docs?lang=zh)。 ### How it should work 例如运行命令 `ely-terminal get` 获取终端会话的显示内容等等。 可以用命令行做这些事:列出开着的会话、获得某个会话显示的最后n行内容、发送文本并回车、发送按键。 ### References https://office.elygpui.com/docs?lang=zh ### Checked - [x] I searched the open issues for the same request.
Activity
Raiden-MeixElysia commentedon Nov 10, 2026
0.2.4 加了
elyterminal ctl,做法和 ElyOffice 一样:默认关闭,要先在 设置 › 终端 › 命令行控制 里打开,因为它允许你账户下的任何程序往 shell 里输入。打开后应用监听一个本机回环端口,端口和一个随机令牌写在设置旁边的
control文件里(Unix 上权限 0600);关掉开关或退出应用时端口关闭、文件删除。两点注意:
elyterminal ctl sessions | Out-String。PowerShell 里直接$x = & elyterminal ctl sessions拿不到内容。key只发按键,不发文字;文字用send。BenzLeung commentedon Nov 10, 2026
给力!
我刚刚想起来,是不是可以再加一个命令:新建会话 [捂脸]
BenzLeung commentedon Nov 11, 2026
这是我想到可能会很有用的新命令,参考一下?