Skip to main content

AUN TUI - Interactive terminal client + headless daemon for the AUN protocol

Project description

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;命令名同样是 auntuiaun 这个命令名让给了 fastaun 包,避免冲突。

安装

# PyPI
pip install auntui

# 或源码安装
python3 -m venv .venv
.venv/bin/pip install -e .

装好后同时提供两个命令:auntuiaun-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/

相关文档

Project details


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.0.tar.gz (99.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auntui-0.2.0-py3-none-any.whl (75.5 kB view details)

Uploaded Python 3

File details

Details for the file auntui-0.2.0.tar.gz.

File metadata

  • Download URL: auntui-0.2.0.tar.gz
  • Upload date:
  • Size: 99.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for auntui-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7ad25c002ee8d5377d48e11d1e3ded159f97932e510585fb396f00a405092976
MD5 baf80af283bac621485f01e310a08413
BLAKE2b-256 2fd47d56f2d640541415e126424ef794c4d751aa9c47066ae2986295cd890bcd

See more details on using hashes here.

File details

Details for the file auntui-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: auntui-0.2.0-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

Hashes for auntui-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 394b689327cef91b9bf9e419b461eb683f3e4bc7f8f2448e7ad27617362de932
MD5 bdefbdb5d45900a733dc5adb3aac1c20
BLAKE2b-256 512cdc77ec898ec7191267c51cd7cd9179aa1db76c4361fb091221575f2b190d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page