# AI Terminal Assistant **Repository Path**: simplecoder-1/AI-Terminal-Assistant ## Basic Information - **Project Name**: AI Terminal Assistant - **Description**: 一个智能终端助手,帮助开发者用自然语言执行命令、解释错误、生成代码。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-20 - **Last Updated**: 2026-02-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AI Terminal Assistant 一个智能终端助手,帮助开发者用自然语言执行命令、解释错误、生成代码。 ## 功能特性 - 🗣️ **自然语言转命令** - 用自然语言描述你想做的事,自动转换为Shell命令 - 🔍 **错误解释** - 粘贴错误信息,AI帮你解释并提供修复建议 - 💻 **代码生成** - 描述你想要的功能,自动生成代码片段 - 🖥️ **Windows 32/64位支持** - 兼容32位和64位Windows系统 - ⚡ **快捷键呼出** - 全局快捷键快速调用助手 ## 安装 ### 方式一:下载预编译版本 从 [Releases](https://gitee.com/simplecoder-1/AI-Terminal-Assistant/releases) 下载对应版本: - `ai-terminal-assistant-32bit.exe` - 32位系统 - `ai-terminal-assistant-64bit.exe` - 64位系统 ### 方式二:从源码运行 ```bash # 克隆项目 git clone https://gitee.com/simplecoder-1/AI-Terminal-Assistant.git cd AI-Terminal-Assistant # 安装依赖 pip install -r requirements.txt # 运行 CLI 版本 python main.py # 或运行 GUI 版本 python gui.py ``` ## 配置 首次运行前,需要在项目根目录创建 `.env` 文件: ```bash # 复制示例配置 copy .env.example .env # 编辑 .env 文件,填入你的API Key DEEPSEEK_API_KEY=your-api-key-here ``` ### 支持的API - **DeepSeek** (默认): `https://api.deepseek.com` - **OpenAI**: `https://api.openai.com` 修改 `config.py` 中的 `provider` 即可切换。 ## 使用方法 ### 1. 自然语言转命令 ``` > 帮我列出当前目录下所有txt文件 命令: dir *.txt /b ``` ### 2. 解释错误 ``` > npm install 报错了:ENOENT: no such file or directory 解释: 这个错误表示找不到指定的文件或目录... 建议: 1. 检查package.json是否存在 2. 先运行 npm init 创建项目 ``` ### 3. 生成代码 ``` > 写一个Python函数读取CSV文件 ```python import csv def read_csv(filepath): with open(filepath, 'r', encoding='utf-8') as f: reader = csv.reader(f) return list(reader) ``` ``` ## 技术栈 - **语言**: Python 3.8+ - **GUI**: Tkinter (兼容性好) - **AI**: DeepSeek API / OpenAI API - **打包**: PyInstaller ## 构建 ```bash # 安装构建依赖 pip install pyinstaller # 构建32位版本 pyinstaller --onefile --name=ai-terminal-assistant-32bit main.py # 构建64位版本 (64位Python环境) pyinstaller --onefile --name=ai-terminal-assistant-64bit main.py ``` ## Star 趋势 [![Star趋势](https://ghchart.rshah.org/simplecoder-1/AI-Terminal-Assistant)](https://github.com/simplecoder-1/AI-Terminal-Assistant) ## License MIT