1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"repo": "anan1213095357/qwencli", "files": {"README_EN.md": {"6a756570dfea73c257a8a3ff82e1d44414628ad6": {"t": 1785674233.3605032, "n": 7581, "h": "2197b6b6229f17b1", "c": "# <div align=\"left\" style=\"display: flex; align-items: center; line-height: 1.2;\"> <img src=\"./141221163.png\" width=\"32\" height=\"32\" style=\"margin-right: 15px;\"> <span style=\"font-size: 32px; font-weight: bold;\">QwenCLI - Intelligent DevOps Automation Agent</span> </div>\n<div align=\"center\">\n\n\n\n\n\n\n**Let AI Be Your DevOps Assistant | Intelligent Automation Expert in the Command Line**\n\n**🌐 Language | 语言切换:** [English](README_EN.md) | [中文](README.md)\n\n</div>\n\n---\n\n## 📖 Project Introduction\n\n**QwenCLI** is an intelligent DevOps automation command-line tool based on large language models. Through natural language interaction, it helps you quickly execute system commands, manage files, and analyze logs, making tedious DevOps tasks simple and efficient.\n\nJust input natural language instructions, and QwenCLI will understand your intent and automatically call the appropriate tools to complete the task — like having a 24/7 online DevOps expert ready to assist.\n\n---\n\n## ✨ Core Features\n\n| Feature | Description |\n|------|------|\n| 🔧 **Command Execution** | Supports cross-platform terminal command execution (ls, dir, git, npm, docker, etc.) |\n| 📄 **File Reading** | Intelligently reads text, code, and configuration file contents |\n| ✍️ **File Writing** | Automatically generates code and configuration files and writes them locally |\n| 🖼️ **Image Analysis** | Supports recognition and analysis of local screenshots and photos |\n| 🔍 **Content Search** | Search for files containing specific keywords (such as function names, variable names, class names, etc.) in specified directories |\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- [.NET 10.0 SDK](https://dotnet.microsoft.com/download) or higher\n- Alibaba Cloud DashScope API Key ([Get Here](https://dashscope.console.aliyun.com/))\n\n### Installation & Running\n\n```bash\n# Clone the project\ngit clone https://github.com/anan1213095357/QwenCLI.git\ncd QwenCLI/QwenCLI\n\n# Restore dependencies\ndotnet restore\n\n# Configure API Key (choose one)\n# Method 1: Copy configuration file and modify\ncp appsettings.example.json appsettings.json\n# Then edit appsettings.json to fill in your API Key\n\n# Method 2: Use environment variables\nsetx QWENCLI_API_KEY \"sk-your-api-key-here\"\n\n# Run the project\ndotnet run\n```\n\n### Publish as Standalone Executable\n\n```bash\n# Publish AOT compiled version (single file, high performance)\ndotnet publish -c Release -r win-x64 --self-contained true\n```\n\n---\n\n## ⚙️ Configuration\n\n### Method 1: Configuration File (Recommended for Local Development)\n\n1. Copy the template file:\n ```bash\n cp appsettings.example.json appsettings.json\n ```\n\n2. Edit `appsettings.json`:\n ```json\n {\n \"ApiKey\": \"sk-your-actual-api-key-here\",\n \"Endpoint\": \"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions\",\n \"Model\": \"qwen3.5-plus\"\n }\n ```\n\n### Method 2: Environment Variables (Recommended for Production)\n\n```bash\n# Windows\nsetx QWENCLI_API_KEY \"sk-your-api-key-here\"\nsetx QWENCLI_ENDPOINT \"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions\"\nsetx QWENCLI_MODEL \"qwen3.5-plus\"\n\n# Linux / macOS\nexport QWENCLI_API_KEY=\"sk-your-api-key-here\"\nexport QWENCLI_ENDPOINT=\"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions\"\nexport QWENCLI_MODEL=\"qwen3.5-plus\"\n```\n\n> 🔒 **Security Tip**: `appsettings.json` has been added to `.gitignore` and will not be committed to the Git repository. Do not manually upload files containing real API Keys to public repositories.\n\n---\n\n## 💡 Usage Examples\n\nAfter starting QwenCLI, you can input various natural language instructions:\n\n```\n> Help me check what files are in the current directory\n\n> Read the contents of package.json and analyze dependencies\n\n> Create a configuration file named config.json containing database connection information\n\n> Execute git status to check the current repository state\n\n> Analyze the error message in this screenshot (supports image paths)\n\n> Search for all C# files containing \"UserService\" in the project\n```\n\n### Interface Preview\n\n```\n ____ ________ ____ \n / __ \\_ _____ ____ / ____/ / / _/ \n / / / / | /| / / _ \\/ __ \\ / / / / / / \n/ /_/ /| |/ |/ / __/ / / // /___/ /____/ / \n\\___\\_\\|__/|__/\\___/_/ /_/ \\____/_____/___/\n\nv1.5.0 | Cross-Platform DevOps Tool | by using_unfase\n\nTerminal DevOps Agent has accessed the system (supports full file operations).\nTip: Please enter deployment or DevOps instructions (type 'exit' to terminate connection)\n-------------------------------------------------------\n```\n\n---\n\n## 🏗️ Project Structure\n\n```\nQwenCLI/\n├── QwenCLI.csproj # Project configuration file\n├── Program.cs # Main program entry point\n├── README.md # Project documentation (Chinese)\n├── README_EN.md # Project documentation (English)\n├── .gitignore # Git ignore rules\n├── appsettings.json # Configuration file (for local use, do not commit)\n├── appsettings.example.json # Configuration template (can be committed)\n├── Properties/ # Project property configuration\n├── bin/ # Build output directory\n└── obj/ # Temporary build files\n```\n\n---\n\n## 🔬 Technology Stack\n\n- **Runtime**: .NET 10.0\n- **Compilation Optimization**: AOT (Ahead-of-Time) Compilation\n- **AI Model**: Alibaba Cloud Qwen (qwen3.5-plus)\n- **HTTP Client**: System.Net.Http\n- **JSON Processing**: System.Text.Json\n\n### Project Features\n\n- ✅ **AOT Compilation** - Smaller size, faster startup speed\n- ✅ **Cross-Platform** - Supports Windows, Linux, macOS\n- ✅ **Streaming Conversation** - Supports multi-turn contextual dialogue\n- ✅ **Tool Calling** - Intelligently identifies and calls appropriate tools\n- ✅ **Error Handling** - Comprehensive exception capture and prompts\n- ✅ **Secure Configuration** - API Key separated from code, supports environment variables\n- ✅ **Encoding Compatibility** - Automatically detects file encoding (UTF-8/GBK) to avoid garbled text\n- ✅ **Intelligent Search** - Quickly locate code files containing specific keywords\n\n---\n\n## 📝 Notes\n\n1. **API Key Security**: `appsettings.json` has been added to `.gitignore`, do not manually commit files containing real Keys\n2. **Command Execution Permissions**: Commands executed by the tool have the same permissions as the current user, please operate with caution\n3. **Network Dependency**: Stable network connection is required to call AI services\n4. **Token Limit**: Large file reading will be automatically truncated to prevent Token overflow\n5. **File Modification**: When modifying existing files, please ensure to provide precise old_content for replacement\n\n---\n\n## 🤝 Contribution Guidelines\n\nIssues and Pull Requests are welcome!\n\n1. Fork this project\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n---\n\n## 📄 License\n\nThis project is open source under the [MIT License](LICENSE).\n\n---\n\n<div align=\"center\">\n\n**Made with ❤️ by using_unsafe**\n\nIf this project helps you, please give it a ⭐ Star to show your support!\n\n</div>\n"}}, "README.md": {"6a756570dfea73c257a8a3ff82e1d44414628ad6": {"t": 1785674234.380652, "n": 4774, "h": "472717331f420102", "c": "# <div align=\"left\" style=\"display: flex; align-items: center; line-height: 1.2;\"> <img src=\"./141221163.png\" width=\"32\" height=\"32\" style=\"margin-right: 15px;\"> <span style=\"font-size: 32px; font-weight: bold;\">QwenCLI - 智能运维自动化 Agent</span> </div>\n<div align=\"center\">\n\n\n\n\n\n\n\n**让 AI 成为你的运维助手 | 命令行里的智能自动化专家**\n\n**🌐 语言切换 | Language:** [中文](README.md) | [English](README_EN.md)\n\n</div>\n\n---\n\n## 📖 项目简介\n\n**QwenCLI** 是一款基于千问大语言模型的智能运维自动化命令行工具。它通过自然语言交互,帮助你快速执行系统命令、管理文件、分析日志,让繁琐的运维工作变得简单高效。\n\n只需输入自然语言指令,QwenCLI 就能理解你的意图,自动调用合适的工具完成任务 —— 就像有一个 24 小时在线的运维专家随时待命。\n\n---\n\n## ✨ 核心功能\n\n| 功能 | 描述 |\n|------|------|\n| 🔧 **命令执行** | 支持跨平台终端命令执行 (ls, dir, git, npm, docker 等) |\n| 📄 **文件读取** | 智能读取文本、代码、配置文件内容 |\n| ✍️ **文件写入** | 自动生成代码、配置文件并写入本地 |\n| 🖼️ **图片分析** | 支持本地截图、照片的识别与分析 |\n| 🔍 **内容搜索** | 在指定目录下搜索包含特定关键字(如函数名、变量名、类名等)的文件 |\n\n---\n\n## 🚀 快速开始\n\n### 前置要求\n\n- [.NET 10.0 SDK](https://dotnet.microsoft.com/download) 或更高版本\n- 阿里云 DashScope API Key ([获取地址](https://dashscope.console.aliyun.com/))\n\n### 安装与运行\n\n```bash\n# 克隆项目\ngit clone https://github.com/anan1213095357/QwenCLI.git\ncd QwenCLI/QwenCLI\n\n# 还原依赖\ndotnet restore\n\n# 配置 API Key(二选一)\n# 方式 1: 复制配置文件并修改\ncp appsettings.example.json appsettings.json\n# 然后编辑 appsettings.json 填入你的 API Key\n\n# 方式 2: 使用环境变量\nsetx QWENCLI_API_KEY \"sk-your-api-key-here\"\n\n# 运行项目\ndotnet run\n```\n\n### 发布为独立可执行文件\n\n```bash\n# 发布 AOT 编译版本(单文件、高性能)\ndotnet publish -c Release -r win-x64 --self-contained true\n```\n\n---\n\n## ⚙️ 配置说明\n\n### 方式一:配置文件(推荐本地开发)\n\n1. 复制模板文件:\n ```bash\n cp appsettings.example.json appsettings.json\n ```\n\n2. 编辑 `appsettings.json`:\n ```json\n {\n \"ApiKey\": \"sk-your-actual-api-key-here\",\n \"Endpoint\": \"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions\",\n \"Model\": \"qwen3.5-plus\"\n }\n ```\n\n### 方式二:环境变量(推荐生产环境)\n\n```bash\n# Windows\nsetx QWENCLI_API_KEY \"sk-your-api-key-here\"\nsetx QWENCLI_ENDPOINT \"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions\"\nsetx QWENCLI_MODEL \"qwen3.5-plus\"\n\n# Linux / macOS\nexport QWENCLI_API_KEY=\"sk-your-api-key-here\"\nexport QWENCLI_ENDPOINT=\"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions\"\nexport QWENCLI_MODEL=\"qwen3.5-plus\"\n```\n\n> 🔒 **安全提示**: `appsettings.json` 已加入 `.gitignore`,不会被提交到 Git 仓库。请勿手动将包含真实 API Key 的文件上传到公共仓库。\n\n---\n\n## 💡 使用示例\n\n启动 QwenCLI 后,你可以输入各种自然语言指令:\n\n```\n> 帮我查看当前目录有哪些文件\n\n> 读取 package.json 的内容并分析依赖\n\n> 创建一个名为 config.json 的配置文件,包含数据库连接信息\n\n> 执行 git status 查看当前仓库状态\n\n> 分析这张截图中的错误信息 (支持图片路径)\n\n> 搜索项目中所有包含 \"UserService\" 的 C# 文件\n```\n\n### 界面预览\n\n```\n ____ ________ ____ \n / __ \\_ _____ ____ / ____/ / / _/ \n / / / / | /| / / _ \\/ __ \\ / / / / / / \n/ /_/ /| |/ |/ / __/ / / // /___/ /____/ / \n\\___\\_\\|__/|__/\\___/_/ /_/ \\____/_____/___/\n\nv1.5.0 | 千问跨平台运维工具 | by 奶茶叔叔\n\n终端运维 Agent 已接入系统。\n提示:请输入部署或运维指令 (输入 'exit' 终止连接)\n-------------------------------------------------------\n```\n\n---\n\n## 🏗️ 项目结构\n\n```\nQwenCLI/\n├── QwenCLI.csproj # 项目配置文件\n├── Program.cs # 主程序入口\n├── README.md # 项目说明文档\n├── .gitignore # Git 忽略规则\n├── appsettings.json # 配置文件(本地使用,不提交)\n├── appsettings.example.json # 配置模板(可提交)\n├── Properties/ # 项目属性配置\n├── bin/ # 编译输出目录\n└── obj/ # 临时构建文件\n```\n\n---\n\n## 🔬 技术栈\n\n- **运行时**: .NET 10.0\n- **编译优化**: AOT (Ahead-of-Time) 编译\n- **AI 模型**: 阿里云通义千问 (qwen3.5-plus)\n- **HTTP 客户端**: System.Net.Http\n- **JSON 处理**: System.Text.Json\n\n### 项目特性\n\n- ✅ **AOT 编译** - 更小的体积、更快的启动速度\n- ✅ **跨平台** - 支持 Windows、Linux、macOS\n- ✅ **流式对话** - 支持多轮上下文对话\n- ✅ **工具调用** - 智能识别并调用合适的工具\n- ✅ **错误处理** - 完善的异常捕获与提示\n- ✅ **安全配置** - API Key 与代码分离,支持环境变量\n- ✅ **编码兼容** - 自动检测文件编码 (UTF-8/GBK),避免乱码\n- ✅ **智能搜索** - 快速定位包含特定关键字的代码文件\n\n---\n\n## 📝 注意事项\n\n1. **API Key 安全**: `appsettings.json` 已加入 `.gitignore`,请勿手动提交包含真实 Key 的文件\n2. **命令执行权限**: 工具执行的命令具有与当前用户相同的权限,请谨慎操作\n3. **网络依赖**: 需要稳定的网络连接以调用 AI 服务\n4. **Token 限制**: 大文件读取会自动截断,防止 Token 溢出\n5. **文件修改**: 修改现有文件时,请确保提供精确的 old_content 进行替换\n\n---\n\n## 🤝 贡献指南\n\n欢迎提交 Issue 和 Pull Request!\n\n1. Fork 本项目\n2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)\n3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)\n4. 推送到分支 (`git push origin feature/AmazingFeature`)\n5. 开启 Pull Request\n\n---\n\n## 📄 许可证\n\n本项目采用 [MIT 许可证](LICENSE) 开源。\n\n---\n\n<div align=\"center\">\n\n**Made with ❤️ by 奶茶叔叔**\n\n如果这个项目对你有帮助,请给一个 ⭐ Star 支持一下!\n\n</div>\n\n"}}}} |