Skip to main content

凡人打字机 - 支持多模型(Zhipu/DeepSeek/Kimi/Qwen/StepFun/MiniMax/Spark/Doubao/MiMo)的终极全能终端工具

Project description

凡人打字机 (fr-cli)

支持 27+ 种 AI 模型(智谱/智谱Coding/DeepSeek/Kimi/Kimi K2/Kimi Code/StepFun/Step-3/MiniMax/M2.7/讯飞星火/豆包/MiMo/LongCat)的终极全能终端工具。

✨ 功能特性

🤖 多模型支持

支持以下 AI 模型提供商:

  • 智谱 AI: GLM-4-Flash 等
  • 智谱 Coding Plan: GLM-4.7 等 (https://docs.bigmodel.cn/cn/coding-plan/quick-start)
  • DeepSeek: DeepSeek-Chat 等
  • Kimi (Moonshot): moonshot-v1-8k 等
  • Kimi K2: 代码优化版 kimi-k2-0905-preview
  • Kimi Code: 代码平台 kimi-cache-test (Kimi 会员)
  • 通义千问 (Qwen): qwen-turbo 等
  • 阶跃星辰 (StepFun): step-1-8k, step-2-16k, step-3-auto 等
  • Step-Audio: 实时语音交互
  • MiniMax: MiniMax-Text-01 等
  • MiniMax M2.7: Token Plan 订阅模型
  • 讯飞星火 (Spark): generalv3.5 等
  • 豆包 (Doubao): doubao-1-5-pro-32k 等
  • 小米 MiMo: mimo-v2-flash 等
  • LongCat (龙猫): LongCat-Flash-Chat 等 (https://longcat.chat/platform/docs/zh/)

🧠 核心功能

  • MasterAgent 主控:自我进化的 ReAct 主控 Agent,自动规划、调用工具、反思进化
  • Agent2Agent Protocol (A2A):Agent 互操作协议,支持 Agent 发现、注册、任务委托
  • 思维模式:direct / CoT / ToT / ReAct 四种推理模式切换
  • 文件沙盒:安全的虚拟文件系统,支持读写/目录操作
  • 联网搜索:内置 Web 搜索与网页内容提取(SSRF 防护)

🎯 特色功能

  • 视觉能力:图片生成 (CogView) 与多模态识别 (GLM-4V)
  • 邮件收发:支持 IMAP/SMTP(防头注入)
  • 定时任务:后台定时执行命令(shlex 安全解析)
  • 云盘集成:百度/阿里/OneDrive 网盘
  • 插件系统:AI 生成代码自动保存为插件(子进程隔离)
  • 会话记忆:自动保留最近 5 轮对话摘要 + 按日期自动存档
  • Agent 分身系统:AI 自动生成 Agent,支持工作流编排
  • Agent HTTP API:将 Agent 发布为 REST API 供外部调用
  • 本机应用启动:一键调用浏览器、微信、Word、WPS 等本地程序
  • 内置 Agent@local @remote @spider @db @RAG
  • 数据卷轴:Excel / CSV 读取与智能分析
  • 数据库助手:MySQL / PostgreSQL / SQL Server / Oracle 智能 SQL 生成
  • 本地 RAG:ChromaDB 向量库 + 自动文件监控与向量化
  • MCP 外部神通:支持 Model Context Protocol
  • 多源信息融合:大模型 + 工具结果统一汇总
  • 中英文切换:完整国际化支持

🚀 快速开始

# 安装
pip install fr-cli

# 启动
fr-cli

# 或从源码运行
cd fr-cli
pip install -e .
python3 main.py

首次运行会引导输入当前道统的 API Key。

📝 使用方法

📋 常用命令

/ls                 列出当前目录文件
/cat <file>         查看文件内容
/cd <dir>           切换工作目录
/write <file>       写入文件(多行输入,Ctrl+D 结束)
/delete <file>     删除文件
/search <query>     联网搜索
/save <name>        保存会话
/load               加载历史会话
/export             导出会话为 Markdown

/model <模型名>              切换AI模型
/model <道统>:<模型名>       同时切换道统和模型
/key <key>                   修改当前道统 API Key
/key <道统> <key>            为指定道统设置 Key
/providers                   查看所有道统配置
/providers add <p> <k> [m]   添加/更新道统配置
/providers use <p>           切换到指定道统

/mode direct|cot|tot|react   切换思维模式
/master on|off|status       MasterAgent 主控
/mcp_list                   列出 MCP 服务器及工具
/mcp_add <名> <命令> [参数]  添加 MCP 服务器
/mcp_del <名>               删除 MCP 服务器

/help              查看帮助
/exit              退出

🤖 AI 模型切换示例

# 使用 Kimi K2(代码优化版)
/model kimi-k2

# 使用 MiniMax M2.7(Token Plan)
/model minimax-m27

# 使用 Step-3(阶跃星辰)
/model step-3

# 使用 Kimi Code
/model kimi-code

# 配置新的 API Key
/providers add step-3 <your-api-key>

🔧 Agent 管理

/agent_create coder "编写Python代码的助手"  # 创建 Agent
/agent_list                                    # 列出所有 Agent
/agent_show myagent                            # 查看 Agent 详情
/agent_edit myagent persona                    # 编辑 Agent 人设
/agent_run myagent "帮我写个排序算法"          # 运行 Agent
/agent_delete oldagent                          # 删除 Agent
/agent_server start 8080                        # 启动 HTTP API

🔗 MCP 外部神通

/mcp_list                  # 列出已配置的 MCP 服务器
/mcp_add fs npx -y @modelcontextprotocol/server-filesystem /tmp
/mcp_del fs                # 删除 MCP 服务器
/mcp_refresh               # 刷新工具列表

📊 数据处理

/read_excel report.xlsx    # 读取 Excel
/read_csv data.csv         # 读取 CSV

🧑‍💻 内置 Agent

@local 查看当前目录最大的5个文件    # 本地系统操作
@spider https://example.com 2        # 智能爬虫
@db mydb 查询最近7天注册用户         # 数据库助手
@RAG 什么是向量数据库                # 本地知识库问答

🛡️ 安全命令

/limit <n>        设置 Token 上限 (最小1000)
/dir <path>       添加允许访问的目录
/dirs             列出已挂载的工作目录
/rmdir <索引>     删除已挂载的目录
/security        查看安全设置

📦 支持的模型提供商(25+)

道统 默认模型 API 地址
zhipu glm-4-flash -
zhipu-coding GLM-4.7 open.bigmodel.cn/api/coding/paas/v4
zhipu-anthropic glm-4.6 open.bigmodel.cn/api/anthropic
deepseek deepseek-chat api.deepseek.com
kimi moonshot-v1-8k api.moonshot.cn
kimi-k2 kimi-k2-0905-preview api.moonshot.cn
kimi-code kimi-cache-test api.kimi.com/coding/v1
qwen qwen-turbo dashscope.aliyuncs.com
stepfun step-1-8k api.stepfun.com
step-1 step-1-8k api.stepfun.com
step-2 step-2-16k api.stepfun.com
step-3 step-3-auto api.stepfun.com
step-audio step-audio-2 api.stepfun.com
minimax MiniMax-Text-01 api.minimax.chat
minimax-m27 MiniMax-M2.7 api.minimax.chat
minimax-m27-fast MiniMax-M2.7-HighSpeed api.minimax.chat
minimax-token-plan MiniMax-M2.7 api.minimax.chat
spark generalv3.5 spark-api-open.xf-yun.com
doubao doubao-1-5-pro-32k-250115 ark.cn-beijing.volces.com
mimo mimo-v2-flash api.xiaomimimo.com
longcat LongCat-Flash-Chat api.longcat.chat/openai
longcat-anthropic LongCat api.longcat.chat/anthropic

🔧 开发

# 克隆项目
git clone https://github.com/yourname/fr-cli.git
cd fr-cli

# 安装开发依赖
pip install -e ".[all]"

# 运行测试
python3 -m pytest tests/ -v

# 运行程序
python3 main.py

📂 项目结构

fr_cli/
├── main.py              # 核心入口
├── agent/                # Agent 系统
│   ├── a2a.py           # Agent2Agent 协议
│   ├── master.py        # MasterAgent 主控
│   └── ...
├── core/                 # 核心模块
│   └── llm.py           # LLM 客户端(20+ 提供商)
├── weapon/              # 武器库
├── memory/              # 记忆系统
└── lang/                # 国际化

📚 文档

📄 License

MIT

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

fr_cli-2.2.8.tar.gz (200.7 kB view details)

Uploaded Source

Built Distribution

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

fr_cli-2.2.8-py3-none-any.whl (208.1 kB view details)

Uploaded Python 3

File details

Details for the file fr_cli-2.2.8.tar.gz.

File metadata

  • Download URL: fr_cli-2.2.8.tar.gz
  • Upload date:
  • Size: 200.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for fr_cli-2.2.8.tar.gz
Algorithm Hash digest
SHA256 6abb63c8c0f3ec9bdcd213a5bec8c0c4b98a0c99292faedccb86db6a1d3658df
MD5 3fb3030f53da0bf8e22f01f10810ad30
BLAKE2b-256 d1933931becfafad992be5c2655a0a57b1211b6c0465fb74b16ea35c5222b8e6

See more details on using hashes here.

File details

Details for the file fr_cli-2.2.8-py3-none-any.whl.

File metadata

  • Download URL: fr_cli-2.2.8-py3-none-any.whl
  • Upload date:
  • Size: 208.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for fr_cli-2.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 85582f5fdc1bfe6e7d829215d51e7eafd9d3b6bdc83999419f76a2da89d625fb
MD5 41cd0ece2916f6ef76a96f5a540d6aaa
BLAKE2b-256 b4e3a64d6d4dc33149072e5e622f96e426773917a7a83e6389bc1696e3fba7dd

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