Skip to main content

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/

相关文档

Metadata

Release files for auntui 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for auntui 0.2.1
File Size Uploaded Provenance Actions
auntui-0.2.1.tar.gz 78.5 kB Without provenance Details for auntui-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for auntui 0.2.1
File Interpreter ABI Platform Actions
auntui-0.2.1-py3-none-any.whl Python 3 none any Details for auntui-0.2.1-py3-none-any.whl

Total release size: 153.9 kB

Release files / auntui-0.2.1.tar.gz

Download URL auntui-0.2.1.tar.gz
Size 78.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ed7b0261a049a6890acc233ff45a286a262287e7ba3d06731296e80661378c43
BLAKE2b-256 checksum
How to use checksums
a28000df2a6724c0e6a4ad1309804f8c0e5e9d54e11cc2203e659d20830367b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / auntui-0.2.1-py3-none-any.whl

Download URL auntui-0.2.1-py3-none-any.whl
Size 75.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2353e006cda9d14a53cc9b4ac5c8ff2a247203e5e739b2ffb975c175d7ede993
BLAKE2b-256 checksum
How to use checksums
58e80396edb692ac3bf7e7b821ff06240ee03b966db8800e3dbb1ab03ceb1e58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Security for auntui 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page