{"id":28405688,"url":"https://github.com/zdt1013/wen-ai-cli","last_synced_at":"2026-02-24T21:31:26.236Z","repository":{"id":286582577,"uuid":"961843522","full_name":"zdt1013/wen-ai-cli","owner":"zdt1013","description":"问AI是一个专为服务器运维和个人主机管理设计的CLI工具，通过集成AI能力，帮助用户快速查找和执行系统命令，提升运维效率。它能够智能解析用户需求，提供精准的命令建议和执行方案，是运维人员的得力助手。","archived":false,"fork":false,"pushed_at":"2026-01-23T08:18:01.000Z","size":326,"stargazers_count":10,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-24T01:15:44.880Z","etag":null,"topics":["ai","ai-assistant","ai-cli-assistant","cli","wenai"],"latest_commit_sha":null,"homepage":"https://github.com/zdt1013/wen-ai-cli","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zdt1013.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-07T08:53:45.000Z","updated_at":"2026-01-23T08:17:25.000Z","dependencies_parsed_at":"2025-04-07T10:35:25.771Z","dependency_job_id":null,"html_url":"https://github.com/zdt1013/wen-ai-cli","commit_stats":null,"previous_names":["zdt1013/wen-ai-cli"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/zdt1013/wen-ai-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdt1013%2Fwen-ai-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdt1013%2Fwen-ai-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdt1013%2Fwen-ai-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdt1013%2Fwen-ai-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdt1013","download_url":"https://codeload.github.com/zdt1013/wen-ai-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdt1013%2Fwen-ai-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29801021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T21:02:39.706Z","status":"ssl_error","status_checked_at":"2026-02-24T21:02:21.834Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-assistant","ai-cli-assistant","cli","wenai"],"created_at":"2025-06-01T21:37:46.680Z","updated_at":"2026-02-24T21:31:26.230Z","avatar_url":"https://github.com/zdt1013.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 问AI -- 让运维更智能，让命令更简单。\n\n问AI (Wen AI) CLI是一个专为服务器运维和个人主机管理设计的CLI工具，通过集成AI能力，帮助用户快速查找和执行系统命令，提升运维效率。它能够智能解析用户需求，提供精准的命令建议和执行方案，是运维人员的得力助手。\n\n**中文** · [English](./README_en.md) ·  [报告问题][github-issues-link] · [请求功能][github-issues-link]\n\n## ✨ 功能特性\n\n- 🤖 智能对话：支持与AI进行自然语言对话，快速查找应用命令\n- 📚 命令手册模式：`wen man`，使用大模型智能解析命令手册，提供更智能的命令手册查询\n- 🔍 智能感知：智能感知当前工作环境，AI回答更准确\n- 🖥️ 跨平台兼容：支持Linux、MacOS、Windows（arm、amd架构）等平台\n- 🌍 多语言支持：内置国际化支持，提供多语言界面（目前支持中、英文)\n- ⚙️ 配置管理：支持自定义配置，包括API密钥等设置\n- 📝 日志记录：详细的日志记录，方便问题排查\n\n## 📦 安装\n\n### 📋 前置要求\n\n- Go 1.22 或更高版本\n- Git\n\n### 📝 安装步骤\n\n#### 方式1. 📦 二进制安装\n```bash\n# 一行安装\n# 默认安装最新版本\ncurl -fSsL https://raw.githubusercontent.com/zdt1013/wen-ai-cli/main/install.sh | bash\n# 默认安装最新版本（脚本加速）\ncurl -fSsL https://ghproxy.net/https://raw.githubusercontent.com/zdt1013/wen-ai-cli/main/install.sh | bash\n\n# 指定版本和加速源安装\ncurl -fSsL https://raw.githubusercontent.com/zdt1013/wen-ai-cli/main/install.sh | bash -s -- -v v0.1.1 -m ghproxy\n# 默认安装最新版本（脚本加速）\ncurl -fSsL https://ghproxy.net/https://raw.githubusercontent.com/zdt1013/wen-ai-cli/main/install.sh | bash -s -- -m ghproxy\n\n\n```\n```bash\n# 分步骤安装\n# 下载安装脚本\ncurl -o install.sh https://raw.githubusercontent.com/zdt1013/wen-ai-cli/main/install.sh\n# 下载安装脚本（脚本加速源）\ncurl -o install.sh https://ghproxy.net/https://raw.githubusercontent.com/zdt1013/wen-ai-cli/main/install.sh\n\n# 添加执行权限\nchmod +x install.sh\n\n# 运行安装脚本（默认安装最新版本）\nsudo ./install.sh\n\n# 或者指定版本安装\nsudo ./install.sh -v v0.1.1\n\n# 使用加速源安装（可选值：ghproxy, wgetla）\nsudo ./install.sh -v v0.1.1 -m ghproxy\n```\n\n#### 方式2. 🚀 本地编译\n1. 克隆仓库：\n```bash\ngit clone https://github.com/zdt1013/wen-ai-cli.git\ncd wen-ai-cli\n```\n\n2. 安装依赖：\n```bash\ngo mod download\n```\n\n3. 编译项目：\n```bash\ngo build\n```\n\n4. 将编译后的可执行文件添加到系统PATH中（可选）\n\n## 🚀 使用方法\n\n### ⌨️ 单轮提问模式\n\n```bash\n# 基本格式\n\u003e wen + [输入任意问题]\n```\n\n![单轮提问模式示例](docs/example1.png)\n\n### 💬 启动对话模式\n```bash\n# 基本格式\n\u003e wen chat + [输入首轮问题]\n或\n\u003e wen chat \u003c回车\u003e\n  \u003c输入任意问题\u003e\n```\n![对话模式示例](docs/example2.png)\n\n### 📚 命令帮助手册模式（man模式）\n\u003e 借助大模型，可以拜托原生`man`命令，实现更智能的命令手册查询。\n\u003e \n```bash\n# 基本格式\n\u003e wen man -c curl [可选输入附加问题]\n# 示例\n\u003e wen man -c curl \"重点介绍下fSsL参数\"\n```\n![man模式示例](docs/example3.png)\n### 🛠️ 其他命令\n```bash\n# 查看配置\n\u003e wen config --help\n# 查看帮助信息\n\u003e wen --help\n```\n\n### 🔧 配置说明\n\n在使用问AI之前，你需要配置必要的参数，比如API密钥等。可以通过以下命令进行配置：\n\n```bash\n\u003e wen config --apiKey YOUR_API_KEY --baseUrl YOUR_API_BASE --model YOUR_API_MODEL\n或\n\u003e wen config -k YOUR_API_KEY -u YOUR_API_BASE -m YOUR_API_MODEL\n```\n\n## 📁 项目结构\n\n```\nwen-ai-cli/\n├── action/     # 命令动作实现\n├── assets/     # 静态资源\n│   └── lang/   # 多语言包\n├── cmd/        # 命令行定义\n├── docs/       # 说明文档与附件\n├── common/     # 公共组件\n├── execute/    # 执行器\n├── logger/     # 日志模块\n├── model/      # 数据模型\n├── setup/      # 初始化设置\n├── validate/   # 验证器\n├── wenai/      # 核心功能实现\n├── main.go     # 程序入口\n├── go.mod      # Go模块定义\n└── go.sum      # Go模块依赖校验\n```\n\n## ⚠️ 已知问题\n  * 非命令行相关问题解答，回复样式暂未优化\n\n## 🔮 未来计划 \n * 感知：运行宿主用户、非sudo用户，智能调整命令。\n * 感知：本机已安装命令、未安装命令。\n * 工具链（functioncall、mcp）支持。\n * 思考模型兼容。\n * 用户体系，方便即安即用，不用自己去配置ai参数。\n * 用户知识库、使用偏好，方便保存自己使用习惯，Wen AI更懂你。\n\n## 📚 依赖开源项目\n * [urfave/cli](https://github.com/urfave/cli) - 命令行应用框架\n * [cloudwego/eino](https://github.com/cloudwego/eino) - 字节跳动开源大型语言模型（LLM）应用开发框架\n * [gookit/config](https://github.com/gookit/config) - 配置管理库\n * [gookit/i18n](https://github.com/gookit/i18n) - 国际化支持\n * [shirou/gopsutil](https://github.com/shirou/gopsutil) - 系统信息采集\n * [sashabaranov/go-openai](https://github.com/sashabaranov/go-openai) - OpenAI API 客户端\n * [gookit/slog](https://github.com/gookit/slog) - 日志库\n * [go-cmd/cmd](https://github.com/go-cmd/cmd) - 命令执行库\n * [manifoldco/promptui](https://github.com/manifoldco/promptui) - 交互式命令行界面\n\n## 🤝 贡献指南\n\n欢迎提交 Issue 和 Pull Request 来帮助改进这个项目。在提交代码之前，请确保：\n\n1. 代码符合项目的编码规范\n2. 添加了必要的测试\n3. 更新了相关文档\n\n## 📄 许可证\n\n本项目采用 MIT 许可证 - 详见 [LICENSE](LICENSE) 文件\n\n## 📞 联系方式\n\n如有任何问题或建议，请通过以下方式联系：\n\n- 提交 Issue\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdt1013%2Fwen-ai-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdt1013%2Fwen-ai-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdt1013%2Fwen-ai-cli/lists"}