AI助手确认接口服务

ASKME-CLI是一个基于MCP协议的终端确认接口服务,为AI助手提供用户确认和下一步计划输入功能。

  • by rhyspenn
  • TypeScript
  • 本地部署
  • 4 星标
  • 更新于
在 GitHub 查看 rhyspenn/askme-cli

使用说明

[!注意] 我们很乐意得到你的帮助!如果您在Windows上尝试askme cli或进行兼容性修复,则非常欢迎PR👏.

ASKME-CLI

🤖 💬 ⚡ 🚀 ✨

为AI助手提供用户确认界面的MCP(模型上下文协议)服务器

简体中文 | 日本语

为什么

人工智能助手通常需要用户确认或后续步骤,但在MCP对话中没有简单的方法来获取用户输入。

该项目通过终端接口提供了一个个人确认端点。

如何开始

您需要配置MCP客户端以使用ASKME-CLI。

按照以下说明部署配置。

使用npx快速设置

# View help and configuration examples
npx askme-cli help

# Run directly (when called by MCP client)
npx askme-cli

配置MCP客户端

添加到MCP客户端配置文件中:

光标(.cursor/mcp_servers.json)

{
  "mcpServers": {
    "askme-cli": {
      "command": "npx",
      "args": ["askme-cli"],
      "env": {
        "ASKME_CLI_TERMINAL": "warp"
      }
    }
  }
}

其他MCP客户端

{
  "mcpServers": {
    "askme-cli": {
      "command": "npx",
      "args": ["askme-cli"],
      "env": {
        "ASKME_CLI_TERMINAL": "iterm2"
      }
    }
  }
}

地方发展

# Clone and install
git clone <your-repo-url>
cd askme-cli
npm install

# Build and run
npm run build
npm run start

如何使用

配置后,AI助手可以使用 ask_me 收集用户确认的工具:

  1. AI助手呼叫 ask_me 带有已完成工作总结的工具
  2. ASKME-CLI打开一个带有确认界面的新终端窗口
  3. 用户输入下一个计划或确认并提交
  4. AI助手接收用户输入以继续

终端支架

通过配置 ASKME_CLI_TERMINAL 环境变量:

终端 值 描述
翘曲 warp 默认,现代终端应用程序
iTerm2。 iterm2 流行的macOS终端
航站楼 terminal macOS系统终端
基蒂 kitty 跨平台终端
阿拉克里特。 alacritty GPU加速终端
Hyper hyper 基于Web的终端

api参考

ask_me工具

收集用户的下一个计划或确认。

参数:

  • what_we_did (string):AI完成的工作总结

退货:

  • 用户对下一个计划或确认的输入
  • 支持文本和图像输入

使用示例

AI助手集成

要在您的AI助手中有效地使用ASKME-CLI,请在系统提示中添加以下规则:

- Must call the askme-cli.ask_me tool before ending any user prompt every time.
- All prompts starting with /tk, don't modify code or files, and call the askme-cli.ask_me tool before ending.
- When you have questions, always call the askme-cli.ask_me tool before ending.
- If you have ideas for new features or changes, explain them clearly, analyze their feasibility, and ask if I want to proceed.

示例工具调用

{
  "tool": "ask_me",
  "parameters": {
    "what_we_did": "I've completed setting up the database schema and created the user authentication endpoints. The API is now ready for testing."
  }
}

技术栈

  • TypeScript -类型安全开发
  • React+Ink -终端UI框架
  • MCP-SDK -模型上下文协议支持
  • Node.js -运行时环境

许可证

麻省理工学院