MossCode
面向终端与编辑器的开源 AI Coding Agent:理解本地代码库、导航与修改文件、运行命令、检索代码并驱动完整的开发测试流程。支持 Anthropic Messages、OpenAI Responses 和 Chat Completions 三种协议,可接入完整 MCP、Skills、Hooks、子 Agent 与 Git 工作树团队。
安装
需要 Python 3.12 或更高版本。推荐用 uv 或 pipx 安装:
uv tool install mosscode
或
pipx install mosscode
升级使用 uv tool upgrade mosscode(或 pipx upgrade mosscode)。安装后提供 moss 和 mosscode 两个等价命令。
快速开始
moss # 启动终端交互界面(首次运行进入配置引导)
moss "梳理这个项目的核心模块" # 启动并立即发送任务
moss -c # 恢复当前目录最近的会话
moss --sandbox # 开启系统级命令沙箱运行
moss -p "运行测试并总结失败原因" # 无界面模式(支持 text / json / stream-json)
moss acp # 启动 ACP 服务,接入 PyCharm / IntelliJ / Zed
首次运行可直接跟随本机已有的 Claude Code / Codex 配置,或选用主流模型预设(DeepSeek、Kimi、GLM、通义千问、OpenRouter、Anthropic、OpenAI),可用 moss setup --add 追加配置,moss doctor --ping 检查环境与模型连通性。
核心功能
- 三端统一接入:保留终端原生滚屏与文字选择的内联界面、脚本与 CI 无界面模式(
-p),以及编辑器 ACP 服务端(moss acp)。 - 代码结构导航与可靠编辑:支持全仓代码结构地图(
repo_map)、文件符号大纲与按符号读取、多处原子替换与语法检查、全文检索、@文件引用、图片输入与!命令直跑。 - 长程任务与多 Agent 协作:提供只读规划(
/plan)、目标驱动执行(/goal)、定时巡检(/loop)、后台命令与任务管理、子 Agent 及独立 Git 工作树团队协作(/swarm)。 - 会话管理与长期记忆:支持长对话自动上下文减压、会话分支(
/fork)、检查点文件与对话回退(/rewind),以及跨工作树共享的用户/项目记忆检索。 - 开放扩展与安全边界:支持完整 MCP(工具、资源、
@server:uri与提示词命令)、Skills、生命周期 Hooks 与插件管理;内置四档权限、分层规则、高危命令拦截及 Windows / Linux / macOS 原生命令沙箱。
文档
MIT 许可证。
Metadata
Release files for mosscode 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mosscode-0.3.2.tar.gz | 1.3 MB | With provenance | Details for mosscode-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mosscode-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for mosscode-0.3.2-py3-none-any.whl |
Total release size: 2.1 MB
Release files / mosscode-0.3.2.tar.gz
| Download URL | mosscode-0.3.2.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed04a9b2bb7ab265685d6e1af132a7209f50159ec17c738292edd799b149e64b
|
|
BLAKE2b-256 checksum How to use checksums |
5e957fd2949d71f7e3b70056d334d8ba2065bfb34d58d4dd6a185df4f3497999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / mosscode-0.3.2-py3-none-any.whl
| Download URL | mosscode-0.3.2-py3-none-any.whl |
|---|---|
| Size | 830.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74c8c5a499cc7e7e53997717799a1adbe09c7a935f1c85f09074ca7a8187292e
|
|
BLAKE2b-256 checksum How to use checksums |
13007bcdb7160a9fa9c2290d6b2f9e2cd4d5a5547efbe19fd414f5a4f79e68e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for mosscode 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mosscode-0.3.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.