Metadata-Version: 2.4
Name: ai-shell-hub
Version: 0.1.0
Summary: AI 终端助手 — 自然语言转 Shell 命令 + 智能错误诊断
Author: ai-terminal
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.9
Requires-Dist: rich>=13
Requires-Dist: httpx>=0.25
Requires-Dist: pydantic>=2
Requires-Dist: pycryptodome>=3
Dynamic: license-file

# AI 终端助手 (ai-terminal)

> 把你的终端变聪明 — 自然语言转 Shell 命令 + 智能错误诊断

[![PyPI version](https://img.shields.io/pypi/v/ai-terminal)](https://pypi.org/project/ai-terminal/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)](https://python.org)
[![License MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)

## 安装

```bash
pip install ai-terminal
ai setup
```

## 使用

```bash
# 自然语言 → Shell 命令并执行
ai 查看磁盘使用情况
ai 找到所有大于100MB的文件
ai 杀掉占用8080端口的进程

# 解释命令
ai -e "docker-compose up -d"
ai -e "git rebase -i HEAD~3"

# 诊断错误
ai -f "docker: command not found"
ai -f "npm install 报 EACCES 错误"

# 分析 Shell 历史
ai -H

# 搜索解决方案（Pro 版）
ai -S "nginx 502 bad gateway"

# 优化命令
ai -O "find . -name *.py | xargs wc -l"
```

## 功能

| 功能 | 免费版 | Pro (¥30/月) |
|------|--------|--------------|
| 自然语言→命令 | ✅ 10次/天 | ✅ 无限 |
| 命令安全分类 | ✅ | ✅ |
| 错误诊断 | ✅ | ✅ |
| AI 解释命令 | ❌ | ✅ |
| Shell 历史分析 | ❌ | ✅ |
| Web 搜索诊断 | ❌ | ✅ |
| 命令优化 | ❌ | ✅ |

## 配置 LLM

```bash
ai -c
```

支持 OpenAI / Anthropic / Ollama（本地）

## 许可证

MIT
