ErisPulse TerminalAdapter
The terminal is the chat — develop and test your Bot with zero platform setup.
A terminal adapter for ErisPulse. Each line you type in the terminal is emitted as a private message, and the bot's replies are printed back to stdout. Handy for developing and testing handlers without registering a real platform.
English
Features
- Zero config — no platform account or token needed, install and run
- One line, one message — every line typed in the terminal becomes a private message that triggers command / module handlers
- Replies printed to stdout — the bot's SendDSL replies are printed with a
[Bot]prefix - Standard actions work —
get_user_info/get_self_info/get_friend_listreturn mock data so framework standard actions keep working - Readable rendering — non-text segments (image / voice / file / mention ...) render as readable placeholders
- i18n aware — welcome / goodbye / hint messages follow the framework's
i18nlanguage
Install
pip install ErisPulse-TerminalAdapter
Requires ErisPulse >= 2.7.0.
Configuration
config.toml:
[TerminalAdapter]
bot_id = "terminal_bot"
bot_name = "TerminalBot"
user_id = "terminal_user"
user_name = "User"
prompt = "> "
reply_prefix = "[Bot] "
echo_input = false
| Field | Default | Description |
|---|---|---|
bot_id |
terminal_bot |
Bot user ID |
bot_name |
TerminalBot |
Bot nickname |
user_id |
terminal_user |
Mocked user ID (the terminal user chatting with the bot) |
user_name |
User |
Mocked user nickname |
prompt |
> |
Input prompt |
reply_prefix |
[Bot] |
Prefix prepended to each bot reply line (empty for none) |
echo_input |
false |
Echo user input (useful for piped input) |
The adapter registers under platform name terminal and exposes a single private-chat session (no groups).
Usage
After epsdk run, the terminal becomes the chat:
> Terminal adapter started. Type a message to chat with the Bot. Ctrl+C / EOF to quit.
> Use /help to list commands.
> /hello
[Bot] Hello, User!
> ping
[Bot] ...
You can also pipe input in, which is handy for automated testing:
echo "/hello" | epsdk run main.py
Non-text segments render as placeholders ([image: url], [voice: url], @user_id, ...). Group-related actions are unsupported (no groups in a terminal).
Notes
stdinis read in a worker thread, so on shutdown the reader only returns after the next line or EOF (Ctrl+D / Ctrl+Z).- Welcome / goodbye / hint messages follow the framework's
i18nlanguage setting.
简体中文
特性
- 零配置即用 —— 不需要注册任何平台账号、不需要 token,装上就能跑
- 一行一消息 —— 终端里每输入一行即一条私聊消息,直接触发命令 / 模块处理器
- 回复即打印 —— Bot 通过 SendDSL 回复的内容带
[Bot]前缀打印到 stdout - 标准动作可用 ——
get_user_info/get_self_info/get_friend_list等返回模拟数据,框架标准动作照常工作 - 多段渲染 —— 非文本消息段(图片 / 语音 / 文件 / @ 等)渲染成可读占位符
- i18n 跟随 —— 欢迎语 / 退出语跟随框架
i18n语言设置
安装
pip install ErisPulse-TerminalAdapter
需要 ErisPulse >= 2.7.0。
配置
config.toml:
[TerminalAdapter]
bot_id = "terminal_bot"
bot_name = "TerminalBot"
user_id = "terminal_user"
user_name = "User"
prompt = "> "
reply_prefix = "[Bot] "
echo_input = false
| 字段 | 默认值 | 说明 |
|---|---|---|
bot_id |
terminal_bot |
Bot 的用户 ID |
bot_name |
TerminalBot |
Bot 昵称 |
user_id |
terminal_user |
模拟用户的 ID(与 Bot 对话的终端用户) |
user_name |
User |
模拟用户昵称 |
prompt |
> |
输入提示符 |
reply_prefix |
[Bot] |
Bot 回复的行前缀(留空则不加前缀) |
echo_input |
false |
是否回显用户输入(管道输入场景下开启) |
适配器注册的平台名为 terminal,只有一个私聊会话,没有群组概念。
使用
epsdk run 启动后,终端就是聊天窗口:
> 终端适配器已启动。直接输入消息即可与 Bot 对话,Ctrl+C 或 EOF 退出。
> 输入 /help 查看可用命令。
> /hello
[Bot] Hello, User!
> ping
[Bot] ...
也可以通过管道喂入,便于自动化测试:
echo "/hello" | epsdk run main.py
非文本消息段会渲染成占位符([image: url]、[voice: url]、@user_id 等)。群组相关操作不支持(终端无群组)。
说明
stdin在独立线程中读取,关闭时需等到下一行或 EOF(Ctrl+D / Ctrl+Z)才会退出。- 欢迎语 / 退出语 / 提示语跟随框架
i18n语言设置。
Related · ErisPulse · Documentation · Issues
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file erispulse_terminaladapter-1.0.0.tar.gz.
File metadata
- Download URL: erispulse_terminaladapter-1.0.0.tar.gz
- Upload date:
- Size: 524.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a574a3dff1d28f6348e04d213d3375e6213f0f0d05ec1f513e6f4870d87765ce
|
|
| MD5 |
6ff3766580330d63f72ee3a4cb2bc4ec
|
|
| BLAKE2b-256 |
e6594ecb2898bcbd1f574a3af43dd3d30baacd0655ff6a45e2afa8ed8f84f22c
|
Provenance
The following attestation bundles were made for erispulse_terminaladapter-1.0.0.tar.gz:
Publisher:
python-publish.yml on ErisPulse/ErisPulse-TerminalAdapter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erispulse_terminaladapter-1.0.0.tar.gz -
Subject digest:
a574a3dff1d28f6348e04d213d3375e6213f0f0d05ec1f513e6f4870d87765ce - Sigstore transparency entry: 2327224277
- Sigstore integration time:
-
Permalink:
ErisPulse/ErisPulse-TerminalAdapter@d80fcd4b34447d34f87e956bc43c962fe184aaf3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ErisPulse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d80fcd4b34447d34f87e956bc43c962fe184aaf3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file erispulse_terminaladapter-1.0.0-py3-none-any.whl.
File metadata
- Download URL: erispulse_terminaladapter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e19d9147fe482042b917f982eeb488b466291169060c73449546bc7280d709f
|
|
| MD5 |
591826ac2f8bc0b9373efe3f88a7b4cb
|
|
| BLAKE2b-256 |
7d9afb2851cfc7fa239107a80c75bee12bc9b75a7e7f58f6fadc34bddd458b46
|
Provenance
The following attestation bundles were made for erispulse_terminaladapter-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on ErisPulse/ErisPulse-TerminalAdapter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erispulse_terminaladapter-1.0.0-py3-none-any.whl -
Subject digest:
0e19d9147fe482042b917f982eeb488b466291169060c73449546bc7280d709f - Sigstore transparency entry: 2327224319
- Sigstore integration time:
-
Permalink:
ErisPulse/ErisPulse-TerminalAdapter@d80fcd4b34447d34f87e956bc43c962fe184aaf3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ErisPulse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d80fcd4b34447d34f87e956bc43c962fe184aaf3 -
Trigger Event:
workflow_dispatch
-
Statement type: