Metadata-Version: 2.4
Name: mosscode
Version: 0.1.0
Summary: A terminal coding agent: tools, permissions, MCP, skills, hooks, sub-agents and agent teams.
Author: yzd11
License-Expression: MIT
Project-URL: Homepage, https://github.com/yzd11/mosscode
Project-URL: Source, https://github.com/yzd11/mosscode
Project-URL: Issues, https://github.com/yzd11/mosscode/issues
Project-URL: Changelog, https://github.com/yzd11/mosscode/blob/main/CHANGELOG.md
Keywords: coding-agent,ai,llm,terminal,cli,mcp,anthropic,openai
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: anthropic<2,>=1.12
Requires-Dist: openai<4,>=3.26
Requires-Dist: textual<9,>=8.2
Requires-Dist: PyYAML<7,>=6.0
Requires-Dist: pydantic<3,>=2.13
Requires-Dist: mcp<1.31,>=1.30
Requires-Dist: jsonschema<5,>=4.23
Requires-Dist: httpx<1,>=0.27
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-asyncio>=1; extra == "dev"
Requires-Dist: httpx2<3,>=2; extra == "dev"
Requires-Dist: ruff==0.17.3; extra == "dev"
Dynamic: license-file

# MossCode

终端里的 coding agent：读写文件、运行命令、搜索代码，按权限档位请你确认后执行。支持 Anthropic Messages、OpenAI Responses 和 Chat Completions 三种协议，可以接入 MCP 工具、Skill、Hook、子 Agent 和 Agent 团队。

## 安装

需要 Python 3.12 或更高版本。推荐用 [uv](https://docs.astral.sh/uv/) 或 [pipx](https://pipx.pypa.io/) 安装成独立的命令：

```
uv tool install mosscode
```

或

```
pipx install mosscode
```

升级用 `uv tool upgrade mosscode`（或 `pipx upgrade mosscode`）。安装后得到 `moss` 和 `mosscode` 两个相同的命令。

## 第一次运行

```
moss
```

找不到配置时，`moss` 在终端里逐项询问协议、服务地址、模型和凭据，写入 `~/.mosscode/config.yaml` 后进入界面。凭据推荐放在环境变量中，配置里只写变量名。`moss doctor` 检查安装、配置和依赖工具，不发送请求。

```
moss "解释这个项目的入口"          # 启动后立即发送
moss -c                            # 恢复本项目最近的会话
moss -p "列出 src 下的模块"        # 无界面模式，运行一个任务后退出
```

## 功能

- 本地工具：读、写、编辑、命令、glob、grep；相邻的只读调用并发执行。
- 四个权限档位与分层规则，危险命令分级确认，只读的计划模式。
- MCP 外部工具、Skill、生命周期 Hook。
- 子 Agent、后台任务、git 工作树隔离和 Agent 团队。
- 上下文自动压缩、会话存档与恢复、记忆笔记、项目指令 `AGENTS.md`。

支持 Windows、Linux 和 macOS。搜索优先使用 PATH 中的 [ripgrep](https://github.com/BurntSushi/ripgrep)，没有时退回内置实现。

## 文档

- [项目主页与完整说明](https://github.com/yzd11/mosscode)
- [参考文档](https://github.com/yzd11/mosscode/tree/main/docs/reference)
- [更新日志](https://github.com/yzd11/mosscode/blob/main/CHANGELOG.md)
- [问题反馈](https://github.com/yzd11/mosscode/issues)

MIT 许可证。
