Metadata-Version: 2.4
Name: sayacode
Version: 0.3.0
Summary: SAYACODE CLI coding assistant
Author: SAYACODE Contributors
License: MIT
Project-URL: Homepage, https://github.com/saya-ch/sayacode
Project-URL: Repository, https://github.com/saya-ch/sayacode
Project-URL: Issues, https://github.com/saya-ch/sayacode/issues
Keywords: coding-agent,cli,llm,developer-tools,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: langchain>=0.3.0
Requires-Dist: langgraph>=0.2.0
Requires-Dist: langchain-community>=0.3.0
Requires-Dist: langchain-openai>=0.2.0
Requires-Dist: langchain-anthropic>=0.3.0
Requires-Dist: langchain-ollama>=0.2.0
Requires-Dist: rich>=13.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: requests>=2.31.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: typing-extensions>=4.8.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Dynamic: license-file

# SAYACODE

<a href="https://pypi.org/project/sayacode/"><img src="https://img.shields.io/pypi/v/sayacode?color=ff69b4" alt="PyPI"></a>
<a href="https://github.com/saya-ch/sayacode/actions"><img src="https://img.shields.io/github/actions/workflow/status/saya-ch/sayacode/ci.yml?branch=main" alt="CI"></a>
<img src="https://img.shields.io/badge/python-3.11%20|%203.12%20|%203.13-blue" alt="Python">
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-pink" alt="License"></a>

终端里的 AI 编程搭档。基于 LangChain / LangGraph，接上你常用的模型就能用。聊天、改代码、跑命令、管 Git，都在一个框里搞定。

---

## 角色风格

SAYACODE 内置了 9 种对话人格：标准、简洁、傲娇、元气、雌小鬼、姐姐、偶像、猫娘、无口。随时用 `/style` 切换。

---

## 安装

**环境要求**：Python >= 3.11

```bash
git clone https://github.com/saya-ch/sayacode.git
cd sayacode
pip install .
```

conda 用户：

```bash
conda create -n sayacode python=3.12 -y
conda activate sayacode
git clone https://github.com/saya-ch/sayacode.git
cd sayacode
pip install .
```

安装完成后，在任意目录执行 `sayacode` 即可启动。首次运行将进入配置向导，引导完成模型 Provider 和 API Key 的设置，配置自动保存至 `~/.sayacode/`。

---

## 使用

```bash
sayacode                          # 交互式对话
sayacode --workspace ./my-project # 指定工作区
sayacode --style catgirl          # 切换角色
sayacode --doctor                 # 自诊断
```

对话内命令：

| 命令 | 说明 |
|------|------|
| `/help`, `/guide`, `/start` | 帮助与引导 |
| `/status`, `/workspace`, `/context` | 状态与工作区 |
| `/model`, `/mode`, `/style`, `/lang` | 模型 / 模式 / 风格 / 语言 |
| `/session`, `/sessions`, `/history` | 会话管理 |
| `/tools`, `/commands`, `/mcp`, `/hooks` | 工具 & 扩展 |
| `/doctor`, `/permissions`, `/stats` | 诊断 & 安全 |
| `/git`, `/clear`, `/compact`, `/reset` | 快捷操作 |
| `/prefs`, `/settings`, `/config`, `/paths` | 偏好与配置 |
| `/symbols`, `/analyze` | 代码分析 |
| `/quit` | 退出 |

---

## 模型支持

| 接口 | 说明 |
|------|------|
| OpenAI 兼容 | GPT-4o 等，以及 Azure、自定义端点 |
| Anthropic 兼容 | Claude Opus / Sonnet / Haiku |
| Gemini | Google Gemini 系列 |
| Ollama | 本地运行，免费 |

---

## 能力

- **文件**：读写、搜索、正则替换、批量编辑
- **Shell**：执行命令、安全检查、查看环境
- **Git**：status / diff / add / commit / branch / stash / pull / push
- **项目分析**：结构扫描、符号索引、依赖梳理
- **MCP 扩展**：通过 Model Context Protocol 接外部工具

## 安全

危险操作（删系统文件、`rm -rf /`、格式化等）在执行前被硬拦截。密钥和私钥文件默认禁止读取。所有工具调用落审计日志。

---

## 开发

```bash
pip install -e ".[dev]"
pytest tests/ -v
```

---

## License

MIT © SAYACODE Contributors
