AUN TUI & Daemon
AUN 协议的客户端:交互式 TUI + 给 GUI 前端用的无头 daemon。
组成
| 程序 | 入口 | 用途 |
|---|---|---|
auntui |
auntui.py |
交互式 REPL(基于 prompt_toolkit / rich) |
aun-daemon |
aun_daemon.py |
stdin/stdout NDJSON daemon,供 GUI 前端调用(协议见 protocol.md) |
SDK 依赖 fastaun(导入名仍为 aun_core)。启动时会自动检查 PyPI 上的新版本并升级。
注:包名 auntui,PyPI 安装 pip install auntui;命令名同样是 auntui。aun 这个命令名让给了 fastaun 包,避免冲突。
安装
# PyPI
pip install auntui
# 或源码安装
python3 -m venv .venv
.venv/bin/pip install -e .
装好后同时提供两个命令:auntui、aun-daemon。
CLI 使用
# 交互式 REPL
auntui -t evolclaw-ai.agentid.pub
# 单条消息(发完等回复)
auntui -t evolclaw-ai.agentid.pub -s "你好"
# 指定 AID
auntui -l test-user.agentid.pub -t evolclaw-ai.agentid.pub
不同 AID 天然隔离(SDK 的 AIDs/ 目录按 AID 分子目录),直接开多个终端即可多实例运行。
REPL 命令
/— 命令菜单//— 远端命令菜单/target <aid>— 设置目标 AID(持久化)/plain— 切换明文/E2EE 模式(持久化)/debug— 切换调试模式(持久化)/help— 帮助/quit— 退出Ctrl+J— 换行(多行输入)Ctrl+L— 清屏Ctrl+C— 中断任务 / 清空输入 / 双击退出
Daemon 使用
aun-daemon # 走默认数据目录
aun-daemon --data-dir ~/.aun
# 环境变量
AUN_CLI_DATA=/custom/path aun-daemon # 同 --data-dir
AUN_SKIP_UPDATE_CHECK=1 aun-daemon # 跳过启动时的 SDK 更新检查
AUN_DAEMON_LOG=DEBUG aun-daemon # 日志级别 (stderr)
通过 stdin 发 NDJSON 请求、stdout 读响应 + 事件。协议详见 protocol.md。
快速冒烟:
(echo '{"id":1,"method":"initialize"}'; sleep 3; echo '{"id":2,"method":"shutdown"}') \
| aun-daemon
数据目录
~/.aun/ # AUN_CLI_DATA 可覆盖
├── aun-cli/
│ ├── config.json # 配置(aid, target, encrypt, debug, recent_targets)
│ ├── .history # REPL 输入历史
│ ├── .sdk-check # 更新检查节流缓存
│ └── downloads/ # 收到的文件
└── AIDs/ # SDK 管理(多 AID 自然共存)
└── <aid>/
├── private/key.json
├── public/cert.pem
├── tokens/meta.json
└── messages.db # TUI/daemon 共享消息历史
SDK 版本管理
- 启动时 1h 内最多一次查询
pypi.org(失败静默跳过清华镜像兜底) - 发现新版自动
pip install -U fastaun并重启 - 设
AUN_SKIP_UPDATE_CHECK=1禁用
网关配置
- 域名:
gateway.agentid.pub - 端口:20001(非标准,SDK discovery 默认查 443 会失败)
- WebSocket:
wss://gateway.agentid.pub:20001/aun
开发
.venv/bin/pip install -e '.[dev]' pytest
.venv/bin/pytest tests/
相关文档
protocol.md— GUI ↔ daemon 通信协议(MVP v0.1)CLAUDE.md— 项目速查与约定
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
auntui-0.2.1.tar.gz
(78.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
auntui-0.2.1-py3-none-any.whl
(75.5 kB
view details)
File details
Details for the file auntui-0.2.1.tar.gz.
File metadata
- Download URL: auntui-0.2.1.tar.gz
- Upload date:
- Size: 78.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed7b0261a049a6890acc233ff45a286a262287e7ba3d06731296e80661378c43
|
|
| MD5 |
29f85411c569e746c20a15635cfa3da5
|
|
| BLAKE2b-256 |
a28000df2a6724c0e6a4ad1309804f8c0e5e9d54e11cc2203e659d20830367b4
|
File details
Details for the file auntui-0.2.1-py3-none-any.whl.
File metadata
- Download URL: auntui-0.2.1-py3-none-any.whl
- Upload date:
- Size: 75.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2353e006cda9d14a53cc9b4ac5c8ff2a247203e5e739b2ffb975c175d7ede993
|
|
| MD5 |
15fa115dc17396fafe166f1e38f1d121
|
|
| BLAKE2b-256 |
58e80396edb692ac3bf7e7b821ff06240ee03b966db8800e3dbb1ab03ceb1e58
|